Data export method and device, computer device and storage medium

CN116760820BActive Publication Date: 2026-09-08INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310876701.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-17
Publication Date
2026-09-08
Estimated Expiration
2043-07-17

AI Technical Summary

Technical Problem

[0002]在金融系统的上下游交互中,报文交互作为最常使用的方式之一,当出现紧急情况时,例如系统故障等,文件无法正常传输导致正常交易无法及时处理,需要人工去将未正常发送的报文发送给使用方,在这种场景下,传统的报文数据导出方法存在应急处理效率低的问题

Benefits of technology

[0047] The aforementioned data export method, apparatus, computer equipment, storage medium, and computer program product, upon receiving a message transmission failure message from the message receiving end, reads the database address and username information from the configuration file; connects to the database based on the database address and username information; if the database connection is successful, obtains a message query command; executes the message query command to search for the message to be exported in the database; and exports the message to be exported to an export file, which is used by the message receiving end to retrieve the message to be exported from the export file. This scheme, after a message transmission failure, can connect to the database by reading the database information in the configuration file, and then automatically query the message to be exported from the database and export it to the export file. This ensures that messages are automatically exported to the export file in the event of transmission failure, allowing the message receiving end to obtain the failed message data in a timely manner, thus improving the efficiency of emergency message processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116760820B_ABST
    Figure CN116760820B_ABST
Patent Text Reader

Abstract

The application relates to a data export method and device, computer equipment, a storage medium and a computer program product, which can be used in the field of financial technology or other related fields. The method comprises the following steps: in the case that a message sending failure message sent by a message receiving end is received, reading database address and username information in a configuration file; connecting a database according to the database address and the username information; in the case that the database connection is successful, obtaining a message query command; executing the message query command to query the to-be-exported message in the database; and exporting the to-be-exported message to an export file, and the export file is used for the message receiving end to obtain the to-be-exported message from the export file. The method can improve the emergency processing efficiency of the message.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of message data processing technology, and in particular to a data export method, apparatus, computer equipment, storage medium, and computer program product. Background Technology

[0002] In the upstream and downstream interactions of the financial system, message exchange is one of the most frequently used methods. In case of emergencies, such as system failures, files cannot be transmitted normally, which prevents normal transactions from being processed in a timely manner. It is necessary to manually send the messages that have not been sent normally to the users. In this scenario, traditional message data export methods have the problem of low efficiency in emergency processing. Summary of the Invention

[0003] Therefore, it is necessary to provide a data export method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the efficiency of emergency message processing in response to the above-mentioned technical problems.

[0004] Firstly, this application provides a data export method. The method includes:

[0005] If a message transmission failure message is received from the message receiver, the database address and username information in the configuration file are read.

[0006] Connect to the database based on the database address and username information;

[0007] If the database connection is successful, obtain the message query command; execute the message query command to search for the message to be exported in the database;

[0008] Export the message to be exported to the export file. The export file is used by the message receiving end to retrieve the message to be exported from the export file.

[0009] In one embodiment, obtaining the message query command includes:

[0010] Receive message query requests sent by the message receiver. The message query request carries the message type and message status entered by the target object at the message receiver.

[0011] Generate a message query command based on the message type and message status.

[0012] In one embodiment, exporting the message to be exported to an export file includes:

[0013] Obtain the message type of the message to be exported;

[0014] Determine the target export path that matches the message type from the configuration file;

[0015] Export the messages to be exported to the export file according to the target export path.

[0016] In one embodiment, the fields in the exported file include a data type field and a data field; after exporting the message to be exported to the exported file, the method further includes:

[0017] Iterate through the input types of each data type field in the exported file;

[0018] If any data type field belongs to a required input type, determine whether the current data field corresponding to the current data type field is empty;

[0019] If the current data field is not empty, determine whether the current data field is within the preset value range; if the current data field is within the preset value range, obtain the verification file, and send the exported file and the verification file to the message receiver; the verification file is used by the message receiver to perform integrity verification on the received exported file.

[0020] In one embodiment, sending the exported file and the verification file to the message receiver includes:

[0021] Read the encryption instructions from the configuration file;

[0022] If the encryption command indicates that encryption is not required, the exported file and the verification file will be sent to the message receiving end.

[0023] When encryption is required by the encryption command, read the encryption key path in the configuration file; use the key file under the encryption key path to encrypt the exported file to obtain the encrypted exported file; send the encrypted exported file and the verification file to the message receiving end.

[0024] In one embodiment, the data export method further includes:

[0025] If the current data field is empty, or if the current data field is not within the preset value range, re-execute the step of exporting the message to be exported to the export file;

[0026] After re-execution a preset number of times, if the current data field is empty or not within the preset value range, stop executing the step of exporting the message to be exported to the export file and output an export failure message.

[0027] Secondly, this application also provides a data export apparatus. The apparatus includes:

[0028] The reading module is used to read the database address and username information from the configuration file when a message transmission failure message is received from the message receiver.

[0029] The connection module is used to connect to the database based on the database address and username information;

[0030] The query module is used to obtain the message query command when the database connection is successful; execute the message query command to query the message to be exported in the database;

[0031] The export module is used to export the messages to be exported to an export file. The export file is used by the message receiving end to retrieve the messages to be exported from the export file.

[0032] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0033] If a message transmission failure message is received from the message receiver, the database address and username information in the configuration file are read.

[0034] Connect to the database based on the database address and username information;

[0035] If the database connection is successful, obtain the message query command; execute the message query command to search for the message to be exported in the database;

[0036] Export the message to be exported to the export file. The export file is used by the message receiving end to retrieve the message to be exported from the export file.

[0037] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0038] If a message transmission failure message is received from the message receiver, the database address and username information in the configuration file are read.

[0039] Connect to the database based on the database address and username information;

[0040] If the database connection is successful, obtain the message query command; execute the message query command to search for the message to be exported in the database;

[0041] Export the message to be exported to the export file. The export file is used by the message receiving end to retrieve the message to be exported from the export file.

[0042] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0043] If a message transmission failure message is received from the message receiver, the database address and username information in the configuration file are read.

[0044] Connect to the database based on the database address and username information;

[0045] If the database connection is successful, obtain the message query command; execute the message query command to search for the message to be exported in the database;

[0046] Export the message to be exported to the export file. The export file is used by the message receiving end to retrieve the message to be exported from the export file.

[0047] The aforementioned data export method, apparatus, computer equipment, storage medium, and computer program product, upon receiving a message transmission failure message from the message receiving end, reads the database address and username information from the configuration file; connects to the database based on the database address and username information; if the database connection is successful, obtains a message query command; executes the message query command to search for the message to be exported in the database; and exports the message to be exported to an export file, which is used by the message receiving end to retrieve the message to be exported from the export file. This scheme, after a message transmission failure, can connect to the database by reading the database information in the configuration file, and then automatically query the message to be exported from the database and export it to the export file. This ensures that messages are automatically exported to the export file in the event of transmission failure, allowing the message receiving end to obtain the failed message data in a timely manner, thus improving the efficiency of emergency message processing. Attached Figure Description

[0048] Figure 1 This is a diagram illustrating the application environment of a data export method in one embodiment;

[0049] Figure 2 This is a flowchart illustrating a data export method in one embodiment;

[0050] Figure 3 This is a flowchart illustrating the process of obtaining a message query command in one embodiment;

[0051] Figure 4 This is a schematic diagram of a sub-process of step 206 in one embodiment;

[0052] Figure 5 This is a flowchart illustrating the data export method in another embodiment;

[0053] Figure 6 This is a schematic diagram of a sub-process of step 506 in one embodiment;

[0054] Figure 7 This is a flowchart illustrating the data export method in yet another embodiment;

[0055] Figure 8 This is a schematic diagram of the overall process of a data export method in one embodiment;

[0056] Figure 9 This is a structural block diagram of a data export device in one embodiment;

[0057] Figure 10 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0059] The data export method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, the message sender 102 communicates with the message receiver 104 via a network. Upon receiving a message transmission failure message from the message receiver, the message sender 102 reads the database address and username information from the configuration file; connects to the database based on the database address and username information; if the database connection is successful, obtains a message query command; executes the message query command to query the message to be exported in the database; and exports the message to be exported to an export file, which is used by the message receiver to retrieve the message to be exported from the export file. In some embodiments, the message sender 102 can be a terminal or a server. The data export method provided in this application embodiment can be executed by the terminal or server alone, or by the terminal and server working together. In other embodiments, the terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. The server can be implemented using a standalone server or a server cluster composed of multiple servers.

[0060] In one embodiment, such as Figure 2 As shown, a data export method is provided, which can be applied to... Figure 1 Taking message sender 102 as an example, the following steps are included:

[0061] Step 202: If a message transmission failure message is received from the message receiver, read the database address and username information from the configuration file; connect to the database based on the database address and username information.

[0062] In this process, if a system malfunction occurs during message transmission, the message cannot be sent to the message receiver. The message receiver then sends a message transmission failure message to indicate that the message transmission failed and the message could not be received successfully.

[0063] The configuration file is stored at the message sender. It contains configuration information such as the database address and username. The database address is the network address used to connect to and manage the database, and the username is the object identifier for the target object using data from the database.

[0064] When the system malfunctions, the failed messages are stored in the database. When the message sender receives a message from the message receiver indicating that the message has failed to be sent, it reads the database address and username information from the configuration file.

[0065] The message sender connects to the database matching the database address and logs in using the username information. In some embodiments, if a database encryption message is detected as encrypted during the database connection process, the database password in the configuration file is read, the database is decrypted using the database password, and then the connection is made to the decrypted database using the database address and username information.

[0066] In other embodiments, if a database connection message indicating a connection failure is detected during the database connection process, the process of connecting to the database based on the database address and username information is re-executed until a database connection message indicating a successful connection is detected, or until a database connection message still indicating a connection failure is detected after a preset number of re-executions, a database connection exception message is generated to prompt the message sender that a database connection exception has occurred.

[0067] Step 204: If the database connection is successful, obtain the message query command; execute the message query command to query the message to be exported in the database.

[0068] The message query command is a database query command used to retrieve messages that failed to be sent from the database. When the database connection is successful, the message sender receives the message query command, executes it, and searches the database for messages to be exported. These exported messages are the messages stored in the database when message transmission failed.

[0069] Step 206: Export the message to be exported to the export file. The export file is used by the message receiver to obtain the message to be exported from the export file.

[0070] The export file is used to store the messages to be exported retrieved from the database, i.e., the file that stores messages that failed to be sent. For the message receiving end, the export file is used to retrieve the messages to be exported.

[0071] In the above data export method, upon receiving a message transmission failure message from the message receiver, the system reads the database address and username information from the configuration file; connects to the database based on the database address and username information; if the database connection is successful, it obtains a message query command; executes the message query command to search for the message to be exported in the database; and exports the message to be exported to an export file, which is used by the message receiver to retrieve the message to be exported from the export file. This scheme, after a message transmission failure, can connect to the database by reading the database information in the configuration file, and then automatically query the message to be exported from the database and export it to the export file. This ensures that messages are automatically exported to the export file in the event of transmission failure, allowing the message receiver to obtain the failed message data in a timely manner, thus improving the efficiency of emergency message handling.

[0072] In one embodiment, such as Figure 3 As shown, the following methods can be used to obtain the message query command.

[0073] Step 302: Receive a message query request sent by the message receiver. The message query request carries the message type and message status entered by the target object at the message receiver.

[0074] Step 304: Generate a message query command based on the message type and message status.

[0075] The message query request is initiated by the target object at the message receiving end. In some embodiments, the message is a SWIFT (Society for Worldwide Interbank Financial Telecommunication) message, and the message types include MT540, MT541, MT542, etc. The message status is identification information used to characterize the message transmission status, including message transmission successful, message transmission failed, message pending transmission, etc.

[0076] The message sender receives a message query request sent by the message receiver. The message query request carries the message type and message status entered by the target object at the message receiver.

[0077] By integrating message type and message status, a message query command is obtained. In some embodiments, the message query command has a standard format. For example, the message query command is: select *WHERE dtl.doc_type in('mt540')and.doc_status in('4','7'), which retrieves messages of type mt540 with statuses 4 (pending transmission) and 7 (failed transmission) from the database.

[0078] In this embodiment, by receiving the message type and message status input by the target object at the message receiving end, a message query command is generated, which can meet the personalized query needs of the target object and thus export the message to be exported that the target object needs to find.

[0079] In one embodiment, such as Figure 4 As shown, exporting the message to be exported to the export file includes:

[0080] Step 402: Obtain the message type of the message to be exported.

[0081] Step 404: Determine the target export path that matches the message type from the configuration file.

[0082] Step 406: Export the message to be exported to the export file according to the target export path.

[0083] The message sender parses the message to be exported to obtain its message type. Each message type is exported to an export file under a specific export path. The configuration file stores the correspondence between message types and export paths. The sender retrieves the target export path matching the message type from the configuration file and exports the message to be exported to the export file under that target export path. In some embodiments, if an export file already exists under the target export path, the message to be exported is directly exported to that file. In other embodiments, if no export file exists under the target export path, the sender generates an export file under the target export path and then directly exports the message to be exported to that file. One method for generating the export file is to obtain the current timestamp, combine the current timestamp and the message type into a filename, and then generate an export file with that filename under the target export path.

[0084] In this embodiment, by obtaining the message type of the message to be exported, the target export path matching the message type is determined from the configuration file, and the message to be exported is exported to the export file according to the target export path. This is beneficial for automatically exporting messages according to the message type of the message to be exported, thereby improving the efficiency of emergency message processing.

[0085] In one embodiment, such as Figure 5 As shown, the fields in the exported file include a data type field and a data field; after exporting the message to be exported to the exported file, it also includes:

[0086] Step 502: Iterate through the input types of each data type field in the exported file.

[0087] Step 504: If the input type of any data type field is a required type, determine whether the current data field corresponding to the current data type field is empty.

[0088] Step 506: If the current data field is not empty, determine whether the current data field is within the preset value range; if the current data field is within the preset value range, obtain the verification file, and send the exported file and the verification file to the message receiving end; the verification file is used by the message receiving end to perform integrity verification on the received exported file.

[0089] The exported file contains fields including data type fields and data fields. Each data type field may or may not have a corresponding data field.

[0090] The fact that the input type of a data type field is a required type indicates that the data type field has a corresponding data field.

[0091] If the input type of a data type field is not required, it means that there is no corresponding data field for that data type field.

[0092] The message sending terminal iterates through the exported file to determine the input type of each data type field. If any data type field belongs to a required input type, it checks whether the corresponding current data field is empty. If the current data field is empty, it indicates that the current data type field should have a corresponding current data field, but the current data field is not present in the exported file, and the exported file is unusable.

[0093] If the current data field is not empty, it indicates that the current data type field corresponds to the current data field. This further determines whether the current data field is within a preset value range, thus confirming that the current data field is within a reasonable value range. If the current data field is within the preset value range, it indicates that the current data field is within a reasonable value range, and the exported file is the usable file.

[0094] The message sender obtains the verification file and sends the exported file and verification file to the message receiver, so that the message receiver uses the verification file to perform integrity verification on the received exported file.

[0095] In some embodiments, the verification file is a .chk file.

[0096] In this embodiment, by traversing the input types to which each data type field belongs, the availability of the exported file is determined based on the input type to which each data type field belongs and the corresponding current data type. If the exported file is available, the exported file and the verification file are sent together to the message receiving end, ensuring that the exported file sent to the message receiving end is available, which helps to improve the emergency processing efficiency and integrity of the message.

[0097] In one embodiment, such as Figure 6 As shown, sending the exported file and verification file to the message receiver includes:

[0098] Step 602: Read the encryption instructions in the configuration file.

[0099] Step 604: If the encryption instruction indicates that encryption is not required, send the exported file and the verification file to the message receiving end.

[0100] Step 606: When the encryption instruction indicates encryption, read the encryption key path in the configuration file; use the key file under the encryption key path to encrypt the exported file to obtain an encrypted exported file; send the encrypted exported file and the verification file to the message receiving end.

[0101] The configuration file also includes encryption instructions and encryption key paths. In some embodiments, the target object sets the instruction type of the encryption instruction in the configuration file, thereby indicating whether to encrypt the exported file.

[0102] When the encryption command type is set to unencrypted, meaning the encryption command indicates no encryption, there is no need to encrypt the exported file; the exported file and the verification file can be sent directly to the message receiving end.

[0103] When the encryption command type is set to encryption (meaning the command instructs to encrypt), the encryption key path in the configuration file is read, the key file is obtained from the encryption key path, and the exported file is encrypted using the key file, thus obtaining the encrypted exported file. The message sending terminal then sends the encrypted exported file and the verification file to the receiving end.

[0104] In this embodiment, the encryption instructions in the configuration file are read to determine whether to encrypt the exported file. These instructions can be configured by the target object according to its needs. Encrypting the exported file before exporting it improves the security of the exported message. Simultaneously, the encryption key path is stored in the configuration file. The exported file can be encrypted by directly reading the encryption key path from the configuration file, which improves the efficiency of emergency message handling.

[0105] In one embodiment, such as Figure 7 As shown, data export methods also include:

[0106] Step 702: If the current data field is empty or the current data field is not within the preset value range, re-execute the step of exporting the message to be exported to the export file.

[0107] Step 704: After re-executing the preset number of times, if the current data field is empty or the current data field is not within the preset value range, stop executing the step of exporting the message to be exported to the export file and output an export failure message.

[0108] If the current data field is empty or outside the preset value range, the exported file is unusable and needs to be re-exported. After a preset number of retries, if the current data field is still empty or outside the preset value range, retries stop and an export failure message is output. In any subsequent re-execution, if the current data field is not empty and is within the preset value range, the exported file is considered usable, and the steps to send the exported file and verification file to the message receiver are executed.

[0109] In this embodiment, the accuracy of the exported message is ensured by retrying multiple times when the current data field is empty or outside the preset value range. If the exported file is still unusable after multiple retries, a corresponding prompt message is generated to remind relevant personnel to handle the situation promptly.

[0110] To illustrate the data export method and its effects in this solution in detail, the following is a detailed example:

[0111] This application addresses the scenario of a message sender transmitting resource transfer messages to a message receiver. After processing the resource transfer service, the generated interactive messages are stored in a database. Message information is primarily found in the database's message file table, message detail table, and message data source detail table. When system malfunctions occur, messages cannot be sent normally to the downstream message receiver, causing resource transfer services to be delayed. To ensure normal transaction execution and minimize losses, this application provides a configurable method for automated export and transmission of messages from the database, suitable for emergency message file sending.

[0112] like Figure 8The diagram illustrates the overall flow of the data export method. The target object uses a custom configuration file. When the message sender receives a message transmission failure message from the message receiver, it reads the database address and username information from the configuration file and attempts to connect to the database based on these information. If the database connection fails, an exception handling mechanism is triggered, sending a database connection exception message. The target object then investigates and processes the exception before re-executing the database connection steps.

[0113] If the database connection is successful, the system receives a message query request from the message receiver. This request carries the message type and status information of the target object, input by the message receiver. Based on the message type and status, a message query command is generated and executed to retrieve the message to be exported from the database. The system obtains the message type of the message to be exported, determines the target export path matching the message type from the configuration file, and exports the message to be exported to an export file according to the target export path. The export file is used by the message receiver to retrieve the message to be exported. The export file contains fields including a data type field and a data field.

[0114] Determine if the message to be exported can be successfully exported to the export file. If it cannot be exported successfully and there are no records to be exported, end the current export operation. If it cannot be exported successfully and there are records to be exported, re-execute the steps of exporting the message to be exported to the export file. If it can be exported successfully, perform an availability check on the export file. Specifically, iterate through the input types of each data type field in the export file. If any data type field belongs to a required input type, determine if the current data field corresponding to the current data type field is empty. If the current data field is not empty, determine if the current data field is within a preset value range. If the current data field is within the preset value range, determine that the export file is a usable file. Further determine whether to encrypt the export file. Specifically, read the encryption instructions in the configuration file. If the encryption instructions indicate no encryption, send the export file and verification file to the message receiving end. If the encryption instructions indicate encryption, read the encryption key path in the configuration file, use the key file under the encryption key path to encrypt the export file, and obtain an encrypted export file. Obtain the verification file and send the encrypted export file and verification file to the message receiving end. At the same time, the message status of the corresponding message in the database is set to pending receipt. The verification file is used by the message receiver to perform integrity verification on the received exported file.

[0115] If the current data field is empty or not within the preset value range, the step of exporting the message to be exported to the export file will be executed again. After the preset number of re-executions, if the current data field is empty or not within the preset value range, the step of exporting the message to be exported to the export file will be stopped, and an export failure message will be output.

[0116] The aforementioned data export method, upon receiving a message transmission failure message from the message receiver, reads the database address and username information from the configuration file; connects to the database based on the database address and username information; if the database connection is successful, obtains a message query command; executes the message query command to search for the message to be exported in the database; and exports the message to be exported to an export file, which the message receiver uses to retrieve the message to be exported from the export file. This scheme, after a message transmission failure, can connect to the database by reading the database information in the configuration file, and then automatically query the message to be exported from the database and export it to the export file. This ensures that messages are automatically exported to the export file in the event of transmission failure, allowing the message receiver to promptly obtain the failed message data, thus improving the efficiency of emergency message handling.

[0117] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0118] Based on the same inventive concept, this application also provides a data export apparatus for implementing the data export method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more data export apparatus embodiments provided below can be found in the limitations of the data export method described above, and will not be repeated here.

[0119] In one embodiment, such as Figure 9 As shown, a data export device 100 is provided, including: a reading module 120, a connection module 140, a query module 160, and an export module 180, wherein:

[0120] The reading module 120 is used to read the database address and username information in the configuration file when a message transmission failure message is received from the message receiving end.

[0121] Connection module 140 is used to connect to the database based on the database address and username information;

[0122] The query module 160 is used to obtain the message query command when the database connection is successful; execute the message query command to query the message to be exported in the database;

[0123] The export module 180 is used to export the message to be exported to the export file. The export file is used by the message receiving end to obtain the message to be exported from the export file.

[0124] The aforementioned data export device, upon receiving a message transmission failure message from the message receiving end, reads the database address and username information from the configuration file; connects to the database based on the database address and username information; if the database connection is successful, obtains a message query command; executes the message query command to search for the message to be exported in the database; and exports the message to be exported to an export file, which is used by the message receiving end to retrieve the message to be exported. This scheme, after a message transmission failure, can connect to the database by reading the database information in the configuration file, and then automatically query the message to be exported from the database and export it to an export file. This ensures that messages are automatically exported to an export file in the event of transmission failure, allowing the message receiving end to promptly obtain the failed message data, thus improving the efficiency of emergency message processing.

[0125] In one embodiment, the query module 160 is further configured to: receive a message query request sent by a message receiver, the message query request carrying the message type and message status input by the target object at the message receiver; and generate a message query command based on the message type and message status.

[0126] In one embodiment, the export module 180 is further configured to: obtain the message type of the message to be exported; determine the target export path that matches the message type from the configuration file; and export the message to be exported to the export file according to the target export path.

[0127] In one embodiment, the fields in the exported file include data type fields and data fields. After exporting the message to be exported to the exported file, the export module 180 further includes an availability determination module. The availability determination module is used to traverse the input types to which each data type field in the exported file belongs. If the input type to which any data type field belongs is a required input type, it determines whether the current data field corresponding to the current data type field is empty. If the current data field is not empty, it determines whether the current data field is within a preset value range. If the current data field is within the preset value range, it obtains a verification file and sends the exported file and the verification file to the message receiving end. The verification file is used by the message receiving end to perform integrity verification on the received exported file.

[0128] In one embodiment, the exported file and the verification file are sent to the message receiving end. The availability determination module is further configured to: read the encryption instruction in the configuration file; if the encryption instruction indicates no encryption, send the exported file and the verification file to the message receiving end; if the encryption instruction indicates encryption, read the encryption key path in the configuration file; use the key file under the encryption key path to encrypt the exported file to obtain an encrypted exported file; and send the encrypted exported file and the verification file to the message receiving end.

[0129] In one embodiment, the availability determination module is further configured to: re-execute the step of exporting the message to be exported to the export file when the current data field is empty or the current data field is not within the preset value range; after re-execution a preset number of times, stop executing the step of exporting the message to be exported to the export file when the current data field is empty or the current data field is not within the preset value range, and output an export failure prompt message.

[0130] Each module in the aforementioned data export device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0131] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 10As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a data export method.

[0132] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0133] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0134] Upon receiving a message transmission failure message from the message receiver, the system reads the database address and username information from the configuration file; connects to the database based on the database address and username information; if the database connection is successful, it obtains a message query command; executes the message query command to search for the message to be exported in the database; and exports the message to be exported to an export file, which is used by the message receiver to retrieve the message to be exported from the export file.

[0135] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0136] The system receives message query requests from the message receiver, which carry the message type and message status of the target object input by the message receiver; and generates a message query command based on the message type and message status.

[0137] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0138] Obtain the message type of the message to be exported; determine the target export path that matches the message type from the configuration file; export the message to be exported to the export file according to the target export path.

[0139] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0140] The exported file contains fields including data type fields and data fields. It iterates through the input types of each data type field in the exported file. If any data type field belongs to a required input type, it determines whether the corresponding data field is empty. If the current data field is not empty, it determines whether the current data field is within a preset value range. If the current data field is within the preset value range, it obtains a verification file and sends both the exported file and the verification file to the message receiver. The verification file is used by the message receiver to perform integrity verification on the received exported file.

[0141] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0142] Read the encryption instructions in the configuration file; if the encryption instructions indicate no encryption, send the exported file and verification file to the message receiver; if the encryption instructions indicate encryption, read the encryption key path in the configuration file; use the key file under the encryption key path to encrypt the exported file to obtain an encrypted exported file; send the encrypted exported file and verification file to the message receiver.

[0143] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0144] If the current data field is empty or not within the preset value range, re-execute the step of exporting the message to be exported to the export file; after re-executeing the preset number of times, if the current data field is empty or not within the preset value range, stop executing the step of exporting the message to be exported to the export file and output an export failure message.

[0145] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0146] Upon receiving a message transmission failure message from the message receiver, the system reads the database address and username information from the configuration file; connects to the database based on the database address and username information; if the database connection is successful, it obtains a message query command; executes the message query command to search for the message to be exported in the database; and exports the message to be exported to an export file, which is used by the message receiver to retrieve the message to be exported from the export file.

[0147] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0148] The system receives message query requests from the message receiver, which carry the message type and message status of the target object input by the message receiver; and generates a message query command based on the message type and message status.

[0149] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0150] Obtain the message type of the message to be exported; determine the target export path that matches the message type from the configuration file; export the message to be exported to the export file according to the target export path.

[0151] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0152] The exported file contains fields including data type fields and data fields. It iterates through the input types of each data type field in the exported file. If any data type field belongs to a required input type, it determines whether the corresponding data field is empty. If the current data field is not empty, it determines whether the current data field is within a preset value range. If the current data field is within the preset value range, it obtains a verification file and sends both the exported file and the verification file to the message receiver. The verification file is used by the message receiver to perform integrity verification on the received exported file.

[0153] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0154] Read the encryption instructions in the configuration file; if the encryption instructions indicate no encryption, send the exported file and verification file to the message receiver; if the encryption instructions indicate encryption, read the encryption key path in the configuration file; use the key file under the encryption key path to encrypt the exported file to obtain an encrypted exported file; send the encrypted exported file and verification file to the message receiver.

[0155] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0156] If the current data field is empty or not within the preset value range, re-execute the step of exporting the message to be exported to the export file; after re-executeing the preset number of times, if the current data field is empty or not within the preset value range, stop executing the step of exporting the message to be exported to the export file and output an export failure message.

[0157] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0158] Upon receiving a message transmission failure message from the message receiver, the system reads the database address and username information from the configuration file; connects to the database based on the database address and username information; if the database connection is successful, it obtains a message query command; executes the message query command to search for the message to be exported in the database; and exports the message to be exported to an export file, which is used by the message receiver to retrieve the message to be exported from the export file.

[0159] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0160] The system receives message query requests from the message receiver, which carry the message type and message status of the target object input by the message receiver; and generates a message query command based on the message type and message status.

[0161] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0162] Obtain the message type of the message to be exported; determine the target export path that matches the message type from the configuration file; export the message to be exported to the export file according to the target export path.

[0163] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0164] The exported file contains fields including data type fields and data fields. It iterates through the input types of each data type field in the exported file. If any data type field belongs to a required input type, it determines whether the corresponding data field is empty. If the current data field is not empty, it determines whether the current data field is within a preset value range. If the current data field is within the preset value range, it obtains a verification file and sends both the exported file and the verification file to the message receiver. The verification file is used by the message receiver to perform integrity verification on the received exported file.

[0165] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0166] Read the encryption instructions in the configuration file; if the encryption instructions indicate no encryption, send the exported file and verification file to the message receiver; if the encryption instructions indicate encryption, read the encryption key path in the configuration file; use the key file under the encryption key path to encrypt the exported file to obtain an encrypted exported file; send the encrypted exported file and verification file to the message receiver.

[0167] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0168] If the current data field is empty or not within the preset value range, re-execute the step of exporting the message to be exported to the export file; after re-executeing the preset number of times, if the current data field is empty or not within the preset value range, stop executing the step of exporting the message to be exported to the export file and output an export failure message.

[0169] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0170] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0171] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0172] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A data export method, characterized in that, include: If a message transmission failure message is received from the message receiver, the database address and username information in the configuration file are read. Connect to the database based on the database address and the username information; If the database connection is successful, retrieve the message query command; Execute the message query command to query the database for the message to be exported; The message to be exported is exported to an export file, and the export file is used by the message receiving end to obtain the message to be exported from the export file. The fields in the exported file include a data type field and a data field; the step of exporting the message to be exported to the exported file includes: Iterate through the input types of each data type field in the exported file; If any data type field belongs to a required input type, determine whether the current data field corresponding to the current data type field is empty; If the current data field is not empty, determine whether the current data field is within a preset value range; if the current data field is within the preset value range, obtain a verification file, and send the exported file and the verification file to the message receiving end; the verification file is used by the message receiving end to perform integrity verification on the received exported file.

2. The method according to claim 1, characterized in that, The message query command includes: Receive a message query request sent by the message receiving end, the message query request carrying the message type and message status input by the target object at the message receiving end; Generate a message query command based on the message type and the message status.

3. The method according to claim 1, characterized in that, The step of exporting the message to be exported to the export file includes: Obtain the message type of the message to be exported; Determine the target export path that matches the message type from the configuration file; Export the message to be exported to the export file according to the target export path.

4. The method according to claim 1, characterized in that, Sending the exported file and the verification file to the message receiving end includes: Read the encryption instructions from the configuration file; If the encryption instruction indicates that encryption is not required, the exported file and the verification file are sent to the message receiving end; When the encryption instruction indicates encryption, the encryption key path in the configuration file is read; the key file under the encryption key path is used to encrypt the exported file to obtain an encrypted exported file; the encrypted exported file and the verification file are sent to the message receiving end.

5. The method according to claim 1, characterized in that, The method further includes: If the current data field is empty, or if the current data field is not within the preset value range, the step of exporting the message to be exported to the export file is executed again. After re-execution a preset number of times, if the current data field is empty or the current data field is not within the preset value range, the step of exporting the message to be exported to the export file will be stopped, and an export failure message will be output.

6. A data export device, characterized in that, The device includes: The reading module is used to read the database address and username information from the configuration file when a message transmission failure message is received from the message receiver. A connection module is used to connect to the database based on the database address and the username information; The query module is used to obtain a message query command when the database connection is successful; execute the message query command to query the message to be exported in the database; An export module is used to export the message to be exported to an export file, and the export file is used by the message receiving end to obtain the message to be exported from the export file. The export module also includes an availability determination module. This module iterates through the input types of each data type field in the export file. If any data type field belongs to a required input type, it determines whether the current data field corresponding to that data type field is empty. If the current data field is not empty, it determines whether the current data field is within a preset value range. If the current data field is within the preset value range, it obtains a verification file and sends both the export file and the verification file to the message receiver. The verification file is used by the message receiver to perform integrity verification on the received export file.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Data exporting method and device

    CN110555068A

  • Large-data-volume Excel file exporting method and device, computer equipment and storage medium

    CN111104448A

  • Asset information exporting method and device

    CN112965740A