Data transmission method, device, electronic device and computer readable medium
By receiving data transmission requests, obtaining interface identification and data to be transmitted, calling the interface to perform transmission and locking the process, querying whether the target container has corresponding data, determining and executing the target data transmission workflow, solving the problems of low data transmission efficiency and low accuracy in the prior art, and realizing automated and efficient data transmission.
Patent Information
- Application Number
- CN202310142268.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-21
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2043-02-21
AI Technical Summary
The existing data transmission methods are inefficient and have low accuracy, and cannot ensure that data is automatically and completely transmitted to downstream systems. Manual intervention is often required to increase labor and time costs.
By receiving data transmission requests, obtaining interface identification and data to be transmitted, calling the interface to perform transmission, the locking process obtains the primary key value when the response fails, querying whether the target container has corresponding data, determining and executing the target data transmission workflow based on the result information, until it is successful, and the locking process is released.
It saves manpower and time costs for manual inspection and communication, ensures that data is completely pushed to downstream systems, and improves the efficiency and accuracy of data transmission.
Smart Images

Figure CN116192342B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of big data exchange, and in particular to a data transmission method, device, electronic device, and computer-readable medium. Background Art
[0002] In the internet age, various application service systems are no longer isolated and closed. Many systems require data from other systems to process customer business needs, necessitating data exchange between these systems. Actual data exchange can be subject to network fluctuations, downstream system service unavailability, and human error. This makes it impossible to ensure that data is automatically and completely delivered to downstream systems through a single data push interface. Downstream systems often need to manually check for missing data and then notify upstream system personnel to manually re-push the data, increasing labor and time costs and resulting in low data transmission efficiency and accuracy. Summary of the Invention
[0003] In view of this, embodiments of the present application provide a data transmission method, device, electronic device, and computer-readable medium, which can solve the problems of low efficiency and low accuracy of existing data transmission.
[0004] To achieve the above objective, according to one aspect of an embodiment of the present application, a data transmission method is provided, including:
[0005] Receive data transmission request, obtain corresponding interface identifier and data to be transmitted;
[0006] calling an interface corresponding to the interface identifier to execute transmission of the data to be transmitted, and in response to a data transmission failure, locking the corresponding data transmission process to obtain a primary key value corresponding to the data that failed to be transmitted;
[0007] Based on the primary key value, query whether the target container has corresponding data, and then obtain the query result information;
[0008] Based on the query result information, determine and execute the target data transmission workflow;
[0009] In response to the target data transmission workflow being successfully executed, the locked data transmission process is released.
[0010] Optionally, calling an interface corresponding to the interface identifier to execute transmission of the data to be transmitted includes:
[0011] The upstream interface and the downstream interface corresponding to the interface identifier are called to transmit the data to be transmitted from the upstream interface to the downstream interface.
[0012] Optionally, before querying whether the target container has corresponding data based on the primary key value, the data transmission method further includes:
[0013] Extract the downstream interface identifier from the interface identifier;
[0014] The downstream system corresponding to the downstream interface identifier is determined as the target container.
[0015] Optionally, based on the query result information, a target data transmission workflow is determined and executed, including:
[0016] In response to the query result information corresponding to data containing a success identifier and no corresponding primary key value in the target container, determining the active query workflow as the target data transmission workflow;
[0017] Execute the target data transmission workflow to call the active query interface to obtain the missing data;
[0018] Insert the missing data into the database corresponding to the target container.
[0019] Optionally, inserting the missing data into a database corresponding to the target container includes:
[0020] matching the missing data with the data in the database corresponding to the target container to determine the target location;
[0021] Insert the missing data into the target location.
[0022] Optionally, matching the missing data with data in a database corresponding to the target container includes:
[0023] Calculate the similarity between the missing data and the data in the database corresponding to the target container, and then perform data matching based on the similarity.
[0024] Optionally, based on the query result information, a target data transmission workflow is determined and executed, including:
[0025] In response to the query result information corresponding to including a failure identifier, determining the data re-push workflow as the target data transmission workflow;
[0026] The target transfer workflow is executed to retransmit the data and update the query result information until the updated query result information includes a success indicator.
[0027] In addition, the present application also provides a data transmission device, including:
[0028] A receiving unit configured to receive a data transmission request and obtain a corresponding interface identifier and data to be transmitted;
[0029] a primary key value obtaining unit configured to call an interface corresponding to the interface identifier to execute transmission of the data to be transmitted, and in response to a data transmission failure, lock the corresponding data transmission process to obtain a primary key value corresponding to the data that failed to be transmitted;
[0030] A query unit is configured to query whether a target container has corresponding data based on the primary key value, and then obtain query result information;
[0031] an execution unit, configured to determine and execute a target data transmission workflow based on the query result information;
[0032] The lock releasing unit is configured to release the locked data transmission process in response to the target data transmission workflow being successfully executed.
[0033] Optionally, the primary key value obtaining unit is further configured to:
[0034] The upstream interface and the downstream interface corresponding to the interface identifier are called to transmit the data to be transmitted from the upstream interface to the downstream interface.
[0035] Optionally, the apparatus further includes a target container determining unit configured to:
[0036] Extract the downstream interface identifier from the interface identifier;
[0037] The downstream system corresponding to the downstream interface identifier is determined as the target container.
[0038] Optionally, the execution unit is further configured to:
[0039] In response to the query result information corresponding to data containing a success identifier and no corresponding primary key value in the target container, determining the active query workflow as the target data transmission workflow;
[0040] Execute the target data transmission workflow to call the active query interface to obtain the missing data;
[0041] Insert the missing data into the database corresponding to the target container.
[0042] Optionally, the execution unit is further configured to:
[0043] matching the missing data with the data in the database corresponding to the target container to determine the target location;
[0044] Insert the missing data into the target location.
[0045] Optionally, the execution unit is further configured to:
[0046] Calculate the similarity between the missing data and the data in the database corresponding to the target container, and then perform data matching based on the similarity.
[0047] Optionally, the execution unit is further configured to:
[0048] In response to the query result information corresponding to including a failure identifier, determining the data re-push workflow as the target data transmission workflow;
[0049] The target transfer workflow is executed to retransmit the data and update the query result information until the updated query result information includes a success indicator.
[0050] In addition, the present application also provides a data transmission electronic device, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the one or more processors implement the data transmission method as described above.
[0051] In addition, the present application also provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the data transmission method as described above is implemented.
[0052] To achieve the above objective, according to another aspect of the embodiments of the present application, a computer program product is provided.
[0053] A computer program product according to an embodiment of the present application includes a computer program, which implements the data transmission method provided by the embodiment of the present application when the program is executed by a processor.
[0054] One embodiment of the above invention has the following advantages or beneficial effects: the application receives a data transmission request, obtains a corresponding interface identifier and the data to be transmitted; calls the interface corresponding to the interface identifier to execute the transmission of the data to be transmitted; in response to a data transmission failure, locks the corresponding data transmission process to obtain the primary key value corresponding to the data that failed to be transmitted; queries the target container based on the primary key value to determine whether there is corresponding data, thereby obtaining query result information; and determines and executes the target data transmission workflow based on the query result information. This saves the manpower and time costs of manual inspection and communication, ensures that data is pushed to downstream systems completely and accurately, and improves the efficiency and accuracy of data transmission.
[0055] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings are provided to facilitate a better understanding of the present application and do not constitute an undue limitation on the present application.
[0057] Figure 1 is a schematic diagram of the main process of a data transmission method according to an embodiment of the present application;
[0058] Figure 2 is a schematic diagram of the main process of a data transmission method according to an embodiment of the present application;
[0059] Figure 3 This is a schematic diagram of the main flow of a data transmission method according to an embodiment of the present application;
[0060] Figure 4 This is a schematic diagram of the main flow of a data transmission method according to an embodiment of the present application;
[0061] Figure 5 This is a schematic diagram of the main flow of a data transmission method according to an embodiment of the present application;
[0062] Figure 6 is a schematic diagram of main units of a data transmission device according to an embodiment of the present application;
[0063] Figure 7 is an exemplary system architecture diagram to which embodiments of the present application may be applied;
[0064] Figure 8 It is a structural diagram of a computer system of a terminal device or server suitable for implementing an embodiment of the present application. DETAILED DESCRIPTION
[0065] The following describes exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, and should be considered as merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description. It should be noted that in the technical solution of the present application, the collection, analysis, use, transmission, storage, etc. of user personal information involved are in compliance with the provisions of relevant laws and regulations, are used for legal and reasonable purposes, are not shared, disclosed or sold outside of these legal uses, and are subject to supervision and management by regulatory authorities. Necessary measures should be taken for user personal information to prevent illegal access to such personal information data, ensure that persons with access to personal information data comply with the provisions of relevant laws and regulations, and ensure the security of user personal information. Once these user personal information data are no longer needed, the risks should be minimized by restricting or even prohibiting data collection and / or deleting the data.
[0066] When used, including in certain related applications, protect user privacy by de-identifying data, such as by removing specific identifiers when used, controlling the amount or specificity of stored data, controlling how data is stored, and / or other de-identification methods.
[0067] Figure 1 is a schematic diagram of the main process of the data transmission method according to an embodiment of the present application, such as Figure 1 As shown, the data transmission method includes:
[0068] Step S101: receiving a data transmission request and obtaining a corresponding interface identifier and data to be transmitted.
[0069] In this embodiment, the execution entity of the data transmission method (e.g., a server) can receive a data transmission request via a wired or wireless connection. For example, a data transmission request can be 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 requires the data. The upstream system is called the upstream system, and the downstream system is called the downstream system.
[0070] After receiving the data transmission request, the execution subject can obtain the corresponding interface identifier. The interface identifier can be the interface number or interface name at the junction of the upstream and downstream systems. The embodiment of this application does not specifically limit the interface identifier. Interface: An agreement for interaction between systems, including communication protocols and communication message formats. The interface can be understood as a data template and channel with an agreed format. The caller sends the data into the channel in the agreed format, and the recipient can receive the requested data.
[0071] The data to be transmitted may be, for example, the online signing and filing contract data of the upstream housing transaction system. The embodiment of the present application does not specifically limit the content of the data to be transmitted.
[0072] Step S102: calling the interface corresponding to the interface identifier to execute the transmission of the data to be transmitted. In response to a data transmission failure, locking the corresponding data transmission process to obtain a primary key value corresponding to the data that failed to be transmitted.
[0073] The primary key value corresponding to the data that fails to be transmitted may be, for example, the contract ID.
[0074] By locking the corresponding data transmission process when data transmission fails, erroneous data output can be avoided and the correctness of data transmission can be guaranteed.
[0075] Step S103: query whether the target container has corresponding data based on the primary key value, and then obtain query result information.
[0076] 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 identifier; and determining a downstream system corresponding to the downstream interface identifier as the target container.
[0077] Query the data stored in the target container to see whether there is a primary key value corresponding to the data that failed to be transmitted, such as the contract ID. If so, return data transmission success information including a success indicator; if not, return data transmission failure information including a failure indicator.
[0078] Step S104: determining and executing the target data transmission workflow based on the query result information.
[0079] Specifically, based on the query result information, the target data transmission workflow is determined and executed, including: in response to the query result information corresponding to a failure identifier, the data re-push workflow is determined as the target data transmission workflow; the target transmission workflow is executed to retransmit the data and update the query result information until the updated query result information includes a success identifier.
[0080] The data re-push workflow is used to re-transfer data from an upstream system to a downstream system. If, after executing the data re-push workflow, the data corresponding to the primary key value is still not found in the downstream system (i.e., the target container), the data transfer was not successful. The data re-push workflow is executed again until the data corresponding to the primary key value is found in the downstream system.
[0081] S105 : In response to the target data transmission workflow being successfully executed, releasing the locked data transmission process.
[0082] When the target data transmission workflow is successfully executed, it indicates that the exceptions generated during the data transmission process have been processed and the locked data transmission process can be released so that other processes can access the data at any time.
[0083] This embodiment receives a data transmission request, obtains the corresponding interface identifier and the data to be transmitted, calls the interface corresponding to the interface identifier to execute the transmission of the data to be transmitted, and in response to a data transmission failure, locks the corresponding data transmission process to obtain the primary key value corresponding to the data that failed to be transmitted; based on the primary key value, queries the target container for corresponding data and obtains query result information; based on the query result information, determines and executes the target data transmission workflow; and in response to the successful execution of the target data transmission workflow, releases the locked data transmission process. This saves the manpower and time costs of manual inspection and communication, ensures that data is pushed to the downstream system intact and without error, and improves the efficiency and accuracy of data transmission.
[0084] Figure 2 FIG. 1 is a schematic diagram of a main flow chart of a data transmission method according to an embodiment of the present application. Figure 2 As shown, the data transmission method includes:
[0085] Step S201: receiving a data transmission request, and obtaining a corresponding interface identifier and data to be transmitted.
[0086] After receiving a data transmission request, the executing entity can obtain the corresponding interface identifier. This interface identifier can be, for example, the interface number or interface name at the interface between the upstream and downstream systems. This embodiment of the application does not specifically limit the interface identifier. The data to be transmitted can, for example, be the system operation log data of the upstream system. This embodiment of the application does not specifically limit the content of the data to be transmitted.
[0087] Step S202: calling the upstream interface and the downstream interface corresponding to the interface identifier to transmit the data to be transmitted from the upstream interface to the downstream interface. In response to a data transmission failure, obtaining a primary key value corresponding to the data that failed to be transmitted.
[0088] An upstream interface corresponding to an interface identifier may correspond to one or more downstream interfaces. The embodiment of the present application does not specifically limit the number of downstream interfaces to which an upstream interface may correspond. When an upstream interface corresponds to multiple downstream interfaces, it indicates that the data to be transmitted needs to be transmitted to multiple downstream systems. If the downstream system does not receive the data to be transmitted and needs to verify whether the data transmission is successful, it is necessary to call multiple downstream systems to query the primary key value corresponding to the data to be transmitted to determine whether the data corresponding to the primary key value has been stored in multiple downstream systems.
[0089] Step S203: query whether the target container has corresponding data based on the primary key value, and then obtain query result information.
[0090] According to the primary key value, one or more corresponding downstream systems (ie, one or more corresponding target containers) are called to query whether there is data corresponding to the primary key value, and then query result information of one or more downstream systems is obtained.
[0091] Step S204: determining and executing the target data transmission workflow based on the query result information.
[0092] Call one or more downstream systems whose query result information contains a failure indicator, execute the data re-push workflow until all the returned query result information contains a success indicator, and then terminate the data transmission process. This ensures the success rate of data transmission.
[0093] Step S205 : In response to the target data transmission workflow being successfully executed, releasing the locked data transmission process.
[0094] When the target data transmission workflow is successfully executed, the locked data transmission process can be released to allow the processes to access data from each other, thereby improving the data transmission rate.
[0095] Figure 3 FIG. 1 is a schematic diagram of a main flow chart of a data transmission method according to an embodiment of the present application. Figure 3As shown, the data transmission method includes:
[0096] Step S301: Receive a data transmission request and obtain a corresponding interface identifier and data to be transmitted.
[0097] The data transmission request may also be a request to transmit the employee's performance data to the approval system. The embodiment of the present application does not specifically limit the content of the data transmission request.
[0098] For example, after receiving the data transmission request, the execution entity may obtain the interface identifier of the interface between the downstream approval system and the upstream system, locate the corresponding interface according to the interface identifier, and call the interface to execute the transmission of the data to be transmitted.
[0099] Step S302: call the upstream interface and downstream interface corresponding to the interface identifier to transmit the data to be transmitted from the upstream interface to the downstream interface. In response to data transmission failure, lock the corresponding data transmission process to obtain the primary key value corresponding to the data that failed to be transmitted.
[0100] An interface identifier can correspond to multiple upstream interfaces, but only one downstream interface. In other words, the upstream and downstream interfaces in an interface identifier can have a many-to-one relationship. For example, performance data for multiple employees can be sent to the downstream system corresponding to the same downstream interface based on the corresponding relationship between upstream and downstream interfaces.
[0101] When data transmission fails, the corresponding data transmission process is locked to avoid providing erroneous data when interacting with other processes, ensuring the accuracy of data transmission, and obtaining the primary key values corresponding to the data to be transmitted from each upstream interface to verify whether the data transmission is successful based on each primary key value.
[0102] Step S303: query whether the target container has corresponding data based on the primary key value, and then obtain query result information.
[0103] For example, there can be multiple primary key values. From the data stored in the downstream system (that is, the target container), it is checked whether the primary key values corresponding to the data to be transmitted from the upstream system exist. If they all exist, the query result information with a success mark is returned to each upstream system; if one primary key value does not exist, the query result information with a failure mark is returned to the upstream system corresponding to the non-existent primary key value, and then the query result information with a success mark is returned to the upstream system corresponding to the existing primary key value.
[0104] Step S304 : in response to the query result information corresponding to the data containing a success identifier and the absence of data corresponding to the primary key value in the target container, the active query workflow is determined as the target data transmission workflow.
[0105] For example, a downstream system returns a success indicator (i.e., a status code of zero), but due to internal reasons of the downstream system itself, such as code logic problems or human error, the pushed data is deleted, resulting in the data not being successfully stored in the database. Therefore, the housing transaction system (i.e., the upstream system) provides an interface for external systems to actively query related data. When the query result information corresponds to data that contains a success indicator and no corresponding primary key value in the target container, it is necessary to call the active query interface, identify the active query workflow as the target data transmission workflow, and execute it.
[0106] Step S305: executing the target data transmission workflow to call the active query interface to obtain the missing data.
[0107] The downstream system can call the active query interface provided by the upstream system to execute the target data transmission workflow (i.e., actively query the salary flow) to actively query the relevant data of the housing transaction system and insert the missing data found in the query into its own database system.
[0108] Step S306: insert the missing data into the database corresponding to the target container.
[0109] Specifically, inserting the missing data into the database corresponding to the target container includes: matching the missing data with data in the database corresponding to the target container to determine the target location; and inserting the missing data into the target location.
[0110] Specifically, matching the missing data with the data in the database corresponding to the target container includes calculating the similarity between the missing data and the data in the database corresponding to the target container, and then performing data matching based on the similarity.
[0111] By calculating the similarity of data content, the missing data is matched with the stored data in the database corresponding to the target container to determine the insertion target position of the missing data, and then the missing data is inserted into the target position to complete the overall data transmission and improve the success rate of data transmission.
[0112] Step S307: In response to the target data transmission workflow being successfully executed, the locked data transmission process is released to allow data between processes to be accessed.
[0113] Figure 4 This is a schematic diagram of the main flow of a data transmission method according to an embodiment of the present application. The data transmission method of the embodiment of the present application is applied to the scenario of transmitting data from an upstream system to a downstream system. In order to ensure the security of data interaction, the message can be encrypted and decrypted; in order to verify the transaction initiator, the message can be signed and verified. When the upstream and downstream negotiate the push rules, the upstream system is the main one, and the downstream external system is the collaborator. The specific rules are as follows:
[0114] When a downstream external system is the caller, it connects according to the agreed-upon unified standards. The upstream external system assigns an app_id. When calling the upstream service, the downstream external system generates a signature based on the signature rules, which is then verified by the upstream system.
[0115] When the downstream external system acts as a service provider, it must provide services according to the same agreed standard interface. Each downstream external system uses the app_id assigned by the upstream system. When the upstream system calls the downstream service, it generates a signature according to the signature rules, and the signature is verified on the downstream external system side. Figure 4 As shown:
[0116] 1) Generate appId: assigned by the upstream system;
[0117] 2) Generate the request parameter strJson: Map type request parameter, convert it into a String string in json format, determine whether the request parameter is encrypted, if so, use the block cipher algorithm SM4 to encrypt strJson and execute the signing (adding signature) step in 3), if not, directly execute the signing step in 3);
[0118] 3) Generate the signature field signStr: Specifically, use appId + strJson + timestamp to generate the signature field signStr. Specifically, appId: The unique identifier of the external system, assigned by the housing transaction system. Timestamp: The current system timestamp, required for signing. strJson: The JSON message string organized according to the specific business interface, assigned to str. sign: The signature string of the request parameter. If the input parameter needs to be encrypted and signed, the string strJson needs to be encrypted using the block cipher algorithm SM4 before signing.
[0119] The standard format design of the interface message in the embodiment of this application is as follows:
[0120] Request message format: The request message is in JSON format and includes four parameters. strJson is the business data information to be pushed. Encryption and signing are also performed on this parameter.
[0121] Response message format: The response message is in JSON format and includes three parameters. The code field is particularly important because the housing transaction system uses the code value in the response message returned by the downstream system to determine whether the data push was successful and store the status in the database. code: The response code; 0 indicates success, and any other value indicates failure.
[0122] Figure 5 It is a main flow chart of a data transmission method according to an embodiment of the present application.
[0123] Take the example of pushing the online signing and filing contract data of the upstream housing transaction system to the downstream external system. In actual production, there will be some reasons such as network fluctuations, unavailability of downstream system services, and misoperation, which make it impossible to ensure that the data is delivered to the downstream system completely and accurately through a single data push interface. In order to ensure that the relevant data of the upstream housing transaction system is successfully and completely delivered to the downstream external system with as little human intervention as possible, the housing transaction system and the downstream external system need to cooperate through the interface HTM / API and the housing transaction external liaison subsystem to implement three interfaces (for example, including ① active data push interface, ② resettlement housing query interface, and ③ downstream system query interface) to call services, such as Figure 5 As shown: Upstream Active Data Push Interface: The upstream housing transaction system is the caller, and the downstream external system is the service provider. The housing transaction system and the downstream external system negotiate to determine the business data information to be pushed. The housing transaction external liaison subsystem defines a standard external liaison interface; the downstream external system provides services based on the housing transaction external liaison subsystem's standard interface. The housing transaction external liaison subsystem actively pushes data to downstream external systems through the push data interface. For example, it pushes online signing and filing contract information to downstream real estate systems, leasing systems, tax systems, and maintenance fund systems. This interface requires the downstream external system to develop and provide services in accordance with the housing transaction external liaison subsystem interface standard.
[0124] ① The standard specifications for the active data push interface are as follows, taking the real estate transaction system pushing the online signing and filing contract as an example.
[0125] 1) Interface name: Online signing and filing contract information push interface
[0126] The calling address of the interface service provided by the downstream external system:
[0127] http: / / xx.xx.xx.xx:port / Interface path. The downstream external system needs to provide the specific calling address of the interface IP, port, and interface path.
[0128] 2) Interface Description
[0129] The housing transaction system proactively pushes online signing and filing contract information data to the downstream external system, and the external system develops an interface service to receive the data; the external system returns a response message to the housing transaction system, and the housing transaction system determines whether the data push is successful based on the response code value in the response message. If the response code value is 0, the data push is considered successful, otherwise it is a failure, and the push success or failure status is stored in the database.
[0130] ②Data query interface provided by upstream
[0131] The housing transaction system is the service provider, and the downstream system is the caller. Due to network fluctuations, unavailability of downstream system services, and other reasons, the active data push interface of the housing transaction system fails to push data. The housing transaction system can determine whether the data has been pushed to the downstream system based on the status code value in the return message of the downstream system. As long as the status code value is non-zero, the housing transaction system can push the data again. However, there is a case where the downstream system returns a success flag (that is, the status code is zero), and due to internal reasons of the downstream system itself, such as code logic problems or human error, the pushed data is deleted, resulting in the data not being successfully stored in the database. Therefore, the housing transaction system provides an interface for external systems to actively query relevant data. The downstream system can actively query the relevant data of the housing transaction system and insert the missing data found into the database system of the downstream system.
[0132] The standard specifications for the data query interface provided by housing transactions are as follows, taking the online signing and filing contract query provided by the housing transaction system as an example.
[0133] 1) Interface name: Housing transaction online signing and filing contract information query
[0134] The calling address of the interface service provided by the upstream housing transaction system:
[0135] http: / / xx.xx.xx.xx:port / interface path
[0136] 2) Interface Description
[0137] The housing transaction system development interface provides a query service for online signing contracts on a daily basis. External systems can call this interface according to the agreed message format to query the online signing data of the day and save the data as needed.
[0138] ③ Downstream system side - provided data query interface
[0139] The downstream system provides the housing transaction system with a data query interface, allowing the system to query the downstream system for data it has or has not acquired based on the primary key. Interfaces ① and ③ are used together. After the housing transaction system initiates a data push, it records the push result in the database based on the response code value in the received return message. Due to network or downstream system issues, some data push may fail. The housing transaction system retrieves the primary key value of the data in the database indicating the push failed and queries the downstream system. If the query finds corresponding data in the downstream system, the push status in the database is directly updated. If no data is found, it indicates that the previous push was unsuccessful, and a new push is initiated.
[0140] Take the example of the housing transaction system pushing the online signing and filing contract.
[0141] 1) Interface name: Data query interface provided by the downstream system side
[0142] The calling address of the interface service provided by the downstream external system:
[0143] http: / / xx.xx.xx.xx:port / Interface path. The downstream external system needs to provide the specific calling address of the interface IP, port, and interface path.
[0144] 2) Interface Description
[0145] The downstream system provides an interface for querying existing or unacquired contract data for the housing transaction system. If data corresponding to the primary key is found in the downstream system, the response code in the returned message will be zero. Any other code indicates that no contract information corresponding to the primary key exists in the downstream system.
[0146] Housing transaction system cooperation Figure 5 The use of interfaces ① and ③ in the above can ensure the accuracy of the data push status recorded in your own database. At the same time, if the downstream system makes an error operation and accidentally deletes the received data, you can also use Figure 5 Interface ② in the system actively queries the data of the housing transaction system and inserts it into its own database.
[0147] In this embodiment of the application, based on the existing active push data interface, the downstream system provides a query interface for the upstream system to query the database for data showing push failures. If the query is successful, it means that the push has actually been successful, and the push status in the downstream system database is updated; if the query fails, the contract information is pushed again. Figure 5 Based on the two interfaces ① and ③ in the above, the upstream system provides another one such as Figure 5 Interface ②, shown for downstream system queries, is used to compensate for the need to manually notify upstream system personnel to re-push data. A push solution using these three interfaces saves the manpower and time costs of manual inspection and communication, ensuring that data is pushed to downstream systems intact and without error.
[0148] The embodiments of the present application enable the upstream system to automatically check and re-push data that has failed to be pushed, while the downstream system can also proactively query the upstream system for data. This saves the manpower and time costs of manual checking and communication, and ensures that data is pushed to the downstream system intact and without error.
[0149] Figure 6 Schematic diagram of the main units of the data transmission device according to the embodiment of the present application. Figure 6 As shown, the data transmission device 600 includes a receiving unit 601 , a primary key value obtaining unit 602 , a query unit 603 and an execution unit 604 .
[0150] The receiving unit 601 is configured to receive a data transmission request and obtain a corresponding interface identifier and data to be transmitted.
[0151] The primary key value obtaining unit 602 is configured to call the interface corresponding to the interface identifier to execute the transmission of the data to be transmitted, and in response to a data transmission failure, lock the corresponding data transmission process to obtain the primary key value corresponding to the data that failed to be transmitted.
[0152] The query unit 603 is configured to query whether the target container has corresponding data based on the primary key value, and then obtain query result information.
[0153] The execution unit 604 is configured to determine and execute the target data transmission workflow based on the query result information.
[0154] The lock releasing unit 605 is configured to release the locked data transmission process in response to the target data transmission workflow being successfully executed.
[0155] In some embodiments, the primary key value obtaining unit 602 is further configured to: call the upstream interface and the downstream interface corresponding to the interface identifier to transmit the data to be transmitted from the upstream interface to the downstream interface.
[0156] In some embodiments, the data transmission device further includes Figure 6 The target container determination unit (not shown) is configured to: extract the downstream interface identifier from the interface identifier; and determine the downstream system corresponding to the downstream interface identifier as the target container.
[0157] In some embodiments, the execution unit 604 is further configured to: in response to the query result information corresponding to data containing a success identifier and no corresponding primary key value in the target container, determine the active query workflow as the target data transmission workflow; execute the target data transmission workflow to call the active query interface to obtain the missing data; and insert the missing data into the database corresponding to the target container.
[0158] In some embodiments, the execution unit 604 is further configured to: match the missing data with data in a database corresponding to the target container to determine a target location; and insert the missing data into the target location.
[0159] In some embodiments, the execution unit 604 is further configured to calculate the similarity between the missing data and the data in the database corresponding to the target container, and then perform data matching based on the similarity.
[0160] In some embodiments, the execution unit 604 is further configured to: in response to the query result information corresponding to a failure identifier, determine the data re-push workflow as the target data transmission workflow; execute the target transmission workflow to retransmit the data and update the query result information until the updated query result information includes a success identifier.
[0161] It should be noted that the data transmission method and data transmission device of the present application have a corresponding relationship in terms of specific implementation content, so the repeated content will not be explained again.
[0162] Figure 7 An exemplary system architecture 700 is shown to which the data transmission method or data transmission apparatus according to the embodiments of the present application may be applied.
[0163] like Figure 7 As shown, system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. Network 704 is used to provide a medium for communication links between terminal devices 701, 702, 703 and server 705. Network 704 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0164] Users can use terminal devices 701, 702, and 703 to interact with server 705 via network 704 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 701, 702, and 703, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0165] The terminal devices 701 , 702 , and 703 may be various electronic devices having a data transmission processing screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0166] Server 705 can be a server that provides various services, such as a background management server that provides support for data transmission requests submitted by users using terminal devices 701, 702, and 703 (for example only). The background management server can receive data transmission requests, obtain the corresponding interface identifier and the data to be transmitted; call the interface corresponding to the interface identifier to execute the transmission of the data to be transmitted; in response to a data transmission failure, lock the corresponding data transmission process to obtain the primary key value corresponding to the data that failed to be transmitted; query the target container based on the primary key value to see if there is corresponding data, and then obtain the query result information; based on the query result information, determine and execute the target data transmission workflow. This saves the manpower and time costs of manual inspection and communication, ensures that the data is pushed to the downstream system intact and without error, and improves the efficiency and accuracy of data transmission.
[0167] It should be noted that the data transmission method provided in the embodiment of the present application is generally executed by the server 705, and accordingly, the data transmission device is generally set in the server 705.
[0168] It should be understood that Figure 7 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0169] Reference below Figure 8 , which shows a structural diagram of a computer system 800 of a terminal device suitable for implementing an embodiment of the present application. Figure 8 The terminal device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0170] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which 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 unit 808 into a random access memory (RAM) 803. Various programs and data required for the operation of the computer system 800 are also stored in the RAM 803. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0171] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, and the like; an output section 807 including displays such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card or a modem. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. Removable media 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like, is installed in the drive 810 as needed, so that computer programs read therefrom can be installed into the storage section 808 as needed.
[0172] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 809, and / or installed from a removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, the above-mentioned functions defined in the system of the present application are executed.
[0173] It should be noted that the computer-readable medium described in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. Computer-readable storage media can include, for example, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this application, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.
[0174] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0175] The units involved in the embodiments described in this application can be implemented by software or hardware. The units described can also be set in a processor. For example, it can be described as: a processor includes a receiving unit, a primary key value acquisition unit, a query unit, and an execution unit. In some cases, the names of these units do not constitute limitations on the units themselves.
[0176] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device receives a data transmission request, obtains a corresponding interface identifier and the data to be transmitted; calls the interface corresponding to the interface identifier to perform the transmission of the data to be transmitted; in response to a data transmission failure, locks the corresponding data transmission process to obtain the primary key value corresponding to the data that failed to be transmitted; queries the target container based on the primary key value to see if there is corresponding data, and then obtains query result information; and based on the query result information, determines and executes the target data transmission workflow.
[0177] The computer program product of the present application includes a computer program, and when the computer program is executed by a processor, it implements the data transmission method in the embodiment of the present application.
[0178] According to the technical solution of the embodiment of the present application, the manpower and time costs of manual inspection and communication are saved, ensuring that the data is pushed to the downstream system completely and accurately, and improving the efficiency and accuracy of data transmission.
[0179] The above specific embodiments do not constitute a limitation on the scope of protection of this application. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application shall be included within the scope of protection of this application.
Claims
1. A data transmission method, characterized in that: include: Receive data transmission request, obtain corresponding interface identifier and data to be transmitted; calling the interface corresponding to the interface identifier to execute transmission of the data to be transmitted, and in response to a data transmission failure, locking the corresponding data transmission process to obtain a primary key value corresponding to the data that failed to be transmitted; Based on the primary key value, query whether the target container has corresponding data, thereby obtaining query result information; wherein, 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 identifier; and determining the downstream system corresponding to the downstream interface identifier as the target container; Determining and executing a target data transmission workflow based on the query result information includes: in response to the query result information corresponding to a success identifier and the target container having no data corresponding to the primary key value, determining the active query workflow as the target data transmission workflow; executing the target data transmission workflow to call the active query interface to obtain missing data; inserting the missing data into a database corresponding to the target container; in response to the query result information corresponding to a failure identifier, determining the data re-push workflow as the target data transmission workflow; executing the target data transmission workflow to retransmit data and update the query result information until the updated query result information includes a success identifier; In response to the target data transmission workflow being successfully executed, the locked data transmission process is released.
2. The method according to claim 1, characterized in that The calling of the interface corresponding to the interface identifier to execute the transmission of the data to be transmitted includes: The upstream interface and the downstream interface corresponding to the interface identifier are called to transmit the data to be transmitted from the upstream interface to the downstream interface.
3. The method according to claim 1, characterized in that Inserting the missing data into a database corresponding to the target container includes: matching the missing data with data in a database corresponding to the target container to determine the target location; The missing data is inserted into the target location.
4. The method according to claim 3, characterized in that The matching of the missing data with the data in the database corresponding to the target container includes: The similarity between the missing data and the data in the database corresponding to the target container is calculated, and then data matching is performed based on the similarity.
5. A data transmission device, characterized in that: include: A receiving unit configured to receive a data transmission request and obtain a corresponding interface identifier and data to be transmitted; a primary key value obtaining unit configured to call the interface corresponding to the interface identifier to perform transmission of the data to be transmitted, and in response to a data transmission failure, lock the corresponding data transmission process to obtain a primary key value corresponding to the data that failed to be transmitted; The query unit is configured to query whether the target container has corresponding data based on the primary key value, and thereby obtain query result information; wherein, 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 identifier; and determining a downstream system corresponding to the downstream interface identifier as the target container; An execution unit is configured to determine and execute a target data transmission workflow based on the query result information, including: in response to the query result information corresponding to a success identifier and the target container having no data corresponding to the primary key value, determining the active query workflow as the target data transmission workflow; executing the target data transmission workflow to call the active query interface to obtain missing data; inserting the missing data into a database corresponding to the target container; in response to the query result information corresponding to a failure identifier, determining the data re-push workflow as the target data transmission workflow; executing the target data transmission workflow to retransmit data and update the query result information until the updated query result information includes a success identifier; The lock releasing unit is configured to release the locked data transmission process in response to the target data transmission workflow being successfully executed.
6. The device according to claim 5, characterized in that The primary key value obtaining unit is further configured to: The upstream interface and the downstream interface corresponding to the interface identifier are called to transmit the data to be transmitted from the upstream interface to the downstream interface.
7. The device according to claim 5, characterized in that The execution unit is further configured to: matching the missing data with data in a database corresponding to the target container to determine the target location; The missing data is inserted into the target location.
8. The device according to claim 7, characterized in that The execution unit is further configured to: The similarity between the missing data and the data in the database corresponding to the target container is calculated, and then data matching is performed based on the similarity.
9. A data transmission electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.
10. A computer-readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
11. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Media access control method for wireless mesh network based on network coding
CN103957085A
UDP-based data transmission rate self-adaption method in wireless network environment
CN109451541A