CN116192342A - Data transmission method, device, electronic equipment and computer readable medium - Google Patents

Data transmission method, device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN116192342A
CN116192342A CN202310142268.8A CN202310142268A CN116192342A CN 116192342 A CN116192342 A CN 116192342A CN 202310142268 A CN202310142268 A CN 202310142268A CN 116192342 A CN116192342 A CN 116192342A
Authority
CN
China
Prior art keywords
data
interface
data transmission
target
workflow
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310142268.8A
Other languages
Chinese (zh)
Inventor
柳元辉
肖景辉
王定成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202310142268.8A priority Critical patent/CN116192342A/en
Publication of CN116192342A publication Critical patent/CN116192342A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals

Abstract

The application discloses a data transmission method, a data transmission device, electronic equipment and a computer readable medium, and relates to the technical field of big data exchange, wherein a specific implementation mode comprises the steps of receiving a data transmission request and obtaining a corresponding interface identifier and data to be transmitted; calling an interface corresponding to the interface identifier to execute transmission of data to be transmitted, and responding to data transmission failure, locking a corresponding data transmission process to acquire a main key value corresponding to the data which is failed to be transmitted; inquiring whether the target container has corresponding data or not based on the primary key value, and further acquiring inquiry result information; based on the query result information, a target data transfer workflow is determined and executed. The labor and time cost of manual inspection and communication are saved, the data is ensured to be completely pushed to a downstream system without errors, and the efficiency and the accuracy of data transmission are improved.

Description

Data transmission method, device, electronic equipment and computer readable medium
Technical Field
The present disclosure relates to the field of big data exchange technologies, and in particular, to a data transmission method, a device, an electronic apparatus, and a computer readable medium.
Background
In the internet age, various application service systems are not isolated and closed, and when many systems process the business demands of clients, the data information of the clients in other systems is needed, and at this time, the data interaction needs to be performed among the systems. The actual data interaction can have the reasons of network fluctuation, unavailable service of a downstream system, artificial misoperation and the like, so that the data cannot be automatically and completely given to the downstream system through a single data pushing interface, the downstream system is often required to check and find that the data is missing manually, and then personnel of the upstream system are notified to manually push the data again, so that the labor and time cost is increased, the data transmission efficiency is low, and the accuracy is low.
Disclosure of Invention
In view of this, the embodiments of the present application provide a data transmission method, apparatus, electronic device, and computer readable medium, which can solve the problems of low data transmission efficiency and low accuracy in the prior art.
To achieve the above object, according to one aspect of the embodiments of the present application, there is provided a data transmission method, including:
receiving a data transmission request, and acquiring a corresponding interface identifier and data to be transmitted;
calling an interface corresponding to the interface identifier to execute transmission of data to be transmitted, and responding to data transmission failure, locking a corresponding data transmission process to acquire a main key value corresponding to the data which is failed to be transmitted;
Inquiring whether the target container has corresponding data or not based on the primary key value, and further acquiring inquiry result information;
determining and executing a target data transmission workflow based on the query result information;
and releasing the locked data transmission process in response to successful execution of the target data transmission workflow.
Optionally, calling an interface corresponding to the interface identifier to perform transmission of the data to be transmitted, including:
and calling the interface identifier to correspond to the upstream interface and the downstream interface so as to transmit the data to be transmitted from the upstream interface to the downstream interface.
Optionally, before querying whether the target container has corresponding data based on the primary key value, the data transmission method further includes:
extracting a downstream interface identifier from the interface identifiers;
and determining a downstream system corresponding to the downstream interface identification as a target container.
Optionally, determining and executing the target data transmission workflow based on the query result information includes:
determining the active query workflow as a target data transmission workflow in response to the query result information corresponding to the data containing the successful identifier and no primary key value corresponding to the target container;
executing a target data transmission workflow to call an active query interface to acquire missing data;
And inserting the missing data into a database corresponding to the target container.
Optionally, inserting missing data into a database corresponding to the target container, including:
matching the missing data with data in a database corresponding to the target container to determine a target position;
the missing data is inserted into the target location.
Optionally, matching the missing data with data in a database corresponding to the target container includes:
and calculating the similarity between the missing data and the data in the database corresponding to the target container, and then carrying out data matching according to the similarity.
Optionally, determining and executing the target data transmission workflow based on the query result information includes:
determining the data re-pushing workflow as a target data transmission workflow in response to the query result information corresponding to the failure containing identification;
and executing the target transmission workflow to retransmit the data and update the query result information until the updated query result information contains a successful identifier.
In addition, the application also provides a data transmission device, which comprises:
the receiving unit is configured to receive a data transmission request and acquire a corresponding interface identifier and data to be transmitted;
the main key value acquisition unit is configured to call an interface corresponding to the interface identifier so as to execute transmission of data to be transmitted, and lock a corresponding data transmission process in response to data transmission failure so as to acquire a main key value corresponding to the data which is failed to be transmitted;
The query unit is configured to query whether the target container has corresponding data or not based on the primary key value, and further acquire query result information;
an execution unit configured to determine and execute a target data transmission workflow based on the query result information;
and a lock release unit configured to release the locked data transmission process in response to successful execution of the target data transmission workflow.
Optionally, the primary key value acquisition unit is further configured to:
and calling the interface identifier to correspond to the upstream interface and the downstream interface so as to transmit the data to be transmitted from the upstream interface to the downstream interface.
Optionally, the apparatus further comprises a target container determining unit configured to:
extracting a downstream interface identifier from the interface identifiers;
and determining a downstream system corresponding to the downstream interface identification as a target container.
Optionally, the execution unit is further configured to:
determining the active query workflow as a target data transmission workflow in response to the query result information corresponding to the data containing the successful identifier and no primary key value corresponding to the target container;
executing a target data transmission workflow to call an active query interface to acquire missing data;
and inserting the missing data into a database corresponding to the target container.
Optionally, the execution unit is further configured to:
matching the missing data with data in a database corresponding to the target container to determine a target position;
the missing data is inserted into the target location.
Optionally, the execution unit is further configured to:
and calculating the similarity between the missing data and the data in the database corresponding to the target container, and then carrying out data matching according to the similarity.
Optionally, the execution unit is further configured to:
determining the data re-pushing workflow as a target data transmission workflow in response to the query result information corresponding to the failure containing identification;
and executing the target transmission workflow to retransmit the data and update the query result information until the updated query result information contains a successful identifier.
In addition, the application also provides data transmission electronic equipment, which comprises: one or more processors; and a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the data transmission method as described above.
In addition, the application also provides a computer readable medium, on which a computer program is stored, which when executed by a processor, implements a data transmission method as described above.
To achieve the above object, according to yet another aspect of the embodiments of the present application, a computer program product is provided.
A computer program product of an embodiment of the present application includes a computer program, which when executed by a processor implements a data transmission method provided by the embodiment of the present application.
One embodiment of the above invention has the following advantages or benefits: the method comprises the steps of obtaining a corresponding interface identifier and data to be transmitted by receiving a data transmission request; calling an interface corresponding to the interface identifier to execute transmission of data to be transmitted, and responding to data transmission failure, locking a corresponding data transmission process to acquire a main key value corresponding to the data which is failed to be transmitted; inquiring whether the target container has corresponding data or not based on the primary key value, and further acquiring inquiry result information; based on the query result information, a target data transfer workflow is determined and executed. The labor and time cost of manual inspection and communication are saved, the data is ensured to be completely pushed to a downstream system without errors, and the efficiency and the accuracy of data transmission are improved.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the present application and are not to be construed as unduly limiting the present application. Wherein:
FIG. 1 is a schematic diagram of the main flow of a data transmission method according to one embodiment of the present application;
FIG. 2 is a schematic diagram of the main flow of a data transmission method according to one embodiment of the present application;
FIG. 3 is a schematic diagram of a main flow of a data transmission method according to one embodiment of the present application;
FIG. 4 is a schematic diagram of a main flow of a data transmission method according to one embodiment of the present application;
FIG. 5 is a schematic diagram of a main flow of a data transmission method according to one embodiment of the present application;
fig. 6 is a schematic diagram of main units of a data transmission device according to an embodiment of the present application;
FIG. 7 is an exemplary system architecture diagram in which embodiments of the present application may be applied;
fig. 8 is a schematic diagram of a computer system suitable for use in implementing the terminal device or server of the embodiments of the present application.
Detailed Description
Exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present application to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness. In the technical scheme of the application, the aspects of acquisition, analysis, use, transmission, storage and the like of the related user personal information all meet the requirements of related laws and regulations, are used for legal and reasonable purposes, are not shared, leaked or sold outside the aspects of legal use and the like, and are subjected to supervision and management of a supervision department. Necessary measures should be taken for the personal information of the user to prevent illegal access to such personal information data, ensure that personnel having access to the personal information data comply with the regulations of the relevant laws and regulations, and ensure the personal information of the user. Once these user personal information data are no longer needed, the risk should be minimized by limiting or even prohibiting the data collection and/or deletion.
User privacy is protected by de-identifying data when used, including in some related applications, such as by removing a particular identifier, controlling the amount or specificity of stored data, controlling how data is stored, and/or other methods.
Fig. 1 is a schematic diagram of main flow of a data transmission method according to an embodiment of the present application, and as shown in fig. 1, the data transmission method includes:
step S101, receiving a data transmission request, and acquiring a corresponding interface identifier and data to be transmitted.
In this embodiment, the execution body (for example, may be a server) of the data transmission method may receive the data transmission request by means of a wired connection or a wireless connection. The data transfer request may be, for example, a request to transfer data from an upstream system to a downstream system. Upstream and downstream systems: data flows from one system to the next system that needs the data, the former system being referred to as the upstream system and the latter system being the downstream system.
After receiving the data transmission request, the executing body can acquire the corresponding interface identifier. The interface identifier may be an interface number or an interface name of the junction of the upstream and downstream systems, which is not specifically limited in the embodiment of the present application. An interface: the interface can be understood as a data template and a channel with a convention format, the calling party sends data into the channel according to the convention format, and the receiving party can receive the requested data.
The data to be transmitted may be, for example, network sign-on contract data of an upstream house transaction system, and the content of the data to be transmitted in the embodiment of the present application is not specifically limited.
Step S102, calling an interface corresponding to the interface identifier to execute transmission of data to be transmitted, and responding to data transmission failure, locking a corresponding data transmission process to acquire a main key value corresponding to the data of the transmission failure.
The primary key value corresponding to the data for which transmission has failed may be, for example, a contract ID.
By locking the corresponding data transmission process when the data transmission fails, erroneous data output can be avoided, and the correctness of the data transmission is ensured.
Step S103, inquiring whether the target container has corresponding data or not based on the primary key value, and further acquiring inquiry result information.
Specifically, before querying whether the target container has corresponding data based on the primary key value, the method further includes: extracting a downstream interface identifier from the interface identifiers; and determining a downstream system corresponding to the downstream interface identification as a target container.
And inquiring whether a primary key value corresponding to the data with transmission failure exists in the data stored in the target container, such as a contract ID, if so, returning data transmission success information containing a success identifier, and if not, returning data transmission failure information containing a failure identifier.
Step S104, determining and executing a target data transmission workflow based on the query result information.
Specifically, determining and executing a target data transmission workflow based on the query result information, including: determining the data re-pushing workflow as a target data transmission workflow in response to the query result information corresponding to the failure containing identification; and executing the target transmission workflow to retransmit the data and update the query result information until the updated query result information contains a successful identifier.
The data re-push workflow is used to re-transmit data to be transmitted from an upstream system to a downstream system. After the data re-pushing workflow is executed, the downstream system (namely the target container) still does not inquire the data corresponding to the corresponding primary key value, which indicates that the data transmission is still unsuccessful, and the data re-pushing workflow is executed again until the downstream system can inquire the data corresponding to the corresponding primary key value.
S105, responding to successful execution of the target data transmission workflow, and releasing the locked data transmission process.
When the target data transmission workflow is successfully executed, the exception generated in the data transmission process is indicated to be processed, and the locked data transmission process can be released for other processes to access the data at any time.
In the embodiment, a corresponding interface identifier and data to be transmitted are obtained by receiving a data transmission request; calling an interface corresponding to the interface identifier to execute transmission of data to be transmitted, and responding to data transmission failure, locking a corresponding data transmission process to acquire a main key value corresponding to the data which is failed to be transmitted; inquiring whether the target container has corresponding data or not based on the primary key value, and further acquiring inquiry result information; determining and executing a target data transmission workflow based on the query result information; and releasing the locked data transmission process in response to successful execution of the target data transmission workflow. The labor and time cost of manual inspection and communication are saved, the data is ensured to be completely pushed to a downstream system without errors, and the efficiency and the accuracy of data transmission are improved.
Fig. 2 is a schematic flow chart of a data transmission method according to an embodiment of the present application, and as shown in fig. 2, the data transmission method includes:
step S201, receiving a data transmission request, and obtaining a corresponding interface identifier and data to be transmitted.
After receiving the data transmission request, the executing body can acquire the corresponding interface identifier. The interface identifier may be an interface number or an interface name of the junction of the upstream and downstream systems, which is not specifically limited in the embodiment of the present application. The data to be transmitted may be, for example, system operation log data of an upstream system, and the content of the data to be transmitted in the embodiment of the present application is not specifically limited.
Step S202, calling an upstream interface and a downstream interface corresponding to the interface identification to transmit data to be transmitted from the upstream interface to the downstream interface, and responding to data transmission failure, acquiring a primary key value corresponding to the data of the transmission failure.
The number of the downstream interfaces to which the upstream interface can correspond is not specifically limited. When one upstream interface corresponds to a plurality of downstream interfaces, the data to be transmitted is required to be transmitted to a plurality of downstream systems. And when the downstream system does not receive the data to be transmitted and the check on whether the data transmission is successful is needed, the downstream systems are required to be called to inquire the primary key value corresponding to the data to be transmitted so as to determine whether the data corresponding to the primary key value is stored in the downstream systems.
Step S203, inquiring whether the target container has corresponding data based on the primary key value, and further acquiring inquiry result information.
And calling one or more corresponding downstream systems (namely one or more corresponding target containers) according to the primary key value to inquire whether the data corresponding to the primary key value exists or not, so as to acquire inquiry result information of the one or more downstream systems.
Step S204, determining and executing a target data transmission workflow based on the query result information.
And calling a corresponding one or more downstream systems, wherein the query result information of the corresponding one or more downstream systems comprises a failure identifier, executing the data re-pushing workflow until all returned query result information comprises a success identifier, and ending the data transmission process. Thereby ensuring the success rate of data transmission.
Step S205, in response to the successful execution of the target data transmission workflow, releasing the locked data transmission process.
When the target data transmission workflow is successfully executed, the locked data transmission processes can be released, so that the processes can access data mutually, and the data transmission rate is improved.
Fig. 3 is a main flow diagram of a data transmission method according to an embodiment of the present application, and as shown in fig. 3, the data transmission method includes:
step S301, a data transmission request is received, and a corresponding interface identifier and data to be transmitted are obtained.
The data transmission request may also be a request to transmit performance data of the employee to an approval system. The content of the data transmission request in the embodiment of the present application is not particularly limited.
For example, after receiving the data transmission request, the executing body may acquire an interface identifier of an interface between the downstream approval system and the upstream system, and locate a corresponding interface according to the interface identifier, so as to invoke the interface to execute transmission of the data to be transmitted.
Step S302, calling an upstream interface and a downstream interface corresponding to the interface identification to transmit data to be transmitted from the upstream interface to the downstream interface, and locking a corresponding data transmission process to acquire a primary key value corresponding to the data with transmission failure in response to the data transmission failure.
The number of the corresponding upstream interfaces of the interface identifier can be multiple, and one corresponding downstream interface can be provided. That is, the upstream and downstream interfaces in the interface identification correspondence may be in a many-to-one relationship. For example, performance data of a plurality of employees is sent to a downstream system corresponding to the same downstream interface according to the corresponding relationship between the upstream interface and the downstream interface.
When the data transmission fails, the corresponding data transmission process is locked to avoid providing error data when the data transmission process interacts with other processes, the accuracy of the data transmission is ensured, and each primary key value corresponding to the data to be transmitted corresponding to each upstream interface is acquired to check whether the data transmission is successful or not based on each primary key value.
Step S303, inquiring whether the target container has corresponding data or not based on the primary key value, and further acquiring inquiry result information.
For example, there may be multiple primary key values, and whether primary key values corresponding to the data to be transmitted by the upstream system exist in the data stored by the downstream system (i.e., the target container) is searched, if so, query result information carrying a successful identifier is returned to each upstream system; if one main key value does not exist, the query result information carrying the failure identifier is returned to the upstream system corresponding to the main key value which does not exist, and then the query result information carrying the success identifier is returned to the upstream system corresponding to the main key value which exists.
Step S304, in response to the query result information corresponding to the data containing the successful identifier and no primary key value in the target container, determining the active query workflow as the target data transmission workflow.
For example, there is a successful identification returned by the downstream system (i.e., the status code is zero), and the pushed data is deleted due to internal reasons of the downstream system itself, such as code logic problems or human error operations, resulting in unsuccessful data falling. Thus, the house transaction system (i.e., the upstream system) provides an interface for the external system to actively query for relevant data. And when the query result information corresponds to the data which contains the successful identifier and is not corresponding to the primary key value in the target container, calling an active query interface, determining the active query workflow as a target data transmission workflow and executing the active query workflow.
Step S305, executing the target data transmission workflow to call the active query interface to acquire missing data.
The downstream system may invoke an active query interface provided by the upstream system to perform an active query of the relevant data of the house transaction system by the targeted data transfer workflow (i.e., the active query payroll), and insert the queried missing data into its own database system.
Step S306, the missing data is inserted into the database corresponding to the target container.
Specifically, inserting missing data into a database corresponding to a target container includes: matching the missing data with data in a database corresponding to the target container to determine a target position; the missing data is inserted into the target location.
Specifically, matching missing data with data in a database corresponding to a target container includes: and calculating the similarity between the missing data and the data in the database corresponding to the target container, and then carrying out data matching according to the similarity.
And matching the missing data with stored data in a database corresponding to the target container in a mode of calculating the similarity of the data content so as to determine the insertion target position of the missing data, further inserting the missing data into the target position, completing the whole data transmission, and improving the success rate of the data transmission.
Step S307, in response to the successful execution of the target data transmission workflow, releases the locked data transmission process. For data inter-access between processes.
Fig. 4 is a schematic flow chart of a data transmission method according to an embodiment of the present application. The data transmission method is applied to a scene of transmitting data from an upstream system to a downstream system. In order to ensure the safety of data interaction, the message can be encrypted and decrypted; to authenticate the transaction initiator, the message may be signed and checked. When the upstream and downstream negotiate the push rule, the upstream system is taken as the main part, and the downstream external system is taken as the cooperator, and the specific rule is as follows:
When the downstream external system is used as a calling party, the downstream external system is in butt joint according to the agreed unified standard. The app_id is distributed by the upstream external system, the downstream external system generates a signature according to a signature rule when calling the upstream service, and the upstream system performs signature verification.
When the downstream external system is a service party, the downstream external system needs to provide services according to the agreed same standard interface. Each downstream external system uses app_id allocated by the upstream system, and the upstream generates a signature according to a signature rule when invoking downstream services, and performs signature verification on the downstream external system side. The signing rule is as shown in fig. 4:
1) Generating appId: distributed by an upstream system;
2) Generating a request parameter strJson: converting Map type request parameters into String character strings in json format, judging whether the request parameters are encrypted, if so, encrypting the strJso by using a block cipher algorithm SM4, executing the signing (signature adding) step of 3), and if not, directly executing the signing step of 3);
3) Generating a signed field sign Str: specifically, appid+strjson+timestamp is used to generate a signature field sign str. Specifically, appId: the external system unique identification is allocated by the house management transaction system item. Timestamp: the system current timestamp, the signature needs to be used. strJson: and assigning values to str according to json message strings organized by specific service interfaces. sign: request parameter signature strings. If the joining needs encryption and needs signing, the character string strJson needs to be encrypted by using a block cipher algorithm SM4 and then signed.
Interface message standard format design of the embodiment of the application:
request message format: the request message is in json format and comprises 4 parameters, strJson is business data information to be pushed, and encryption and signing are carried out on the parameters.
Response message format: the response message is in json format and comprises 3 parameters, wherein the field code value is important, because the house transaction system can judge whether the pushing data is successful or not according to the code value in the response message returned by the downstream system, and the state is stored in the database. code: response code, 0, succeeds, and others fail.
Fig. 5 is a schematic flow chart of a data transmission method according to an embodiment of the present application.
Taking the example of pushing the network signing contract data of the upstream house transaction system to the downstream external system, for example, the actual production can have some reasons such as network fluctuation, unavailable service of the downstream system, misoperation and the like, so that the data cannot be completely and correctly given to the downstream system through a single data pushing interface. To ensure that the relevant data of the upstream house transaction system is successfully and completely given to the downstream external system without manual intervention as much as possible, the house transaction system and the downstream external system are required to cooperate to realize three interfaces (including (1) an active push data interface, (2) a house providing query interface, and (3) the downstream system providing query interface) to invoke services through an interface HTM/API and a house transaction external subsystem, for example, as shown in fig. 5: upstream active push data interface: the upstream house transaction system is a calling party, and the downstream external system is a service party. The house transaction system negotiates with a downstream external system to determine the business data information to be pushed, and the house transaction external subsystem defines a standard external interface; the downstream external system provides services according to the standard interface of the house transaction external subsystem. The house transaction external subsystem actively pushes data to a downstream external system through a push data interface, such as pushing network sign-up contract information to a downstream real estate system, a lease system, a tax system and a maintenance fund system. The interface requires downstream external systems to develop and provide services in compliance with house transaction extranet subsystem interface standards.
(1) The standard specification of the active push data interface is as follows, taking a push network signing contract of a house transaction system as an example.
1) Interface name: network signing and recording contract information pushing interface
The downstream external system provides the call address of the interface service:
http:// xx. Xx: port/interface path, specific call addresses of IP, port and interface path of the interface are required to be provided by a downstream external system.
2) Interface description
The house transaction system actively pushes the network signing and recording contract information data to a downstream external system, and an external system development interface service receives the data; the external system returns a response message to the house transaction system, the house transaction system judges whether the data pushing is successful or not according to the response code value in the response message, if the response code value is 0, the data pushing is considered to be successful, and if the response code value is not, the data pushing is failed, and the status of whether the data pushing is successful or not is stored in the database.
(2) Data query interface provided upstream
The house transaction system is a service party, and the downstream system is a calling party. The active data push interface of the house transaction system fails to push due to network fluctuation, unavailable downstream system service and the like. The house transaction system can judge whether the data is pushed to the downstream system according to the status code value in the return message of the downstream system, and the house transaction system can re-push the data as long as the status code value is non-zero. However, there is a successful identification returned by the downstream system (i.e., the status code is zero), and the pushed data is deleted due to internal reasons of the downstream system itself, such as a code logic problem or a human error operation, so that the data fails to be dropped to the database. Thus, the house transaction system provides an interface for the external system to actively query for relevant data. The downstream system can actively query the house transaction system for relevant data and insert the queried missing data into the database system of the downstream system.
The standard specification of the data query interface provided by the house transaction is as follows, taking house transaction system to provide network sign-up contract query as an example.
1) Interface name: house transaction network signing and recording contract information inquiry
The upstream house transaction system provides the calling address of the interface service:
http:// xx. Xx: port/interface path
2) Interface description
The house transaction system development interface provides inquiry service for inquiring web tag contracts according to days, and the external system can call the interface according to the appointed message format, can inquire web tag data of the days and store the data according to the needs.
(3) Downstream system side-provided data query interface
The downstream system side provides a data query interface for the house transaction system, and the house transaction system can query the acquired or unoccupied data of the downstream system according to the main key. The interface (1) and the interface (3) are matched for use, and after the house transaction system initiates data pushing, the pushing result is recorded in the database according to the response code value in the received return message. Because of the network or the downstream system, some data can be failed to be pushed, the house transaction system initiates inquiry to the downstream system by taking the main key value of the data which shows the failed pushing in the database, and if the downstream system is inquired that the corresponding data exists, the pushing state in the database is directly updated; if no data is queried, the previous pushing is truly unsuccessful, and pushing is initiated again.
Taking a house transaction system pushing network signing contract as an example.
1) Interface name: data query interface provided at downstream system side
The downstream external system provides the call address of the interface service:
http:// xx. Xx: port/interface path, specific call addresses of IP, port and interface path of the interface are required to be provided by a downstream external system.
2) Interface description
The downstream system provides a contract data interface for querying or obtaining the contract data interface for querying by the house transaction system. If the data corresponding to the primary key is found in the downstream system, the response code value in the returned message is zero, otherwise, the contract information corresponding to the primary key is not found in the downstream system.
The house transaction system is matched with the use of the interface (1) and the interface (3) in fig. 5, so that the accuracy of the data pushing state recorded in the own database can be ensured. Meanwhile, if the downstream system is in misoperation, the received data is deleted carelessly, and the data of the house transaction system can be actively inquired through the interface (2) in fig. 5 and inserted into the database.
According to the embodiment of the application, on the basis of the existing active push data interface, a downstream system provides a query interface, an upstream system queries data in a database to display push failure, if the query is successful, the actual push is successful, and the push state in the database of the downstream system is updated; if the query fails, the contract information is pushed again. On the basis of the two interfaces (1) and (3) in the figure 5, the upstream system provides an interface (2) for the downstream system to inquire as shown in the figure 5, so as to make up for the defect that personnel needing to manually inform the upstream system need to push data again; the three interfaces are matched with one pushing scheme, so that the labor and time cost of manual inspection and communication are saved, and the data is completely pushed to a downstream system.
According to the embodiment of the application, the upstream system can automatically check the data which are failed to push and then automatically push again, and meanwhile, the downstream system can actively inquire the data of the upstream system. Therefore, the labor and time cost of manual inspection and communication are saved, and the data is ensured to be completely and correctly pushed to a downstream system.
Fig. 6 is a schematic diagram of main units of a data transmission device according to an embodiment of the present application. As shown in fig. 6, the data transmission apparatus 600 includes a receiving unit 601, a primary key value acquisition unit 602, a query unit 603, and an execution unit 604.
The receiving unit 601 is configured to receive a data transmission request, and obtain a corresponding interface identifier and data to be transmitted.
The primary key value obtaining unit 602 is configured to invoke an interface corresponding to the interface identifier to perform transmission of data to be transmitted, and lock a corresponding data transmission process in response to a data transmission failure to obtain a primary key value corresponding to the data of the transmission failure.
And a query unit 603 configured to query whether the target container has corresponding data based on the primary key value, thereby obtaining query result information.
And an execution unit 604 configured to determine and execute the target data transmission workflow based on the query result information.
A lock release unit 605 is configured to release the locked data transfer process in response to successful execution of the target data transfer workflow.
In some embodiments, the primary key value acquisition unit 602 is further configured to: and calling the interface identifier to correspond to the upstream interface and the downstream interface so as to transmit the data to be transmitted from the upstream interface to the downstream interface.
In some embodiments, the data transmission apparatus further comprises a target container determination unit, not shown in fig. 6, configured to: extracting a downstream interface identifier from the interface identifiers; and determining a downstream system corresponding to the downstream interface identification as a target container.
In some embodiments, the execution unit 604 is further configured to: determining the active query workflow as a target data transmission workflow in response to the query result information corresponding to the data containing the successful identifier and no primary key value corresponding to the target container; executing a target data transmission workflow to call an active query interface to acquire missing data; and inserting the missing data into a database corresponding to the target container.
In some embodiments, the execution unit 604 is further configured to: matching the missing data with data in a database corresponding to the target container to determine a target position; the missing data is inserted into the target location.
In some embodiments, the execution unit 604 is further configured to: and calculating the similarity between the missing data and the data in the database corresponding to the target container, and then carrying out data matching according to the similarity.
In some embodiments, the execution unit 604 is further configured to: determining the data re-pushing workflow as a target data transmission workflow in response to the query result information corresponding to the failure containing identification; and executing the target transmission workflow to retransmit the data and update the query result information until the updated query result information contains a successful identifier.
It should be noted that, the data transmission method and the data transmission device of the present application have a corresponding relationship in the implementation content, so the repeated content will not be described.
Fig. 7 illustrates an exemplary system architecture 700 to which the data transmission method or data transmission apparatus of the embodiments of the present application may be applied.
As shown in fig. 7, a system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. The network 704 is the medium used to provide communication links between the terminal devices 701, 702, 703 and the server 705. The network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 705 via the network 704 using the terminal devices 701, 702, 703 to receive or send messages or the like. Various communication client applications such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 701, 702, 703.
The terminal devices 701, 702, 703 may be various electronic devices having a data transmission processing screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 705 may be a server providing various services, such as a background management server (by way of example only) providing support for data transmission requests submitted by users using the terminal devices 701, 702, 703. The background management server can receive the data transmission request and acquire the corresponding interface identifier and the data to be transmitted; calling an interface corresponding to the interface identifier to execute transmission of data to be transmitted, and responding to data transmission failure, locking a corresponding data transmission process to acquire a main key value corresponding to the data which is failed to be transmitted; inquiring whether the target container has corresponding data or not based on the primary key value, and further acquiring inquiry result information; based on the query result information, a target data transfer workflow is determined and executed. The labor and time cost of manual inspection and communication are saved, the data is ensured to be completely pushed to a downstream system without errors, and the efficiency and the accuracy of data transmission are improved.
It should be noted that, the data transmission method provided in the embodiments of the present application is generally executed by the server 705, and accordingly, the data transmission device is generally disposed in the server 705.
It should be understood that the number of terminal devices, networks and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, there is illustrated a schematic diagram of a computer system 800 suitable for use in implementing the terminal device of an embodiment of the present application. The terminal device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present application.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU) 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM803, various programs and data required for the operation of the computer system 800 are also stored. The CPU801, ROM802, and RAM803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, mouse, etc.; an output section 807 including a display such as a Cathode Ray Tube (CRT), a liquid crystal credit authorization query processor (LCD), and a speaker; a storage section 808 including a hard disk or the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. The drive 810 is also connected to the I/O interface 805 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as needed so that a computer program read out therefrom is mounted into the storage section 808 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments disclosed herein include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 809, and/or installed from the removable media 811. The above-described functions defined in the system of the present application are performed when the computer program is executed by a Central Processing Unit (CPU) 801.
It should be noted that the computer readable medium shown in the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented by software, or may be implemented by hardware. The described units may also be provided in a processor, for example, described as: a processor includes a receiving unit, a primary key value acquisition unit, a query unit, and an execution unit. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
As another aspect, the present application also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs, which when executed by one of the devices, cause the device to receive a data transmission request, and obtain a corresponding interface identifier and data to be transmitted; calling an interface corresponding to the interface identifier to execute transmission of data to be transmitted, and responding to data transmission failure, locking a corresponding data transmission process to acquire a main key value corresponding to the data which is failed to be transmitted; inquiring whether the target container has corresponding data or not based on the primary key value, and further acquiring inquiry result information; based on the query result information, a target data transfer workflow is determined and executed.
The computer program product of the present application comprises a computer program which, when executed by a processor, implements the data transmission method in the embodiments of the present application.
According to the technical scheme of the embodiment of the application, the manpower and time cost of manual inspection and communication are saved, the data is ensured to be completely pushed to a downstream system without errors, and the efficiency and the accuracy of data transmission are improved.
The above embodiments do not limit the scope of the application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application are intended to be included within the scope of the present application.

Claims (16)

1. A data transmission method, comprising:
receiving a data transmission request, and acquiring a corresponding interface identifier and data to be transmitted;
invoking an interface corresponding to the interface identifier to execute transmission of the data to be transmitted, and responding to data transmission failure, locking a corresponding data transmission process to acquire a main key value corresponding to the data which is failed to be transmitted;
inquiring whether the target container has corresponding data or not based on the primary key value, and further acquiring inquiry result information;
determining and executing a target data transmission workflow based on the query result information;
and releasing the locked data transmission process in response to successful execution of the target data transmission workflow.
2. The method of claim 1, wherein the invoking the interface corresponding to the interface identifier to perform the transmission of the data to be transmitted comprises:
And calling the upstream interface and the downstream interface corresponding to the interface identification to transmit the data to be transmitted from the upstream interface to the downstream interface.
3. The method of claim 1, wherein prior to said querying the target container for corresponding data based on the primary key value, the method further comprises:
extracting a downstream interface identifier from the interface identifiers;
and determining a downstream system corresponding to the downstream interface identifier as a target container.
4. The method of claim 1, wherein the determining and executing a target data transfer workflow based on the query result information comprises:
determining an active query workflow as a target data transmission workflow in response to the query result information corresponding to data containing a successful identifier and no primary key value correspondence in the target container;
executing the target data transmission workflow to call an active query interface to acquire missing data;
and inserting the missing data into a database corresponding to the target container.
5. A method as defined in claim 4, wherein inserting the missing data into a database corresponding to the target container comprises:
Matching the missing data with data in a database corresponding to the target container to determine a target position;
and inserting the missing data into the target position.
6. A method as defined in claim 5, wherein the matching the missing data with data in a database corresponding to the target container comprises:
and calculating the similarity between the missing data and the data in the database corresponding to the target container, and then carrying out data matching according to the similarity.
7. The method of claim 1, wherein the determining and executing a target data transfer workflow based on the query result information comprises:
determining the data re-pushing workflow as a target data transmission workflow in response to the query result information corresponding to the failure identifier;
and executing the target transmission workflow to retransmit data and update the query result information until the updated query result information contains a successful identifier.
8. A data transmission apparatus, comprising:
the receiving unit is configured to receive a data transmission request and acquire a corresponding interface identifier and data to be transmitted;
The main key value acquisition unit is configured to call an interface corresponding to the interface identifier so as to execute transmission of the data to be transmitted, and lock a corresponding data transmission process in response to data transmission failure so as to acquire a main key value corresponding to the data which is failed to be transmitted;
the query unit is configured to query whether the target container has corresponding data or not based on the primary key value, and further acquire query result information;
an execution unit configured to determine and execute a target data transmission workflow based on the query result information;
and a lock release unit configured to release the locked data transmission process in response to successful execution of the target data transmission workflow.
9. The apparatus of claim 8, wherein the primary key value acquisition unit is further configured to:
and calling the upstream interface and the downstream interface corresponding to the interface identification to transmit the data to be transmitted from the upstream interface to the downstream interface.
10. The apparatus according to claim 8, further comprising a target container determination unit configured to:
extracting a downstream interface identifier from the interface identifiers;
And determining a downstream system corresponding to the downstream interface identifier as a target container.
11. The apparatus of claim 8, wherein the execution unit is further configured to:
determining an active query workflow as a target data transmission workflow in response to the query result information corresponding to data containing a successful identifier and no primary key value correspondence in the target container;
executing the target data transmission workflow to call an active query interface to acquire missing data;
and inserting the missing data into a database corresponding to the target container.
12. The apparatus of claim 11, wherein the execution unit is further configured to:
matching the missing data with data in a database corresponding to the target container to determine a target position;
and inserting the missing data into the target position.
13. The apparatus of claim 12, wherein the execution unit is further configured to:
and calculating the similarity between the missing data and the data in the database corresponding to the target container, and then carrying out data matching according to the similarity.
14. A data transmission electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-7.
15. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-7.
16. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any of claims 1-7.
CN202310142268.8A 2023-02-21 2023-02-21 Data transmission method, device, electronic equipment and computer readable medium Pending CN116192342A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310142268.8A CN116192342A (en) 2023-02-21 2023-02-21 Data transmission method, device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310142268.8A CN116192342A (en) 2023-02-21 2023-02-21 Data transmission method, device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN116192342A true CN116192342A (en) 2023-05-30

Family

ID=86440053

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310142268.8A Pending CN116192342A (en) 2023-02-21 2023-02-21 Data transmission method, device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN116192342A (en)

Similar Documents

Publication Publication Date Title
CN113711536B (en) Extracting data from a blockchain network
WO2019214312A1 (en) Blockchain-based logistics information transmission method, system and device
CN111163182B (en) Block chain-based device registration method and apparatus, electronic device, and storage medium
CN110879903A (en) Evidence storage method, evidence verification method, evidence storage device, evidence verification device, evidence storage equipment and evidence verification medium
US20190386940A1 (en) Method for providing recording and verification service for data received and transmitted by messenger service, and server using method
US9460307B2 (en) Managing sensitive data in cloud computing environments
US20110167114A1 (en) Automatically synchronizing new contacts across multiple social networking sites
CN110960856B (en) Game data management system, management method and storage medium
CN111460129A (en) Method and device for generating identification, electronic equipment and storage medium
CN105278972A (en) A system and method using a dynamic install package to allow users to fast become friends
US20240012642A1 (en) Providing external access to a processing platform
CN116303608A (en) Data processing method and device for application service
CN113129008B (en) Data processing method, device, computer readable medium and electronic equipment
CN109150898B (en) Method and apparatus for processing information
US9948694B2 (en) Addressing application program interface format modifications to ensure client compatibility
CN116192342A (en) Data transmission method, device, electronic equipment and computer readable medium
CN113704222A (en) Method and device for processing service request
JP5636394B2 (en) Information processing apparatus, information processing method, and program
CN112437052B (en) Method, apparatus, electronic device, and computer-readable medium for processing information
CN110262756B (en) Method and device for caching data
CN112884437B (en) Asset management method and device
CN117076437A (en) Service processing method, device, electronic equipment and computer readable medium
CN117149525A (en) Method, apparatus, device and computer readable medium for data backup
CN117201599A (en) Unified method, device, equipment and medium for multi-element heterogeneous blockchain interactive data
CN116361237A (en) File processing method, device, electronic equipment and storage medium

Legal Events

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