CN117336135A - Data transmission method, device, storage medium and electronic equipment - Google Patents

Data transmission method, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN117336135A
CN117336135A CN202311182745.XA CN202311182745A CN117336135A CN 117336135 A CN117336135 A CN 117336135A CN 202311182745 A CN202311182745 A CN 202311182745A CN 117336135 A CN117336135 A CN 117336135A
Authority
CN
China
Prior art keywords
data
transmitted
target
log
temporary
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311182745.XA
Other languages
Chinese (zh)
Inventor
范振涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jilin Yillion Bank Co ltd
Original Assignee
Jilin Yillion Bank Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jilin Yillion Bank Co ltd filed Critical Jilin Yillion Bank Co ltd
Priority to CN202311182745.XA priority Critical patent/CN117336135A/en
Publication of CN117336135A publication Critical patent/CN117336135A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • H04L41/0266Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using meta-data, objects or commands for formatting management information, e.g. using eXtensible markup language [XML]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1443Transmit or communication errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a data transmission method, a data transmission device, a storage medium and electronic equipment. The method comprises the following steps: receiving a log storage instruction sent by a service system, and acquiring log information in the service system according to the log storage instruction; determining the system type of a service system, processing log information according to the system type to obtain data to be transmitted and a temporary data table to which the data to be transmitted belong, and storing the data to be transmitted into the temporary data table; determining a preset strategy for changing data to be transmitted according to the log information, and acquiring a data transmission module to which the preset strategy belongs; and changing the data to be transmitted through a preset strategy to obtain target data, and transmitting the target data to a target database through a data transmission module. By the method and the device, the problems of long time consumption and low efficiency of process design development aiming at data processing requirements in the related technology are solved.

Description

Data transmission method, device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of data processing, and in particular, to a data transmission method, a data transmission device, a storage medium, and an electronic device.
Background
In the daily operation process, a financial institution can generate a large amount of data in a plurality of business systems, such as user business data in banks, and the financial institution not only needs to store the business data in batches, but also needs to analyze the business data, so that the business efficiency is improved, and the business data brings higher value to the financial institution.
When data are stored and analyzed in batches, a commonly adopted method is to design and develop a flow for storing and analyzing according to newly proposed data processing requirements, but the labor cost for developing according to different requirements is high, the online period is long, the efficiency is low, and the service execution progress of a financial institution is further affected.
Aiming at the problems of long time consumption and low efficiency of independently performing flow design development aiming at data processing requirements in the related technology, no effective solution is proposed at present.
Disclosure of Invention
The application provides a data transmission method, a data transmission device, a storage medium and electronic equipment, and aims to solve the problems of long time consumption and low efficiency of process design development aiming at data processing requirements in the related technology.
According to one aspect of the present application, a data transmission method is provided. The method comprises the following steps: receiving a log storage instruction sent by a service system, and acquiring log information in the service system according to the log storage instruction; determining the system type of a service system, processing log information according to the system type to obtain data to be transmitted and a temporary data table to which the data to be transmitted belong, and storing the data to be transmitted into the temporary data table; determining a preset strategy for changing data to be transmitted according to the log information, and acquiring a data transmission module to which the preset strategy belongs; and changing the data to be transmitted through a preset strategy to obtain target data, and transmitting the target data to a target database through a data transmission module.
Optionally, acquiring the log information in the service system according to the log storage instruction includes: analyzing the log storage instruction to obtain log information indicated by the log storage instruction; determining a standby database in a plurality of databases associated with the service system and a preset log acquisition mode of the service system; and acquiring log information from the standby database by adopting a preset log acquisition mode.
Optionally, processing the log information according to the system type to obtain the data to be transmitted and the temporary data table to which the data to be transmitted belongs includes: determining a temporary database corresponding to the system type according to a preset relationship, and analyzing the log information to obtain log content, wherein the preset relationship is an association relationship between a plurality of system types and a plurality of temporary databases; judging whether the data format of the log content is a preset format or not, and changing the data format of the log content into the preset format under the condition that the data format of the log content is not the preset format to obtain data to be transmitted; according to the log content, determining calculation operation required to be carried out on the log information, determining a preset strategy corresponding to the log content according to the association relation between the calculation operation and the preset strategy, and determining a temporary data table corresponding to the preset strategy.
Optionally, storing the data to be transmitted in the temporary data table includes: searching whether a temporary data table corresponding to a preset strategy exists in the temporary database; under the condition that a temporary data table corresponding to a preset strategy exists in the temporary database, sending data to be transmitted to the temporary data table; under the condition that a temporary data table corresponding to a preset strategy does not exist in the temporary database, creating the temporary data table corresponding to the preset strategy in the temporary database, and creating a target data table corresponding to the preset strategy in a target database, wherein the target database is a database corresponding to a data transmission module with the preset strategy.
Optionally, the data transmission module is configured to transmit the target data to a target data table in the target database, and determine whether historical data with the same data content as the target data exists in the target data table, and delete the historical data if the historical data exists, where the target data table has an association relationship with a preset policy.
Optionally, after the target data is transmitted to the target database by the data transmission module, the method further comprises: receiving first feedback information sent by a target database; under the condition that the first feedback information represents that the transmission of the target data fails, acquiring the data to be transmitted from a temporary data table, re-executing the step of changing the data to be transmitted through a preset strategy to obtain the target data, and monitoring the execution state of the step of obtaining the target data; under the condition that the execution state is abnormal, determining that the step of obtaining the target data is abnormal by changing the data to be transmitted through a preset strategy; under the condition that the execution state is normal, transmitting target data to a target database through a data transmission module; and receiving second feedback information sent by the target database, and displaying alarm information under the condition that the second feedback information represents failure of target data transmission, wherein the alarm information represents that the data transmission module is abnormal.
Optionally, in the case that the first feedback information characterizes that the target data transmission is successful, the method further comprises: determining the generation moment of the first feedback information to obtain a first moment; determining the time of sending the target data to obtain a second time; calculating a time interval between the first time and the second time, and judging whether the time interval is longer than a preset duration; and under the condition that the time interval is longer than the preset time length, determining that the target data transmission fails, re-executing a preset strategy for changing the data to be transmitted according to the log information, and acquiring a data transmission module to which the preset strategy belongs.
According to another aspect of the present application, a data transmission apparatus is provided. The device comprises: the first receiving unit is used for receiving the log storage instruction sent by the service system and acquiring log information in the service system according to the log storage instruction; the first determining unit is used for determining the system type of the service system, processing the log information according to the system type to obtain data to be transmitted and a temporary data table to which the data to be transmitted belong, and storing the data to be transmitted into the temporary data table; the acquisition unit is used for determining a preset strategy for changing the data to be transmitted according to the log information and acquiring a data transmission module to which the preset strategy belongs; the first transmission unit is used for changing the data to be transmitted through a preset strategy to obtain target data, and transmitting the target data to the target database through the data transmission module.
According to another aspect of the present invention, there is also provided a computer storage medium for storing a program, wherein the program when run controls a device in which the computer storage medium is located to perform a data transmission method.
According to another aspect of the present invention, there is also provided an electronic device comprising one or more processors and a memory; the memory has stored therein computer readable instructions, and the processor is configured to execute the computer readable instructions, wherein the computer readable instructions when executed perform a data transmission method.
Through the application, the following steps are adopted: receiving a log storage instruction sent by a service system, and acquiring log information in the service system according to the log storage instruction; determining the system type of a service system, processing log information according to the system type to obtain data to be transmitted and a temporary data table to which the data to be transmitted belong, and storing the data to be transmitted into the temporary data table; determining a preset strategy for changing data to be transmitted according to the log information, and acquiring a data transmission module to which the preset strategy belongs; and changing the data to be transmitted through a preset strategy to obtain target data, and transmitting the target data to a target database through a data transmission module. The problems of long time consumption and low efficiency of independently performing flow design and development aiming at data processing requirements in the related technology are solved. The method comprises the steps of processing log information according to the system type, storing the processed data to be transmitted into a temporary data table, processing the data to be transmitted in the temporary data table according to a preset strategy in a data transmission module corresponding to the temporary data table, uniformly processing the log, transmitting the processed target data into a data table in a database storing the data by the data transmission module, processing and analyzing the data through the preset strategy, and changing the data by the preset strategy at the same time, so that under the condition that the data changing requirement is changed, only the preset strategy is required to be changed and newly increased, the whole process is not required to be re-developed, and the data is transmitted and stored by using the data transmission module, and further, when the data is processed, only codes in the data transmission module are modified, or a new data transmission module is added, thereby achieving the effects of reducing the development cost, improving the development efficiency and improving the data processing efficiency.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application, illustrate and explain the application and are not to be construed as limiting the application. In the drawings:
fig. 1 is a flowchart of a data transmission method provided according to an embodiment of the present application;
FIG. 2 is a flow chart of an alternative data transmission method provided in accordance with an embodiment of the present application;
fig. 3 is a schematic diagram of a data transmission device according to an embodiment of the present application;
fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the present application described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, related information (including, but not limited to, user equipment information, user personal information, etc.) and data (including, but not limited to, data for presentation, analyzed data, etc.) related to the present disclosure are information and data authorized by a user or sufficiently authorized by each party. For example, an interface is provided between the system and the relevant user or institution, before acquiring the relevant information, the system needs to send an acquisition request to the user or institution through the interface, and acquire the relevant information after receiving the consent information fed back by the user or institution.
It should be noted that the data transmission method, apparatus, storage medium and electronic device determined in the present disclosure may be used in the field of data processing, and may also be used in any field other than the field of data processing, and the application fields of the data transmission method, apparatus, storage medium and electronic device determined in the present disclosure are not limited.
For convenience of description, the following will describe some terms or terms related to the embodiments of the present application:
flink is an open source stream processing framework whose core is a real-time stream processing system. The Flink executes any stream data program in a data parallel and pipeline manner, and the pipeline runtime system of the Flink can execute batch processing and stream processing programs. The Flink program, after execution, is mapped to stream data streams, each of which starts with one or more sources (data input, e.g., message queues or file systems) and ends with one or more receivers (data output, e.g., message queues, file systems or databases, etc.).
Kafka is an open source message system, is a distributed message queue, classifies messages according to table topic when they are stored, and can be read by a flank to messages in the message queue, and furthermore Kafka cluster is composed of multiple Kafka instances.
According to an embodiment of the application, a data transmission method is provided.
Fig. 1 is a flowchart of a data transmission method according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S101, receiving a log storage instruction sent by a service system, and acquiring log information in the service system according to the log storage instruction.
Specifically, the execution body of the method may be a data processing system, for example, kafka, where the Kafka determines that the service system needs to perform a log data storage operation when receiving a log storage instruction sent by the service system, and at this time, the log storage instruction may be parsed to obtain log information to be stored indicated by the log storage instruction, and the log information may be obtained from the service system, so that subsequent processing may be performed on the log information.
Step S102, determining the system type of the service system, processing the log information according to the system type to obtain data to be transmitted and a temporary data table to which the data to be transmitted belong, and storing the data to be transmitted into the temporary data table.
Specifically, because there is a difference between service systems, log information in the systems also has a difference, after the log information is acquired, the system type of the service system needs to be determined, so that the log information can be correspondingly processed according to the system type, the processed data to be transmitted can be obtained, and a temporary data table to which the data to be transmitted belongs is determined, that is, the log information needs to be processed, and meanwhile, the temporary data table for temporarily storing the log information needs to be determined, and the data to be transmitted is sent to the temporary data table.
It should be noted that, the temporary data table, that is, a message queue in Kafka, stores the data table through a plurality of message queues for data isolation, so as to reduce the data processing amount in each message queue.
Step S103, determining a preset strategy for changing the data to be transmitted according to the log information, and acquiring a data transmission module to which the preset strategy belongs.
Specifically, after the temporary data table is determined, the log information is analyzed to obtain log data, and a preset strategy for changing the data to be transmitted is determined through the calculation operation recorded in the log data, so that the data transmission module is obtained according to the preset strategy.
It should be noted that, the data transmission module is located in a message queue, the message queue may be a link, the data transmission module is a Flow (data Flow) in the Flow processing system, that is, the data transmission Flow, the data transmission module has a preset policy, the preset policy may change data to be transmitted, for example, perform numerical calculation or perform data analysis operations such as statistics, and one end of the data transmission module is connected with a message queue of Kafka, and the other end is connected with a target database, so that the data to be processed may be analyzed through the preset policy, and meanwhile, the data to be transmitted may also be transmitted and stored.
After the data transmission module is determined, a preset strategy in the data transmission module can be obtained, and further, the data to be transmitted can be processed by using the preset strategy in the data transmission module under the condition that the preset strategy is in a usable state.
Step S104, changing the data to be transmitted through a preset strategy to obtain target data, and transmitting the target data to a target database through a data transmission module.
Specifically, after the preset policy is obtained, the data to be transmitted can be changed through the preset policy to obtain target data, wherein the target data can be modified for some data in the data to be transmitted, or can be added for data in the data to be transmitted, for example, the preset policy is to calculate an average value of X data in the data to be transmitted, and after the calculation of the average value is completed, the average value can be added into the data to be transmitted, so that the update of the data to be transmitted is completed, and updated target data is obtained.
That is, the temporary data table may have both data to be transmitted and target data after the change is completed.
Further, after the target data is obtained, the target data can be transmitted to the target database for storage according to the connection relation between the data transmission module and the database, so that the storage operation of the target data is completed.
According to the data transmission method, the log storage instruction sent by the service system is received, and the log information in the service system is obtained according to the log storage instruction; determining the system type of a service system, processing log information according to the system type to obtain data to be transmitted and a temporary data table to which the data to be transmitted belong, and storing the data to be transmitted into the temporary data table; determining a data transmission module for transmitting the temporary data table according to a first preset relation, and acquiring a preset strategy in the data transmission module, wherein the preset strategy is used for changing data to be transmitted; and changing the data to be transmitted through a preset strategy to obtain target data, and transmitting the target data to a target database through a data transmission module. The problems of long time consumption and low efficiency of independently performing flow design and development aiming at data processing requirements in the related technology are solved. The log information is processed according to the system type, the data to be transmitted obtained after the processing is stored in the temporary data table, the data to be transmitted in the temporary data table is processed according to the preset strategy in the data transmission module corresponding to the temporary data table, the processed target data is transmitted to the data table in the database storing the data by the data transmission module, and therefore the data is processed and analyzed through the preset strategy, and the data is transmitted and stored by the data transmission module, and further, when the data is processed, only the code in the data transmission module is modified, or a new data transmission module is added, and the effects of reducing development cost, improving development efficiency and improving data processing efficiency are achieved.
In order to accurately obtain log information, optionally, in the data transmission method provided in the embodiment of the present application, obtaining the log information in the service system according to the log storage instruction includes: analyzing the log storage instruction to obtain log information indicated by the log storage instruction; determining a standby database in a plurality of databases associated with the service system and a preset log acquisition mode of the service system; and acquiring log information from the standby database by adopting a preset log acquisition mode.
Specifically, when log information is acquired, because there is a difference between service systems storing the log information, the log information needs to be acquired by using a log acquisition mode related to the type of the service system, thereby ensuring normal acquisition of the log information.
Further, after determining the preset log obtaining mode, it is also necessary to determine where to obtain log information. When the log information is stored, a method for storing the log information by using a database disaster recovery storage method with multiple masters and multiple slaves is generally adopted, or the log information is stored in a mode with multiple masters and multiple slaves, and the master database needs to frequently perform data exchange operation, so that the disaster recovery database is in a different place and is inconvenient to deploy, and the real-time performance is not high. In order to minimize the impact on the database, log information needs to be obtained from the standby database.
After the database for acquiring the log and the preset log acquisition mode are determined, the preset log acquisition mode can be adopted to acquire log information from the standby database.
Note that, when acquiring log information, a method of acquiring the entire log information may be adopted, but when there are a large number of log information, incremental log information may be acquired so that the log information is stored in the temporary data table.
Optionally, in the data transmission method provided in the embodiment of the present application, processing the log information according to a system type, to obtain data to be transmitted and a temporary data table to which the data to be transmitted belongs includes: determining a temporary database corresponding to the system type according to a preset relationship, and analyzing the log information to obtain log content, wherein the preset relationship is an association relationship between a plurality of system types and a plurality of temporary databases; judging whether the data format of the log content is a preset format or not, and changing the data format of the log content into the preset format under the condition that the data format of the log content is not the preset format to obtain data to be transmitted; according to the log content, determining calculation operation required to be carried out on the log information, determining a preset strategy corresponding to the log content according to the association relation between the calculation operation and the preset strategy, and determining a temporary data table corresponding to the preset strategy.
Specifically, in order to ensure that the content of the data in the log can be accurately identified and the data is processed during the transmission of the log information, the log information needs to be preprocessed, so that the log data in a standard format is obtained. Therefore, after the log information is obtained, the log information needs to be analyzed to obtain the log content, so that whether the data in the log content is in a preset format or not is determined, if not, the data in the log content is subjected to format conversion to obtain the data to be transmitted, and if so, the data to be transmitted does not need to be transmitted in a format.
Further, after the format conversion of the data is performed, the data to be transmitted needs to be transmitted, at this time, a temporary database corresponding to the system type needs to be determined according to a preset relationship, so that the data to be transmitted can be temporarily stored in the temporary database, however, after the temporary database is determined, a temporary data table for storing the data to be stored needs to be determined, at the time of determining the temporary data table, a calculation operation for determining the log content needs to be performed according to the log content, for example, an operation for summing type a data in the log content, calculating an average number for type B data, and the like, and a preset policy needs to be determined according to the operation, so as to obtain a temporary data table corresponding to the preset policy, where the data to be transmitted stored in the temporary data table is the data which needs to be processed through the preset policy.
It should be noted that, the operation of processing the data by the preset policy may be performed before storing the data in the temporary data table, or may be performed in the data transmission module, that is, only the data is processed by using the preset policy before transmitting the data to be transmitted to the target database.
Optionally, in the data transmission method provided in the embodiment of the present application, storing data to be transmitted in a temporary data table includes: searching whether a temporary data table corresponding to a preset strategy exists in the temporary database; under the condition that a temporary data table corresponding to a preset strategy exists in the temporary database, sending data to be transmitted to the temporary data table; under the condition that a temporary data table corresponding to a preset strategy does not exist in the temporary database, creating the temporary data table corresponding to the preset strategy in the temporary database, and creating a target data table corresponding to the preset strategy in a target database, wherein the target database is a database corresponding to a data transmission module with the preset strategy.
Specifically, under the condition that a temporary data table corresponding to a preset strategy does not exist, a new temporary data table is needed, a database corresponding to a data transmission module with the preset strategy is also needed to be created in a target database, and the target data table is created in the database, so that the storage of data to be transmitted is completed.
It should be noted that, the data transmission module is composed of three parts of contents, respectively: the data transmission module supports two message protocols, namely a unified message format and a custom JSON, wherein the unified message format comprises: the type of data, the version number of the message, the name space, the metadata field and the specific data composition; the namespaces are defined by: the database type, the data source name, the table version number, the sub-database number and the sub-table number can describe all tables, namely the table in Kafka and the table in the target database, so that the source end naming space can be set to determine which table in Kafka is transmitted with the data transmission module and which table in the target database is transmitted with the data transmission module, and meanwhile, the data can be adjusted and changed according to a preset strategy.
Further, after the temporary data table and the target data table are established, a data transmission module is required to be established in the temporary data table and the target data table, wherein information in a source end naming space and a target end naming space of the data transmission module is information of the temporary data table and the target data table, and a preset strategy, namely a preset strategy corresponding to log information, is established, so that the data transmission module is established.
After the data transmission module is created, the data to be transmitted or the target data in the temporary data table can be transmitted through the data transmission module.
Similarly, when a temporary data table corresponding to a preset strategy exists, the temporary data table can be directly used, the data transmission module is determined through the preset strategy, and then the data to be transmitted or the target data can be transmitted through the data transmission module.
Fig. 2 is a flowchart of an alternative data transmission method according to an embodiment of the present application, as shown in fig. 2, after determining a preset policy, determining a temporary data table according to the preset policy, transmitting data in the temporary data table through a data transmission module to which the preset policy belongs in the case that the temporary data table corresponding to the preset policy exists, creating the temporary data table and binding the preset policy with the temporary data table in the case that the temporary data table corresponding to the preset policy does not exist, and determining a data transmission module to which the preset policy belongs, thereby sending data to be transmitted to a target data table through the data transmission module, where the data transmission module may acquire the data to be transmitted from the temporary data table, change the data to be transmitted through the preset policy in the data transmission module, obtain the target data, and send the target data to the target database, so as to complete the data transmission operation.
Optionally, in the data transmission method provided in the embodiment of the present application, the data transmission module is configured to transmit target data to a target data table in the target database, and determine whether historical data having the same data content as the target data exists in the target data table, and delete the historical data if the historical data exists, where an association relationship exists between the target data table and a preset policy.
Specifically, the data transmission module may send the data to be transmitted from the temporary data table to the target data table in the target database, and after receiving the target data in the target data table, determine whether there is historical data with the same data content as the target data in the target data table, and in the case that there is the same historical data, delete the historical data, and retain the latest data, thereby completing the updating of the data and simultaneously ensuring the accuracy of the data.
It should be noted that the same data content may be the same as part of the data content, such as a service name, a user name, etc., but the part of the data may be different, such as a time stamp, a unique identifier, etc.
Optionally, in the data transmission method provided in the embodiment of the present application, after the target data is transmitted to the target database through the data transmission module, the method further includes: receiving first feedback information sent by a target database; under the condition that the first feedback information represents that the transmission of the target data fails, acquiring the data to be transmitted from a temporary data table, re-executing the step of changing the data to be transmitted through a preset strategy to obtain the target data, and monitoring the execution state of the step of obtaining the target data; under the condition that the execution state is abnormal, determining that the step of obtaining the target data is abnormal by changing the data to be transmitted through a preset strategy; under the condition that the execution state is normal, transmitting target data to a target database through a data transmission module; and receiving second feedback information sent by the target database, and displaying alarm information under the condition that the second feedback information represents failure of target data transmission, wherein the alarm information represents that the data transmission module is abnormal.
Specifically, after data is transmitted to the target database, first feedback information fed back by the target database is received, in the case that the feedback information represents failure of the target data transmission, a mode of setting a monitoring node is required to monitor a data transmission state in the data transmission process, a step of changing data to be transmitted through a preset strategy to obtain the target data can be executed again, in the case that the execution state of the step is abnormal, an operation and maintenance personnel is required to adjust the preset strategy, in the case that the execution state of the step is normal, an operation of transmitting the target data to the target database through the data transmission module is executed, and in the case that the execution state of the operation is determined, in this case, the execution state can be determined by receiving second feedback information sent by the target database, in the case that the second feedback information represents abnormal, the data transmission module is represented to be abnormal, and then the data cannot be transmitted normally.
On the basis of the technical scheme, the operation states and the operation results of any two monitoring nodes in the whole data transmission flow can be obtained by setting the monitoring nodes, so that when the operation state monitored by the latter monitoring node is abnormal, the abnormality between the two monitoring nodes is determined, maintenance is needed, and further, the correct transmission of the whole data transmission flow is ensured.
Optionally, in the data transmission method provided in the embodiment of the present application, when the first feedback information characterizes that the target data transmission is successful, the method further includes: determining the generation moment of the first feedback information to obtain a first moment; determining the time of sending the target data to obtain a second time; calculating a time interval between the first time and the second time, and judging whether the time interval is longer than a preset duration; and under the condition that the time interval is longer than the preset time length, determining that the target data transmission fails, re-executing a preset strategy for changing the data to be transmitted according to the log information, and acquiring a data transmission module to which the preset strategy belongs.
Specifically, under the condition that the transmission of the target data is successful, whether the transmission is overtime is required to be determined, at this time, the moment of transmitting the data to the target data table can be determined by determining the generation moment of the first feedback information, the first moment is obtained, the moment of transmitting the target data is determined, the second moment is obtained, under the condition that the time interval between the first moment and the second moment is longer than the preset duration, the step of determining the preset strategy for changing the data to be transmitted according to the log information and obtaining the data transmission module to which the preset strategy belongs is required to be re-executed, namely, the operation of changing and transmitting the data is re-performed, so that the data transmission operation can be completed within the preset duration, and the accuracy of the data transmission and the accuracy of the data are ensured.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
The embodiment of the application also provides a data transmission device, and it should be noted that the data transmission device of the embodiment of the application can be used for executing the data transmission method provided by the embodiment of the application. The following describes a data transmission device provided in an embodiment of the present application.
Fig. 3 is a schematic diagram of a data transmission device according to an embodiment of the present application. As shown in fig. 3, the apparatus includes: a first receiving unit 31, a first determining unit 32, an acquiring unit 33, a first transmitting unit 34.
The first receiving unit 31 is configured to receive a log storage instruction sent by the service system, and obtain log information in the service system according to the log storage instruction.
The first determining unit 32 is configured to determine a system type of the service system, process the log information according to the system type, obtain data to be transmitted and a temporary data table to which the data to be transmitted belongs, and store the data to be transmitted in the temporary data table.
The obtaining unit 33 is configured to determine a preset policy for changing data to be transmitted according to the log information, and obtain a data transmission module to which the preset policy belongs.
The first transmission unit 34 is configured to change data to be transmitted according to a preset policy to obtain target data, and transmit the target data to the target database through the data transmission module.
According to the data transmission device provided by the embodiment of the application, the first receiving unit 31 receives the log storage instruction sent by the service system, and obtains the log information in the service system according to the log storage instruction. The first determining unit 32 determines the system type of the service system, processes the log information according to the system type, obtains the data to be transmitted and the temporary data table to which the data to be transmitted belongs, and stores the data to be transmitted in the temporary data table. The obtaining unit 33 determines a preset policy for changing the data to be transmitted according to the log information, and obtains a data transmission module to which the preset policy belongs. The first transmission unit 34 changes the data to be transmitted through a preset strategy to obtain target data, and transmits the target data to the target database through the data transmission module. The problems of long time consumption and low efficiency of independently performing flow design and development aiming at data processing requirements in the related technology are solved. The log information is processed according to the system type, the data to be transmitted obtained after the processing is stored in the temporary data table, the data to be transmitted in the temporary data table is processed according to the preset strategy in the data transmission module corresponding to the temporary data table, the processed target data is transmitted to the data table in the database storing the data by the data transmission module, and therefore the data is processed and analyzed through the preset strategy, and the data is transmitted and stored by the data transmission module, and further, when the data is processed, only the code in the data transmission module is modified, or a new data transmission module is added, and the effects of reducing development cost, improving development efficiency and improving data processing efficiency are achieved.
Optionally, in the data transmission device provided in the embodiment of the present application, the first receiving unit 31 includes: the analysis module is used for analyzing the log storage instruction to obtain log information indicated by the log storage instruction; the first determining module is used for determining standby databases in a plurality of databases associated with the service system and a preset log acquisition mode of the service system; and the acquisition module is used for acquiring log information from the standby database by adopting a preset log acquisition mode.
Optionally, in the data transmission device provided in the embodiment of the present application, the first determining unit 32 includes: the second determining module is used for determining a temporary database corresponding to the system type according to a preset relationship, and analyzing the log information to obtain log content, wherein the preset relationship is an association relationship between a plurality of system types and a plurality of temporary databases; the judging module is used for judging whether the data format of the log content is a preset format or not, and changing the data format of the log content into the preset format to obtain data to be transmitted under the condition that the data format of the log content is not the preset format; the third determining module is used for determining calculation operation to be performed on the log information according to the log content, determining a preset strategy corresponding to the log content according to the association relation between the calculation operation and the preset strategy, and determining a temporary data table corresponding to the preset strategy.
Optionally, in the data transmission device provided in the embodiment of the present application, the first determining unit 32 includes: the searching module is used for searching whether a temporary data table corresponding to a preset strategy exists in the temporary database; the sending module is used for sending the data to be transmitted to the temporary data table under the condition that the temporary data table corresponding to the preset strategy exists in the temporary database; the creating module is used for creating a temporary data table corresponding to the preset strategy in the temporary database under the condition that the temporary data table corresponding to the preset strategy does not exist in the temporary database, and creating a target data table corresponding to the preset strategy in the target database, wherein the target database is a database corresponding to the data transmission module with the preset strategy.
Optionally, in the data transmission device provided in the embodiment of the present application, the data transmission module is configured to transmit the target data to a target data table in the target database, and determine whether historical data with the same data content as the target data exists in the target data table, and delete the historical data if the historical data exists, where an association relationship exists between the target data table and a preset policy.
Optionally, in the data transmission device provided in the embodiment of the present application, the device further includes: the second receiving unit is used for receiving the first feedback information sent by the target database; the execution unit is used for acquiring data to be transmitted from the temporary data table under the condition that the first feedback information represents failure of transmission of the target data, re-executing the step of changing the data to be transmitted through a preset strategy to obtain the target data, and monitoring the execution state of the step of obtaining the target data; the second determining unit is used for determining that the step of changing the data to be transmitted through a preset strategy to obtain the target data is abnormal under the condition that the execution state is abnormal; the second transmission unit is used for transmitting the target data to the target database through the data transmission module under the condition that the execution state is normal; and the third receiving unit is used for receiving the second feedback information sent by the target database and displaying alarm information under the condition that the second feedback information represents that the target data transmission fails, wherein the alarm information represents that the data transmission module is abnormal.
Optionally, in the data transmission device provided in the embodiment of the present application, the device further includes: the third determining unit is used for determining the generation time of the first feedback information to obtain a first time; a fourth determining unit, configured to determine a time of sending the target data, and obtain a second time; the calculating unit is used for calculating the time interval between the first time and the second time and judging whether the time interval is larger than the preset duration or not; and a fifth determining unit, configured to determine that the transmission of the target data fails when the time interval is greater than the preset duration, and re-execute the step of determining a preset policy for changing the data to be transmitted according to the log information, and acquiring a data transmission module to which the preset policy belongs.
The data transmission device includes a processor and a memory, and the first receiving unit 31, the first determining unit 32, the acquiring unit 33, the first transmitting unit 34, and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one kernel, and the problems of long time consumption and low efficiency of independently performing flow design and development aiming at data processing requirements in the related technology are solved by adjusting kernel parameters.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
An embodiment of the present invention provides a computer-readable storage medium having stored thereon a program which, when executed by a processor, implements the data transmission method.
The embodiment of the invention provides a processor which is used for running a program, wherein the data transmission method is executed when the program runs.
As shown in fig. 4, an embodiment of the present invention provides an electronic device, where the electronic device 40 includes a processor, a memory, and a program stored in the memory and executable on the processor, and the steps of the data transmission method are implemented by the processor when the processor executes the program. The device herein may be a server, PC, PAD, cell phone, etc.
The present application also provides a computer program product adapted to perform a program initialized with the steps of the above described data transmission method when executed on a data processing device.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (10)

1. A data transmission method, comprising:
receiving a log storage instruction sent by a service system, and acquiring log information in the service system according to the log storage instruction;
determining the system type of the service system, processing the log information according to the system type to obtain data to be transmitted and a temporary data table to which the data to be transmitted belong, and storing the data to be transmitted into the temporary data table;
determining a preset strategy for changing the data to be transmitted according to the log information, and acquiring a data transmission module to which the preset strategy belongs;
and changing the data to be transmitted according to the preset strategy to obtain target data, and transmitting the target data to a target database through the data transmission module.
2. The method of claim 1, wherein obtaining log information in the business system according to the log storage instruction comprises:
analyzing the log storage instruction to obtain log information indicated by the log storage instruction;
determining a standby database in a plurality of databases associated with the service system and a preset log acquisition mode of the service system;
and acquiring the log information from the standby database by adopting the preset log acquisition mode.
3. The method of claim 1, wherein processing the log information according to the system type to obtain data to be transmitted and a temporary data table to which the data to be transmitted belongs comprises:
determining a temporary database corresponding to the system type according to a preset relationship, and analyzing the log information to obtain log content, wherein the preset relationship is an association relationship between a plurality of system types and a plurality of temporary databases;
judging whether the data format of the log content is a preset format or not, and changing the data format of the log content into the preset format to obtain the data to be transmitted under the condition that the data format of the log content is not the preset format;
And determining calculation operation to be performed on the log information according to the log content, determining a preset strategy corresponding to the log content according to the association relation between the calculation operation and the preset strategy, and determining a temporary data table corresponding to the preset strategy.
4. A method according to claim 3, wherein storing the data to be transmitted into the temporary data table comprises:
searching whether a temporary data table corresponding to the preset strategy exists in the temporary database;
transmitting the data to be transmitted to a temporary data table corresponding to the preset strategy under the condition that the temporary data table exists in the temporary database;
under the condition that a temporary data table corresponding to the preset strategy does not exist in the temporary database, creating the temporary data table corresponding to the preset strategy in the temporary database, and creating a target data table corresponding to the preset strategy in a target database, wherein the target database is a database corresponding to a data transmission module with the preset strategy.
5. The method according to claim 1, wherein the data transmission module is configured to transmit the target data to a target data table in the target database, and determine whether there is history data in the target data table, where the history data has an association relationship with the preset policy, where the history data has the same data content as the target data.
6. The method of claim 1, wherein after transmitting the target data to a target database by the data transmission module, the method further comprises:
receiving first feedback information sent by the target database;
under the condition that the first feedback information represents that the target data transmission fails, acquiring the data to be transmitted from the temporary data table, re-executing the step of changing the data to be transmitted through the preset strategy to obtain target data, and monitoring the execution state of the step of obtaining the target data;
under the condition that the execution state is abnormal, determining that the step of changing the data to be transmitted through the preset strategy to obtain target data is abnormal;
transmitting the target data to a target database through the data transmission module under the condition that the execution state is normal;
and receiving second feedback information sent by the target database, and displaying alarm information under the condition that the second feedback information represents that the target data transmission fails, wherein the alarm information represents that the data transmission module is abnormal.
7. The method of claim 6, wherein if the first feedback information characterizes the successful transmission of the target data, the method further comprises:
determining the generation moment of the first feedback information to obtain a first moment;
determining the time of sending the target data to obtain a second time;
calculating the time interval between the first time and the second time, and judging whether the time interval is longer than a preset duration;
and under the condition that the time interval is longer than the preset time length, determining that the target data transmission fails, re-executing the step of determining a preset strategy for changing the data to be transmitted according to the log information, and acquiring a data transmission module to which the preset strategy belongs.
8. A data transmission apparatus, comprising:
the first receiving unit is used for receiving a log storage instruction sent by a service system and acquiring log information in the service system according to the log storage instruction;
the first determining unit is used for determining the system type of the service system, processing the log information according to the system type to obtain data to be transmitted and a temporary data table to which the data to be transmitted belong, and storing the data to be transmitted into the temporary data table;
The acquisition unit is used for determining a preset strategy for changing the data to be transmitted according to the log information and acquiring a data transmission module to which the preset strategy belongs;
the first transmission unit is used for changing the data to be transmitted according to the preset strategy to obtain target data, and transmitting the target data to a target database according to the data transmission module.
9. A computer storage medium for storing a program, wherein the program when run controls a device in which the computer storage medium is located to perform the data transmission method of any one of claims 1 to 7.
10. An electronic device comprising one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the data transmission method of any of claims 1-7.
CN202311182745.XA 2023-09-13 2023-09-13 Data transmission method, device, storage medium and electronic equipment Pending CN117336135A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311182745.XA CN117336135A (en) 2023-09-13 2023-09-13 Data transmission method, device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311182745.XA CN117336135A (en) 2023-09-13 2023-09-13 Data transmission method, device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117336135A true CN117336135A (en) 2024-01-02

Family

ID=89282049

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311182745.XA Pending CN117336135A (en) 2023-09-13 2023-09-13 Data transmission method, device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117336135A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117729172A (en) * 2024-02-18 2024-03-19 成都深瑞同华科技有限公司 Data transmission method, device and storage medium in isolated network environment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117729172A (en) * 2024-02-18 2024-03-19 成都深瑞同华科技有限公司 Data transmission method, device and storage medium in isolated network environment

Similar Documents

Publication Publication Date Title
CN110825420A (en) Configuration parameter updating method, device, equipment and storage medium for distributed cluster
WO2021151312A1 (en) Method for determining inter-service dependency, and related apparatus
US10747776B2 (en) Replication control using eventually consistent meta-data
CN112559475B (en) Data real-time capturing and transmitting method and system
CN117336135A (en) Data transmission method, device, storage medium and electronic equipment
CN107566480B (en) User activity information acquisition method and device for mobile terminal application and storage medium
CN111177237B (en) Data processing system, method and device
CN105069029A (en) Real-time ETL (extraction-transformation-loading) system and method
CN114416868A (en) Data synchronization method, device, equipment and storage medium
CN111857981A (en) Data processing method and device
CN106293890B (en) A kind of method and device for business processing based on complexity
CN114090529A (en) Log management method, device, system and storage medium
CN116414914A (en) Data synchronization method and device, processor and electronic equipment
CN111435356A (en) Data feature extraction method and device, computer equipment and storage medium
US10728323B2 (en) Method and apparatus for operating infrastructure layer in cloud computing architecture
CN115982133A (en) Data processing method and device
CN114745448A (en) Multichannel protocol adaptation processing method, system and device
CN112596974A (en) Full link monitoring method, device, equipment and storage medium
CN114691443A (en) Cross section data sending method and device, electronic equipment and storage medium
CN112579189A (en) Configuration file updating method and device
CN117853221A (en) Method, device and system for monitoring consumption credit model
US11194665B2 (en) Systems and methods for seamless redelivery of missing data
CN117453655A (en) Data processing method and device, storage medium and electronic equipment
CN116303399A (en) Data monitoring method, system, device and storage medium
CN117290447A (en) Inspection method and device of data synchronization system, storage medium and electronic equipment

Legal Events

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