WO2021179589A1 - Data transmission method and data channel system - Google Patents

Data transmission method and data channel system Download PDF

Info

Publication number
WO2021179589A1
WO2021179589A1 PCT/CN2020/119709 CN2020119709W WO2021179589A1 WO 2021179589 A1 WO2021179589 A1 WO 2021179589A1 CN 2020119709 W CN2020119709 W CN 2020119709W WO 2021179589 A1 WO2021179589 A1 WO 2021179589A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
format
data channel
channel
cluster
Prior art date
Application number
PCT/CN2020/119709
Other languages
French (fr)
Chinese (zh)
Inventor
任超
李大虎
Original Assignee
北京旷视科技有限公司
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 北京旷视科技有限公司 filed Critical 北京旷视科技有限公司
Publication of WO2021179589A1 publication Critical patent/WO2021179589A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Definitions

  • This application relates to the field of computer technology, in particular to a data transmission method and a data channel system.
  • video image information application systems (hereinafter referred to as application systems) have been widely used, and there are more and more types.
  • the application system usually does not have the function of sending and receiving data, which leads to the inability to transmit data between different application systems, which in turn leads to the inability to coordinate the video image application between the users of the application systems.
  • the application system data standard specification was formulated.
  • the video image information database (hereinafter referred to as the database) is used as the hub of data interaction, and each application system realizes data interaction through the database.
  • the application system mainly focuses on the realization of video image application functions in the early stage of development, and does not support standard specifications and databases. Therefore, when the application system needs to interact with the database for data, it is necessary to spend manpower and material resources on the secondary development of the application system.
  • a data transmission method is provided, the method is applied to a data channel system, the data channel system includes a gateway control module and a data channel cluster, the gateway control module is connected to a database, and the data channel cluster Connecting to the application system, the method includes:
  • the gateway control module receives the first data in the first format sent by the database, and sends the first data to the data channel cluster; the first format is that the first data is stored in the database Format
  • the data channel cluster converts the first format of the first data into a second format, obtains the first data after the format conversion, and sends the first data after the format conversion to the application system;
  • the second format is a format in which the first data is stored in the application system;
  • the data channel cluster receives the second data in the third format sent by the application system, converts the third format of the second data into a fourth format, obtains the second data after the format conversion, and combines
  • the second data after the format conversion is sent to the gateway control module;
  • the third format is the format for storing the second data in the application system, and the fourth format is for storing the first data in the database. 2.
  • the format of the data is the format of the data;
  • the gateway control module sends the second data after the format conversion to the database.
  • the gateway control module includes an application program interface unit, the application program interface unit includes an application program interface corresponding to the first data, and the data channel cluster includes an application program interface corresponding to the first data.
  • the gateway control module receiving the first data in the first format sent by the database and sending the first data to the data channel cluster includes:
  • the application program interface unit receives the first data in the first format sent by the database through the first application program interface, and sends the first data to the first data channel in the data channel cluster .
  • the data channel cluster includes a first data channel corresponding to the first data, and the first data channel includes a first data mapping table and first data corresponding to the first data. driver;
  • the data channel cluster converts the first format of the first data into a second format, obtains the first data after the format conversion, and sends the first data after the format conversion to the application system, include:
  • the first data channel sends the first data after the format conversion to the application system through the first data driver.
  • the data channel cluster includes a second data channel corresponding to the second data, and the second data channel includes a second data mapping table and second data corresponding to the second data. driver;
  • the data channel cluster receives the second data in the third format sent by the application system, converts the third format of the second data into a fourth format, obtains the second data after the format conversion, and combines
  • the second data after the format conversion is sent to the gateway control module, including:
  • the second data channel receives the second data in the third format sent by the application system through the second data driver;
  • the second data channel converts the third format of the second data into a fourth format according to the second data mapping table to obtain the second data after the format conversion, and the second data after the format conversion is obtained.
  • the second data is sent to the gateway control module.
  • the gateway control module includes a gateway unit
  • the gateway control module sending the second data after the format conversion to the database includes:
  • the gateway control module sends the second data after the format conversion to the database through the gateway unit.
  • the data channel system further includes a channel management module, and the method further includes:
  • the channel management module obtains the data driver and the data mapping table corresponding to each data
  • the channel management module creates a data channel corresponding to each data according to a data driver and a data mapping table corresponding to each data to form the data channel cluster.
  • the data channel system includes multiple data channel clusters, and the multiple data channel clusters include a primary data channel cluster and a backup data channel cluster, and the method further includes:
  • the second data channel cluster is switched to the main data channel cluster, the first data channel cluster is the main data channel cluster, and the second data channel cluster is Backup data channel cluster.
  • the data channel system further includes a metadata management module
  • the method further includes:
  • the metadata management module obtains metadata of each data
  • the metadata management module analyzes and processes the metadata of each data to obtain data driver metadata and data mapping table metadata corresponding to each data;
  • the metadata management module performs translation processing on the data driver metadata and data mapping table metadata corresponding to each data to obtain the data driver and data mapping table corresponding to each data, and stores the data corresponding to each data Drive and data mapping table.
  • a data channel system in a second aspect, includes a gateway control module and a data channel cluster, the gateway control module is connected to a database, and the data channel cluster is connected to an application system;
  • the gateway control module is configured to receive first data in a first format sent by the database, and send the first data to the data channel cluster; the first format is that the database stores the The format of the first data;
  • the data channel cluster is configured to convert the first format of the first data into a second format, obtain the first data after the format conversion, and send the first data after the format conversion to the Application system;
  • the second format is a format in which the first data is stored in the application system;
  • the data channel cluster is configured to receive second data in a third format sent by the application system, convert the third format of the second data into a fourth format, and obtain the second data after the format conversion, And send the second data after the format conversion to the gateway control module;
  • the third format is the format in which the second data is stored in the application system, and the fourth format is the format stored in the database The format of the second data;
  • the gateway control module is configured to send the second data after the format conversion to the database.
  • the gateway control module includes an application program interface unit, the application program interface unit includes an application program interface corresponding to the first data, and the data channel cluster includes an application program interface corresponding to the first data.
  • the application program interface unit is configured to receive first data in a first format sent by the database through the first application program interface, and send the first data to the first data in the data channel cluster One data channel.
  • the data channel cluster includes a first data channel corresponding to the first data, and the first data channel includes a first data mapping table and first data corresponding to the first data. driver;
  • the first data channel is configured to convert the first format of the first data into a second format according to the first data mapping table to obtain the first data after the format conversion;
  • the first data channel is used to send the first data after the format conversion to the application system through the first data driver.
  • the data channel cluster includes a second data channel corresponding to the second data, and the second data channel includes a second data mapping table and second data corresponding to the second data. driver;
  • the second data channel is configured to receive the second data in the third format sent by the application system through the second data driver;
  • the second data channel is configured to convert the third format of the second data into a fourth format according to the second data mapping table to obtain the second data after the format conversion, and convert the format The latter second data is sent to the gateway control module.
  • the gateway control module includes a gateway unit
  • the gateway control module is configured to send the second data after the format conversion to the database through the gateway unit.
  • the data channel system further includes a channel management module
  • the channel management module is used to obtain the data driver and the data mapping table corresponding to each data
  • the channel management module is configured to create a data channel corresponding to each data according to a data driver and a data mapping table corresponding to each data to form the data channel cluster.
  • the data channel system includes multiple data channel clusters, and the multiple data channel clusters include a primary data channel cluster and a backup data channel cluster;
  • the channel management module is configured to switch the second data channel cluster to the main data channel cluster when the failure of the first data channel cluster is detected, the first data channel cluster is the main data channel cluster, and the second data channel cluster is the main data channel cluster.
  • the channel cluster is a backup data channel cluster.
  • the data channel system further includes a metadata management module
  • the metadata management module is used to obtain metadata of each data
  • the metadata management module is configured to analyze and process the metadata of each data to obtain data driver metadata and data mapping table metadata corresponding to each data;
  • the metadata management module is used to translate the data driver metadata and data mapping table metadata corresponding to each data to obtain the data driver and data mapping table corresponding to each data, and to store the data Corresponding data driver and data mapping table.
  • a computer device including a memory and a processor, the memory stores a computer program that can run on the processor, and when the processor executes the computer program, any one of the first aspect is implemented The steps of the method described in item.
  • a computer-readable storage medium on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any one of the methods in the first aspect.
  • the data channel system includes a gateway control module and a data channel cluster.
  • the gateway control module is connected to the database, and the data channel cluster is connected to the application system.
  • the gateway control module receives the first data in the first format sent by the database, and sends the first data to the data channel cluster.
  • the first format is a format in which the first data is stored in the database.
  • the data channel cluster converts the first format of the first data into the second format, obtains the first data after the format conversion, and sends the first data after the format conversion to the application system.
  • the second format is a format in which the first data is stored in the application system.
  • the data channel cluster receives the second data in the third format sent by the application system, converts the third format of the second data into the fourth format, obtains the second data after the format conversion, and sends the second data after the format conversion to Gateway control module.
  • the third format is a format for storing the second data in the application system
  • the fourth format is a format for storing the second data in the database.
  • the gateway control module sends the converted second data to the database. In this way, there is no need to spend manpower and material resources on the secondary development of the application system.
  • By setting a data channel system between the application system and the database data interaction between the application system and the database is realized, and the database is the hub to realize the interaction between different application systems. .
  • FIG. 1 is an architecture diagram of an application environment provided by an embodiment of the application
  • FIG. 2 is a flowchart of a data transmission method provided by an embodiment of this application.
  • FIG. 3 is a flowchart of a method for creating a data channel cluster provided by an embodiment of the application
  • FIG. 4 is a flowchart of a metadata management method provided by an embodiment of the application.
  • FIG. 5A is a flowchart of an example of a data transmission method provided by an embodiment of this application.
  • 5B is a flowchart of an example of a data transmission method provided by an embodiment of this application.
  • FIG. 6 is a schematic structural diagram of a data channel system provided by an embodiment of this application.
  • FIG. 7 is a schematic structural diagram of a computer device provided by an embodiment of this application.
  • FIG. 1 is an architecture of an application environment provided by an embodiment of the application. picture.
  • the application environment includes a database 110, a data channel system 120 and an application system 130.
  • the database 110 and the application system 130 are connected through a data channel system 120.
  • the database 110 is used to store video image data resources (such as face information, vehicle information, alarm information, collection equipment information, etc.) of the application system based on a standard format (such as GAT1400 format); the data channel system 120 is used to check the database
  • the video image data transmitted between 110 and the application system 130 undergoes format conversion processing; the application system 130 is used to obtain the video image data resources uploaded by other application systems 130 from the database 110 through the data channel system 120, or through the data channel system 120 uploads the locally stored video image data resource to the database 110 so that other application systems 130 can obtain the video image data resource from the database 110.
  • the data channel system includes a gateway control module and a data channel cluster.
  • the gateway control module is connected to the database
  • the data channel cluster is connected to the application system.
  • Step 201 The gateway control module receives the first data in the first format sent by the database, and sends the first data to the data channel cluster.
  • the first format is a format in which the first data is stored in the database.
  • the database stores various types of data uploaded by each application system (such as snapshot data, alarm data, equipment data, etc.), and different types of data correspond to
  • the data in the first format is recorded as the first data.
  • the application system may send a data request to the database.
  • the data request carries the address of the first data.
  • the database can send the first data in the first format to the data channel system.
  • the first format is a format in which the first data is stored in the database.
  • the gateway control module in the data channel system can receive the first data in the first format sent by the database, and send the first data to the data channel cluster.
  • the gateway control module includes an application program interface unit, the application program interface unit includes an application program interface corresponding to the first data, and the data channel cluster includes a first data channel corresponding to the first data.
  • the gateway control module receives the first data in the first format sent by the database, and sends the first data to the data channel cluster.
  • the processing process is that the application program interface unit receives the first data in the first format sent by the database through the first application program interface. , And send the first data to the first data channel in the data channel cluster.
  • the gateway control module includes an application program interface unit.
  • the application program interface unit includes application program interfaces for receiving different types of data (that is, one application program interface in the application program interface unit corresponds to one type of data).
  • the data channel cluster includes data channels for processing different types of data (that is, one data channel in the data channel cluster corresponds to one type of data). Therefore, a type of data corresponds to an application program interface in the application program interface unit, and corresponds to a data channel in the data channel cluster (for example, snapshot data corresponds to the snapshot data channel, alarm data corresponds to the alarm data channel, and device data corresponds to the device data Channels, etc.).
  • the application program interface unit includes the first application program interface for the first data
  • the data channel cluster includes the first data channel corresponding to the first data.
  • the application program interface unit in the gateway control module can receive the first data in the first format sent by the database through the first application program interface. Then, the application program interface unit may send the first data to the first data channel in the data channel cluster.
  • Step 202 The data channel cluster converts the first format of the first data into the second format, obtains the first data after the format conversion, and sends the first data after the format conversion to the application system.
  • the second format is a format in which the first data is stored in the application system.
  • the application system since the application system mainly focuses on the realization of the video image application function in the early stage of development, it does not support the standard specification, that is, the format of the first data stored in the application system and the database is not necessarily the same. Therefore, in order to ensure that the application system can store and process the first data, after receiving the first data, the data channel cluster can further convert the first format of the first data into the second format to obtain the first data after the format conversion.
  • the second format is a format in which the first data is stored in the application system.
  • the data channel cluster can send the first data after the format conversion to the application system.
  • the application system can receive the first data in the second format for storage and processing. In this way, there is no need to spend manpower and material resources on the secondary development of the application system, and data interaction between the application system and the database is realized by setting a data channel system between the application system and the database.
  • the data channel cluster includes a first data channel corresponding to the first data, and the first data channel includes a first data mapping table and a first data driver corresponding to the first data.
  • the data channel cluster converts the first format of the first data into the second format, obtains the first data after the format conversion, and sends the first data after the format conversion to the application system.
  • the processing process is as follows.
  • Step 1 The first data channel converts the first format of the first data into the second format according to the first data mapping table to obtain the first data after the format conversion.
  • the storage methods of different types of data in the application system are also different, and the data drivers corresponding to different storage methods are also different (such as Representational State Transfer, REST )
  • the interface corresponds to the HyperText Transfer Protocol (HTTP) client
  • the database corresponds to the database connection pool
  • the message middleware corresponds to the consumer listener). Therefore, the data channel cluster contains data channels for processing different types of data.
  • the data channel includes a data mapping table for format conversion of different types of data and a data driver for sending different types of data.
  • the data channel cluster includes a first data channel corresponding to the first data, and the first data channel includes a first data mapping table and a first data driver corresponding to the first data.
  • the first data channel can convert the first format of the first data into the second format according to the first data mapping table to obtain the first data after the format conversion.
  • Step 2 The first data channel sends the converted first data to the application system through the first data driver.
  • the first data after the format conversion may be sent to the application system through the first data driver.
  • the application system can receive the first data in the second format for storage and processing.
  • Step 203 The data channel cluster receives the second data in the third format sent by the application system, converts the third format of the second data into the fourth format, obtains the second data after the format conversion, and converts the second data after the format conversion.
  • the data is sent to the gateway control module.
  • the third format is a format for storing the second data in the application system
  • the fourth format is a format for storing the second data in the database.
  • the application system can send the second format of the third format to the data channel cluster in the data channel system.
  • the third format is a format for storing the second data in the application system.
  • the data channel cluster in the data channel system can receive the second data in the third format sent by the application system. Because the format of the second data stored in the application system and the database is not necessarily the same. Therefore, in order to ensure that the database can store the second data, the data channel cluster may further convert the third format of the second data into the fourth format to obtain the second data after the format conversion.
  • the fourth format is a format for storing the second data in the database. After that, the data channel cluster can send the second data after the format conversion to the gateway control module.
  • the data channel cluster includes a second data channel corresponding to the second data
  • the second data channel includes a second data mapping table and a second data driver corresponding to the second data.
  • the data channel cluster receives the second data in the third format sent by the application system, converts the third format of the second data into the fourth format, obtains the second data after the format conversion, and sends the second data after the format conversion to
  • the processing procedure of the gateway control module is as follows.
  • Step 1 The second data channel receives the second data in the third format sent by the application system through the second data driver.
  • the storage methods of different types of data in the application system are different, and the data drivers corresponding to different storage methods are also different (for example, Representational State Transfer, REST)
  • the interface corresponds to the HyperText Transfer Protocol (HTTP) client
  • the database corresponds to the database connection pool
  • the message middleware corresponds to the consumer listener). Therefore, the data channel cluster contains data channels for processing different types of data.
  • the data channel includes a data mapping table for format conversion of different types of data and a data driver for receiving different types of data.
  • the data channel cluster includes a second data channel corresponding to the second data
  • the second data channel includes a second data mapping table and a second data driver corresponding to the second data.
  • the application system can send the second data in the third format to the second data driver of the second data channel in the data channel cluster.
  • the second data channel can receive the second data in the third format sent by the application system through the second data driver.
  • Step 2 The second data channel converts the third format of the second data into the fourth format according to the second data mapping table to obtain the second data after the format conversion, and sends the second data after the format conversion to the gateway control module .
  • the second data channel after the second data channel receives the second data in the third format sent by the application system, it can convert the third format of the second data into the fourth format according to the second data mapping table to obtain the converted format The second data. Then, the second data channel may send the second data after the format conversion to the gateway control module.
  • Step 204 The gateway control module sends the converted second data to the database.
  • the gateway control module after the gateway control module receives the format-converted second data, it can send the format-converted second data to the database.
  • the database can receive the second data in the fourth format to store the second data in the fourth format. In this way, there is no need to spend manpower and material resources on the secondary development of the application system, and data interaction between the application system and the database is realized by setting a data channel system between the application system and the database.
  • the gateway control module includes a gateway unit.
  • the processing process of the gateway control module sending the second data after the format conversion to the database is that the gateway control module sends the second data after the format conversion to the database through the gateway unit.
  • the gateway control module also includes a gateway unit for sending data to the database. After the gateway control module receives the format-converted second data, it can send the format-converted second data to the database through the gateway unit.
  • step 101 and step 102 are processes for the application system to obtain the first data from the database through the data channel system
  • steps 103 and 104 are processes for the application system to upload the second data to the database through the data channel.
  • the processing sequence of the above two processes does not distinguish the sequence.
  • the data channel system further includes a channel management module, and the channel management module is used to create a data channel cluster.
  • the specific processing process is as follows:
  • Step 301 The channel management module obtains the data driver and the data mapping table corresponding to each data.
  • data drivers and data mapping tables corresponding to different types of data are also different (that is, one type of data corresponds to one data driver and one data mapping table).
  • Data drivers and data mapping tables corresponding to various types of data can be pre-stored in the data channel system. Among them, the generation process of the data driver and the data mapping table corresponding to each type of data will be described in detail later.
  • the channel management module can obtain the data corresponding to each type from the data channel system pre-stored with data drivers and data mapping tables corresponding to each type of data. Data drive and data mapping table.
  • the channel management module can create a data channel cluster when the data channel system is initialized, or it can create a data channel cluster according to a user's instruction, which is not limited in this application.
  • the channel management module creates a data channel corresponding to each data according to the data driver and the data mapping table corresponding to each data to form a data channel cluster.
  • the channel management module since one type of data corresponds to a program interface in the application program interface unit, and a data channel in the data channel cluster, the channel management module obtains the data driver and data map corresponding to each type of data. After the table, for each type of data, the channel management module can create a data channel corresponding to the type of data according to the data driver and data mapping table corresponding to the type of data, so as to obtain the data channel corresponding to each type of data. Data channel cluster.
  • the channel management module can also open a data channel in the data channel cluster, pause operation, filter setting, traffic monitoring setting, destroy operation, re-creation operation, and data channel cluster copy operation according to the user's instructions. .
  • the channel management module can also provide a fuse protection strategy for the data channel when any one of the application system and the database is down abnormally.
  • the data channel system includes multiple data channel clusters, and the multiple data channel clusters include a main data channel cluster and a backup data channel cluster.
  • the channel management module can
  • the second data channel cluster is switched to the primary data channel cluster, the first data channel cluster is the primary data channel cluster, and the second data channel cluster is the backup data channel cluster.
  • the data channel system further includes a metadata management module.
  • the metadata management module can generate the drive and data mapping table corresponding to each data according to the metadata of each data. As shown in Figure 4, the specific process is as follows.
  • Step 401 The metadata management module obtains metadata of each data.
  • the data channel system may pre-store metadata of each view data resource (that is, each data) in the application system.
  • metadata is a method used to describe the acquisition of various view data resources (such as face information, vehicle information, alarm information, collection equipment information, etc.) in the application system (such as REST interface, message middleware, database, big data, etc.) Warehouse, etc.) data rules; metadata includes two parts: data sources (resources) and field mappings (mappings).
  • technicians can describe and configure the metadata of each data in XML (an extensible markup language) or JSON (a programming language) in advance.
  • the metadata of the captured data resource includes the mapping relationship between the captured data source and the captured field.
  • step 402 the metadata management module parses the metadata of each data to obtain data driver metadata and data mapping table metadata corresponding to each data.
  • the metadata management module can analyze and process the metadata of the data to obtain the data driver metadata and data corresponding to the data.
  • Data mapping table metadata corresponds to the data source in the metadata
  • the data mapping table metadata corresponds to the field mapping relationship in the metadata.
  • Step 403 The metadata management module translates the data driver metadata and data mapping table metadata corresponding to each data to obtain the data driver and data mapping table corresponding to each data, and stores the data driver and data mapping table corresponding to each data.
  • the metadata management module can the data driver metadata and data mapping table metadata corresponding to the data Perform translation processing to obtain the data driver and data mapping table corresponding to the data. Then, the metadata management module can store the data driver and data mapping table corresponding to each data locally.
  • the metadata management module can store the data driver and data mapping table corresponding to each data in ETCD (an open source, high-availability, high-concurrency distributed key-value storage system), so as to ensure the creation of data channels The data driver and data mapping table will not be lost, thereby improving the stability of the channel system.
  • ETCD an open source, high-availability, high-concurrency distributed key-value storage system
  • the data channel corresponding to each type of data can be deployed in multiple instances. Through the management of the data driver and data mapping table of the data through ETCD, the data idempotence between multiple instances can be ensured.
  • FIG. 5A is a flowchart of an example of a data transmission method provided by an embodiment of the application.
  • the snapshot data corresponds to the snapshot application program interface in the application program interface unit
  • the data channel cluster corresponds to the snapshot data channel.
  • the snapshot data channel includes the snapshot data driver and the snapshot data mapping table.
  • the processing procedure includes the following steps.
  • Step 511 The application program interface unit in the gateway control module receives the snapshot data in the first format sent by the database through the snapshot application program interface.
  • the first format is the format for storing the snapshot data in the database.
  • Step 512 The application program interface unit in the gateway control module sends the snapshot data in the first format to the snapshot data channel in the data channel cluster.
  • the captured data channel converts the first format of the captured data into the second format through the captured data mapping table to obtain the captured captured data after the format conversion.
  • the second format is a format for storing snapshot data in the application system.
  • the snapshot data channel sends the format-converted snapshot data to the application system through the snapshot data driver.
  • step 511 to step 514 The processing procedure from step 511 to step 514 and the processing procedure type from step 201 to step 202 are not repeated here.
  • FIG. 5B is a flowchart of an example of a data transmission method provided by an embodiment of the application.
  • the snapshot data is taken as an example.
  • the snapshot data corresponds to the snapshot data channel in the data channel cluster.
  • the snapshot data channel includes the snapshot data driver and the snapshot data mapping table.
  • the processing procedure includes the following steps.
  • Step 521 The snapshot data channel in the data channel cluster receives the snapshot data in the second format sent by the application system through the snapshot data driver.
  • the second format is a format for storing snapshot data in the application system.
  • Step 522 The captured data channel converts the second format of the captured data into the first format through the captured data mapping table to obtain the captured captured data after the format conversion.
  • the first format is the format for storing the snapshot data in the database.
  • Step 523 The snapshot data channel sends the format-converted snapshot data to the gateway unit in the gateway control module.
  • step 524 the gateway control module sends the converted snapshot data to the database through the gateway unit.
  • step 521 to step 524 The processing procedure from step 521 to step 524 and the processing procedure type from step 203 to step 204 are not repeated here.
  • the embodiment of the present application provides a data transmission method.
  • This method is applied to the data channel system.
  • the data channel system includes a gateway control module and a data channel cluster.
  • the gateway control module is connected to the database, and the data channel cluster is connected to the application system.
  • the gateway control module receives the first data in the first format sent by the database, and sends the first data to the data channel cluster.
  • the first format is a format in which the first data is stored in the database.
  • the data channel cluster converts the first format of the first data into the second format, obtains the first data after the format conversion, and sends the first data after the format conversion to the application system.
  • the second format is a format in which the first data is stored in the application system.
  • the data channel cluster receives the second data in the third format sent by the application system, converts the third format of the second data into the fourth format, obtains the second data after the format conversion, and sends the second data after the format conversion to Gateway control module.
  • the third format is a format for storing the second data in the application system
  • the fourth format is a format for storing the second data in the database.
  • the gateway control module sends the converted second data to the database. In this way, there is no need to spend manpower and material resources on the secondary development of the application system.
  • By setting a data channel system between the application system and the database data interaction between the application system and the database is realized, and the database is the hub to realize the interaction between different application systems. .
  • the data channel system includes a gateway control module 610 and a data channel cluster 620.
  • the gateway control module 610 is connected to a database, and the data channel cluster 620 is connected to the application system;
  • the gateway control module 610 is configured to receive first data in a first format sent by the database, and send the first data to the data channel cluster 620; the first format is stored in the database The format of the first data;
  • the data channel cluster 620 is configured to convert the first format of the first data into a second format, obtain the first data after the format conversion, and send the first data after the format conversion to the The application system;
  • the second format is the format in which the first data is stored in the application system;
  • the data channel cluster 620 is configured to receive second data in a third format sent by the application system, convert the third format of the second data into a fourth format, and obtain the second data after the format conversion , And send the second data after the format conversion to the gateway control module 610;
  • the third format is the format in which the second data is stored in the application system, and the fourth format is the database The format in which the second data is stored in;
  • the gateway control module 610 is configured to send the second data after the format conversion to the database.
  • the gateway control module 610 includes an application program interface unit, the application program interface unit includes an application program interface corresponding to the first data, and the data channel cluster 620 includes the first The first data channel corresponding to the data;
  • the application program interface unit is configured to receive the first data in the first format sent by the database through the first application program interface, and send the first data to the data channel cluster 620.
  • the first data channel is configured to receive the first data in the first format sent by the database through the first application program interface, and send the first data to the data channel cluster 620.
  • the first data channel is configured to receive the first data in the first format sent by the database through the first application program interface, and send the first data to the data channel cluster 620.
  • the first data channel is configured to receive the first data in the first format sent by the database through the first application program interface
  • the data channel cluster 620 includes a first data channel corresponding to the first data, and the first data channel includes a first data mapping table and a first data mapping table corresponding to the first data.
  • the first data channel is configured to convert the first format of the first data into a second format according to the first data mapping table to obtain the first data after the format conversion;
  • the first data channel is used to send the first data after the format conversion to the application system through the first data driver.
  • the data channel cluster 620 includes a second data channel corresponding to the second data, and the second data channel includes a second data mapping table and a second data mapping table corresponding to the second data.
  • the second data channel is configured to receive the second data in the third format sent by the application system through the second data driver;
  • the second data channel is configured to convert the third format of the second data into a fourth format according to the second data mapping table to obtain the second data after the format conversion, and convert the format The latter second data is sent to the gateway control module 610.
  • the gateway control module 610 includes a gateway unit
  • the gateway control module 610 is configured to send the second data after the format conversion to the database through the gateway unit.
  • the data channel system further includes a channel management module 630;
  • the channel management module 630 is used to obtain the data driver and data mapping table corresponding to each data
  • the channel management module 630 is configured to create a data channel corresponding to each data according to a data driver and a data mapping table corresponding to each data to form the data channel cluster 620.
  • the data channel system includes multiple data channel clusters, and the multiple data channel clusters include a primary data channel cluster and a backup data channel cluster;
  • the channel management module 630 is configured to switch the second data channel cluster to the primary data channel cluster when the failure of the first data channel cluster is detected, the first data channel cluster is the primary data channel cluster, and the second data channel cluster is the primary data channel cluster.
  • the data channel cluster is a backup data channel cluster.
  • the data channel system further includes a metadata management module 640;
  • the metadata management module 640 is used to obtain metadata of each data
  • the metadata management module 640 is configured to analyze and process the metadata of each data to obtain data driver metadata and data mapping table metadata corresponding to each data;
  • the metadata management module 640 is configured to perform translation processing on the data driver metadata and data mapping table metadata corresponding to each data to obtain the data driver and data mapping table corresponding to each data, and to store the data The data driver and data mapping table corresponding to the data.
  • the embodiment of the present application provides a data channel system.
  • the data channel system includes a gateway control module and a data channel cluster.
  • the gateway control module is connected to the database, and the data channel cluster is connected to the application system.
  • the gateway control module receives the first data in the first format sent by the database, and sends the first data to the data channel cluster.
  • the first format is a format in which the first data is stored in the database.
  • the data channel cluster converts the first format of the first data into the second format, obtains the first data after the format conversion, and sends the first data after the format conversion to the application system.
  • the second format is a format in which the first data is stored in the application system.
  • the data channel cluster receives the second data in the third format sent by the application system, converts the third format of the second data into the fourth format, obtains the second data after the format conversion, and sends the second data after the format conversion to Gateway control module.
  • the third format is a format for storing the second data in the application system
  • the fourth format is a format for storing the second data in the database.
  • the gateway control module sends the converted second data to the database. In this way, there is no need to spend manpower and material resources on the secondary development of the application system.
  • By setting a data channel system between the application system and the database data interaction between the application system and the database is realized, and the database is the hub to realize the interaction between different application systems. .
  • a computer device including a memory and a processor, the memory stores a computer program that can run on the processor, and the processor executes the computer program When realizing the above-mentioned data transmission method.
  • a computer-readable storage medium on which a computer program is stored, and the computer program is executed by a processor to realize the above-mentioned data transmission method.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Abstract

The present application relates to a data transmission method and a data channel system. The method is applied to a data channel system. The method comprises: a gateway control module receives first data in a first format sent by a database, and sends the first data to a data channel cluster; the data channel cluster converts the first format of the first data into a second format to obtain first data subjected to format conversion, and sends the first data subjected to format conversion to an application system; the data channel cluster receives second data in a third format sent by the application system, converts the third format of the second data into a fourth format to obtain second data subjected to format conversion, and sends the second data subjected to format conversion to the gateway control module; the gateway control module sends the second data subjected to format conversion to a database. Use of the present application can achieve data interaction between an application system and a database.

Description

数据的传输方法及数据通道系统Data transmission method and data channel system
本申请基于申请号为202010174731.3、申请日为2020年3月13日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is based on a Chinese patent application with an application number of 202010174731.3 and an application date of March 13, 2020, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated by reference into this application.
技术领域Technical field
本申请涉及计算机技术领域,特别是涉及一种数据的传输方法及数据通道系统。This application relates to the field of computer technology, in particular to a data transmission method and a data channel system.
背景技术Background technique
目前,视频图像信息应用系统(以下简称应用系统)得到了广泛应用,种类也越来越多。但应用系统通常没有数据收发功能,从而导致不同应用系统之间无法传输数据,进而导致各应用系统使用单位之间无法进行视频图像应用上的协调工作。At present, video image information application systems (hereinafter referred to as application systems) have been widely used, and there are more and more types. However, the application system usually does not have the function of sending and receiving data, which leads to the inability to transmit data between different application systems, which in turn leads to the inability to coordinate the video image application between the users of the application systems.
为了解决上述问题,制定了应用系统数据标准规范。标准规范中将视频图像信息数据库(以下简称数据库)作为数据交互的枢纽,各应用系统通过数据库实现数据交互。In order to solve the above problems, the application system data standard specification was formulated. In the standard specification, the video image information database (hereinafter referred to as the database) is used as the hub of data interaction, and each application system realizes data interaction through the database.
然而,应用系统在开发初期主要侧重视频图像应用功能的实现,对于标准规范和数据库并不支持。因此,当应用系统需要与数据库进行数据交互时,需要耗费人力物力对应用系统进行二次开发。However, the application system mainly focuses on the realization of video image application functions in the early stage of development, and does not support standard specifications and databases. Therefore, when the application system needs to interact with the database for data, it is necessary to spend manpower and material resources on the secondary development of the application system.
发明内容Summary of the invention
基于此,有必要针对上述技术问题,提供一种数据的传输方法及数据通道系统。Based on this, it is necessary to provide a data transmission method and a data channel system in response to the above technical problems.
第一方面,提供了一种数据的传输方法,所述方法应用于数据通道系统,所述数据通道系统包括网关控制模块和数据通道集群,所述网关控制模块与数据库连接,所述数据通道集群与应用系统连接,所述方法包括:In a first aspect, a data transmission method is provided, the method is applied to a data channel system, the data channel system includes a gateway control module and a data channel cluster, the gateway control module is connected to a database, and the data channel cluster Connecting to the application system, the method includes:
所述网关控制模块接收所述数据库发送的第一格式的第一数据,并将所述第一数据发送至所述数据通道集群;所述第一格式为所述数据库中存储所述第一数据的格式;The gateway control module receives the first data in the first format sent by the database, and sends the first data to the data channel cluster; the first format is that the first data is stored in the database Format
所述数据通道集群将所述第一数据的所述第一格式转换为第二格式,得到格式转换后的第一数据,并将所述格式转换后的第一数据发送至所述应用系统;所述第二格式为所述应用系统中存储所述第一数据的格式;The data channel cluster converts the first format of the first data into a second format, obtains the first data after the format conversion, and sends the first data after the format conversion to the application system; The second format is a format in which the first data is stored in the application system;
所述数据通道集群接收所述应用系统发送的第三格式的第二数据,将所述第二数 据的所述第三格式转换为第四格式,得到格式转换后的第二数据,并将所述格式转换后的第二数据发送至所述网关控制模块;所述第三格式为所述应用系统中存储所述第二数据的格式,所述第四格式为所述数据库中存储所述第二数据的格式;The data channel cluster receives the second data in the third format sent by the application system, converts the third format of the second data into a fourth format, obtains the second data after the format conversion, and combines The second data after the format conversion is sent to the gateway control module; the third format is the format for storing the second data in the application system, and the fourth format is for storing the first data in the database. 2. The format of the data;
所述网关控制模块将所述格式转换后的第二数据发送至所述数据库。The gateway control module sends the second data after the format conversion to the database.
作为一种可选的实施方式,所述网关控制模块包括应用程序接口单元,所述应用程序接口单元包含所述第一数据对应的应用程序接口,所述数据通道集群包含所述第一数据对应的第一数据通道;As an optional implementation manner, the gateway control module includes an application program interface unit, the application program interface unit includes an application program interface corresponding to the first data, and the data channel cluster includes an application program interface corresponding to the first data. The first data channel;
所述网关控制模块接收所述数据库发送的第一格式的第一数据,并将所述第一数据发送至所述数据通道集群,包括:The gateway control module receiving the first data in the first format sent by the database and sending the first data to the data channel cluster includes:
所述应用程序接口单元通过所述第一应用程序接口接收所述数据库发送的第一格式的第一数据,并将所述第一数据发送至所述数据通道集群中的所述第一数据通道。The application program interface unit receives the first data in the first format sent by the database through the first application program interface, and sends the first data to the first data channel in the data channel cluster .
作为一种可选的实施方式,所述数据通道集群包含所述第一数据对应的第一数据通道,所述第一数据通道包括所述第一数据对应的第一数据映射表和第一数据驱动器;As an optional implementation manner, the data channel cluster includes a first data channel corresponding to the first data, and the first data channel includes a first data mapping table and first data corresponding to the first data. driver;
所述数据通道集群将所述第一数据的所述第一格式转换为第二格式,得到格式转换后的第一数据,并将所述格式转换后的第一数据发送至所述应用系统,包括:The data channel cluster converts the first format of the first data into a second format, obtains the first data after the format conversion, and sends the first data after the format conversion to the application system, include:
所述第一数据通道根据所述第一数据映射表将所述第一数据的所述第一格式转换为第二格式,得到格式转换后的第一数据;Converting, by the first data channel, the first format of the first data into a second format according to the first data mapping table, to obtain the first data after the format conversion;
所述第一数据通道通过所述第一数据驱动器将所述格式转换后的第一数据发送至所述应用系统。The first data channel sends the first data after the format conversion to the application system through the first data driver.
作为一种可选的实施方式,所述数据通道集群包含所述第二数据对应的第二数据通道,所述第二数据通道包括所述第二数据对应的第二数据映射表和第二数据驱动器;As an optional implementation manner, the data channel cluster includes a second data channel corresponding to the second data, and the second data channel includes a second data mapping table and second data corresponding to the second data. driver;
所述数据通道集群接收所述应用系统发送的第三格式的第二数据,将所述第二数据的所述第三格式转换为第四格式,得到格式转换后的第二数据,并将所述格式转换后的第二数据发送至所述网关控制模块,包括:The data channel cluster receives the second data in the third format sent by the application system, converts the third format of the second data into a fourth format, obtains the second data after the format conversion, and combines The second data after the format conversion is sent to the gateway control module, including:
所述第二数据通道通过所述第二数据驱动器接收所述应用系统发送的第三格式的第二数据;The second data channel receives the second data in the third format sent by the application system through the second data driver;
所述第二数据通道根据所述第二数据映射表将所述第二数据的所述第三格式转换为第四格式,得到格式转换后的第二数据,并将所述格式转换后的第二数据发送至所述网关控制模块。The second data channel converts the third format of the second data into a fourth format according to the second data mapping table to obtain the second data after the format conversion, and the second data after the format conversion is obtained. The second data is sent to the gateway control module.
作为一种可选的实施方式,所述网关控制模块包括网关单元;As an optional implementation manner, the gateway control module includes a gateway unit;
所述网关控制模块将所述格式转换后的第二数据发送至所述数据库,包括:The gateway control module sending the second data after the format conversion to the database includes:
所述网关控制模块通过所述网关单元将所述格式转换后的第二数据发送至所述数据库。The gateway control module sends the second data after the format conversion to the database through the gateway unit.
作为一种可选的实施方式,所述数据通道系统还包括通道管理模块,所述方法还包括:As an optional implementation manner, the data channel system further includes a channel management module, and the method further includes:
所述通道管理模块获取各数据对应的数据驱动器和数据映射表;The channel management module obtains the data driver and the data mapping table corresponding to each data;
所述通道管理模块根据所述各数据对应的数据驱动器和数据映射表,创建所述各数据对应的数据通道,组成所述数据通道集群。The channel management module creates a data channel corresponding to each data according to a data driver and a data mapping table corresponding to each data to form the data channel cluster.
作为一种可选的实施方式,所述数据通道系统包括多个数据通道集群,所述多个数据通道集群包括主数据通道集群和备份数据通道集群,所述方法还包括:As an optional implementation manner, the data channel system includes multiple data channel clusters, and the multiple data channel clusters include a primary data channel cluster and a backup data channel cluster, and the method further includes:
当所述通道管理模块检测到第一数据通道集群故障时,将第二数据通道集群切换为主数据通道集群,所述第一数据通道集群为主数据通道集群,所述第二数据通道集群为备份数据通道集群。When the channel management module detects the failure of the first data channel cluster, the second data channel cluster is switched to the main data channel cluster, the first data channel cluster is the main data channel cluster, and the second data channel cluster is Backup data channel cluster.
作为一种可选的实施方式,所述数据通道系统还包括元数据管理模块,所述方法还包括:As an optional implementation manner, the data channel system further includes a metadata management module, and the method further includes:
所述元数据管理模块获取各数据的元数据;The metadata management module obtains metadata of each data;
所述元数据管理模块对所述各数据的元数据进行解析处理,得到所述各数据对应的数据驱动器元数据和数据映射表元数据;The metadata management module analyzes and processes the metadata of each data to obtain data driver metadata and data mapping table metadata corresponding to each data;
所述元数据管理模块对所述各数据对应的数据驱动器元数据和数据映射表元数据进行翻译处理,得到所述各数据对应的数据驱动器和数据映射表,并存储所述各数据对应的数据驱动器和数据映射表。The metadata management module performs translation processing on the data driver metadata and data mapping table metadata corresponding to each data to obtain the data driver and data mapping table corresponding to each data, and stores the data corresponding to each data Drive and data mapping table.
第二方面,提供了一种数据通道系统,所述数据通道系统包括网关控制模块和数据通道集群,所述网关控制模块与数据库连接,所述数据通道集群与应用系统连接;In a second aspect, a data channel system is provided, the data channel system includes a gateway control module and a data channel cluster, the gateway control module is connected to a database, and the data channel cluster is connected to an application system;
所述网关控制模块,用于接收所述数据库发送的第一格式的第一数据,并将所述第一数据发送至所述数据通道集群;所述第一格式为所述数据库中存储所述第一数据的格式;The gateway control module is configured to receive first data in a first format sent by the database, and send the first data to the data channel cluster; the first format is that the database stores the The format of the first data;
所述数据通道集群,用于将所述第一数据的所述第一格式转换为第二格式,得到格式转换后的第一数据,并将所述格式转换后的第一数据发送至所述应用系统;所述第二格式为所述应用系统中存储所述第一数据的格式;The data channel cluster is configured to convert the first format of the first data into a second format, obtain the first data after the format conversion, and send the first data after the format conversion to the Application system; the second format is a format in which the first data is stored in the application system;
所述数据通道集群,用于接收所述应用系统发送的第三格式的第二数据,将所述 第二数据的所述第三格式转换为第四格式,得到格式转换后的第二数据,并将所述格式转换后的第二数据发送至所述网关控制模块;所述第三格式为所述应用系统中存储所述第二数据的格式,所述第四格式为所述数据库中存储所述第二数据的格式;The data channel cluster is configured to receive second data in a third format sent by the application system, convert the third format of the second data into a fourth format, and obtain the second data after the format conversion, And send the second data after the format conversion to the gateway control module; the third format is the format in which the second data is stored in the application system, and the fourth format is the format stored in the database The format of the second data;
所述网关控制模块,用于将所述格式转换后的第二数据发送至所述数据库。The gateway control module is configured to send the second data after the format conversion to the database.
作为一种可选的实施方式,所述网关控制模块包括应用程序接口单元,所述应用程序接口单元包含所述第一数据对应的应用程序接口,所述数据通道集群包含所述第一数据对应的第一数据通道;As an optional implementation manner, the gateway control module includes an application program interface unit, the application program interface unit includes an application program interface corresponding to the first data, and the data channel cluster includes an application program interface corresponding to the first data. The first data channel;
所述应用程序接口单元,用于通过所述第一应用程序接口接收所述数据库发送的第一格式的第一数据,并将所述第一数据发送至所述数据通道集群中的所述第一数据通道。The application program interface unit is configured to receive first data in a first format sent by the database through the first application program interface, and send the first data to the first data in the data channel cluster One data channel.
作为一种可选的实施方式,所述数据通道集群包含所述第一数据对应的第一数据通道,所述第一数据通道包括所述第一数据对应的第一数据映射表和第一数据驱动器;As an optional implementation manner, the data channel cluster includes a first data channel corresponding to the first data, and the first data channel includes a first data mapping table and first data corresponding to the first data. driver;
所述第一数据通道,用于根据所述第一数据映射表将所述第一数据的所述第一格式转换为第二格式,得到格式转换后的第一数据;The first data channel is configured to convert the first format of the first data into a second format according to the first data mapping table to obtain the first data after the format conversion;
所述第一数据通道,用于通过所述第一数据驱动器将所述格式转换后的第一数据发送至所述应用系统。The first data channel is used to send the first data after the format conversion to the application system through the first data driver.
作为一种可选的实施方式,所述数据通道集群包含所述第二数据对应的第二数据通道,所述第二数据通道包括所述第二数据对应的第二数据映射表和第二数据驱动器;As an optional implementation manner, the data channel cluster includes a second data channel corresponding to the second data, and the second data channel includes a second data mapping table and second data corresponding to the second data. driver;
所述第二数据通道,用于通过所述第二数据驱动器接收所述应用系统发送的第三格式的第二数据;The second data channel is configured to receive the second data in the third format sent by the application system through the second data driver;
所述第二数据通道,用于根据所述第二数据映射表将所述第二数据的所述第三格式转换为第四格式,得到格式转换后的第二数据,并将所述格式转换后的第二数据发送至所述网关控制模块。The second data channel is configured to convert the third format of the second data into a fourth format according to the second data mapping table to obtain the second data after the format conversion, and convert the format The latter second data is sent to the gateway control module.
作为一种可选的实施方式,所述网关控制模块包括网关单元;As an optional implementation manner, the gateway control module includes a gateway unit;
所述网关控制模块,用于通过所述网关单元将所述格式转换后的第二数据发送至所述数据库。The gateway control module is configured to send the second data after the format conversion to the database through the gateway unit.
作为一种可选的实施方式,所述数据通道系统还包括通道管理模块;As an optional implementation manner, the data channel system further includes a channel management module;
所述通道管理模块,用于获取各数据对应的数据驱动器和数据映射表;The channel management module is used to obtain the data driver and the data mapping table corresponding to each data;
所述通道管理模块,用于根据所述各数据对应的数据驱动器和数据映射表,创建所述各数据对应的数据通道,组成所述数据通道集群。The channel management module is configured to create a data channel corresponding to each data according to a data driver and a data mapping table corresponding to each data to form the data channel cluster.
作为一种可选的实施方式,所述数据通道系统包括多个数据通道集群,所述多个数据通道集群包括主数据通道集群和备份数据通道集群;As an optional implementation manner, the data channel system includes multiple data channel clusters, and the multiple data channel clusters include a primary data channel cluster and a backup data channel cluster;
所述通道管理模块,用于当检测到第一数据通道集群故障时,将第二数据通道集群切换为主数据通道集群,所述第一数据通道集群为主数据通道集群,所述第二数据通道集群为备份数据通道集群。The channel management module is configured to switch the second data channel cluster to the main data channel cluster when the failure of the first data channel cluster is detected, the first data channel cluster is the main data channel cluster, and the second data channel cluster is the main data channel cluster. The channel cluster is a backup data channel cluster.
作为一种可选的实施方式,所述数据通道系统还包括元数据管理模块;As an optional implementation manner, the data channel system further includes a metadata management module;
所述元数据管理模块,用于获取各数据的元数据;The metadata management module is used to obtain metadata of each data;
所述元数据管理模块,用于对所述各数据的元数据进行解析处理,得到所述各数据对应的数据驱动器元数据和数据映射表元数据;The metadata management module is configured to analyze and process the metadata of each data to obtain data driver metadata and data mapping table metadata corresponding to each data;
所述元数据管理模块,用于对所述各数据对应的数据驱动器元数据和数据映射表元数据进行翻译处理,得到所述各数据对应的数据驱动器和数据映射表,并存储所述各数据对应的数据驱动器和数据映射表。The metadata management module is used to translate the data driver metadata and data mapping table metadata corresponding to each data to obtain the data driver and data mapping table corresponding to each data, and to store the data Corresponding data driver and data mapping table.
第三方面,提供了一种计算机设备,包括存储器及处理器,所述存储器上存储有可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现第一方面中任一项所述方法的步骤。In a third aspect, a computer device is provided, including a memory and a processor, the memory stores a computer program that can run on the processor, and when the processor executes the computer program, any one of the first aspect is implemented The steps of the method described in item.
第四方面,提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现第一方面中任一项所述的方法的步骤。In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any one of the methods in the first aspect.
本申请提供了一种数据的传输方法。该方法应用于数据通道系统。该数据通道系统包括网关控制模块和数据通道集群。其中,网关控制模块与数据库连接,数据通道集群与应用系统连接。网关控制模块接收数据库发送的第一格式的第一数据,并将第一数据发送至数据通道集群。其中,第一格式为数据库中存储第一数据的格式。数据通道集群将第一数据的第一格式转换为第二格式,得到格式转换后的第一数据,并将格式转换后的第一数据发送至应用系统。其中,第二格式为应用系统中存储第一数据的格式。数据通道集群接收应用系统发送的第三格式的第二数据,将第二数据的第三格式转换为第四格式,得到格式转换后的第二数据,并将格式转换后的第二数据发送至网关控制模块。其中,第三格式为应用系统中存储第二数据的格式,第四格式为数据库中存储第二数据的格式。网关控制模块将格式转换后的第二数据发送至数据库。这样,无需耗费人力物力对应用系统进行二次开发,通过在应用系统和数据库之间设置数据通道系统,从而实现应用系统与数据库的数据交互,进而以数据库为枢纽实现不同应用系统之间的交互。This application provides a data transmission method. This method is applied to the data channel system. The data channel system includes a gateway control module and a data channel cluster. Among them, the gateway control module is connected to the database, and the data channel cluster is connected to the application system. The gateway control module receives the first data in the first format sent by the database, and sends the first data to the data channel cluster. Wherein, the first format is a format in which the first data is stored in the database. The data channel cluster converts the first format of the first data into the second format, obtains the first data after the format conversion, and sends the first data after the format conversion to the application system. Wherein, the second format is a format in which the first data is stored in the application system. The data channel cluster receives the second data in the third format sent by the application system, converts the third format of the second data into the fourth format, obtains the second data after the format conversion, and sends the second data after the format conversion to Gateway control module. Among them, the third format is a format for storing the second data in the application system, and the fourth format is a format for storing the second data in the database. The gateway control module sends the converted second data to the database. In this way, there is no need to spend manpower and material resources on the secondary development of the application system. By setting a data channel system between the application system and the database, data interaction between the application system and the database is realized, and the database is the hub to realize the interaction between different application systems. .
附图说明Description of the drawings
图1为本申请实施例提供的一种应用环境的架构图;FIG. 1 is an architecture diagram of an application environment provided by an embodiment of the application;
图2为本申请实施例提供的一种数据的传输方法的流程图;FIG. 2 is a flowchart of a data transmission method provided by an embodiment of this application;
图3为本申请实施例提供的一种数据通道集群的创建方法的流程图;FIG. 3 is a flowchart of a method for creating a data channel cluster provided by an embodiment of the application;
图4为本申请实施例提供的一种元数据的管理方法的流程图;FIG. 4 is a flowchart of a metadata management method provided by an embodiment of the application;
图5A为本申请实施例提供的一种数据的传输方法的示例的流程图;FIG. 5A is a flowchart of an example of a data transmission method provided by an embodiment of this application;
图5B为本申请实施例提供的一种数据的传输方法的示例的流程图;5B is a flowchart of an example of a data transmission method provided by an embodiment of this application;
图6为本申请实施例提供的一种数据通道系统的结构示意图;FIG. 6 is a schematic structural diagram of a data channel system provided by an embodiment of this application;
图7为本申请实施例提供的一种计算机设备的结构示意图。FIG. 7 is a schematic structural diagram of a computer device provided by an embodiment of this application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions, and advantages of this application clearer and clearer, the following further describes the application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
本申请实施例提供了一种数据的传输方法,该方法可以应用于应用系统与数据库之间数据交互的应用场景中的数据通道系统,图1为本申请实施例提供的一种应用环境的架构图。如图1所示,该应用环境包括数据库110、数据通道系统120和应用系统130。数据库110与应用系统130之间通过数据通道系统120连接。其中,数据库110,用于基于标准格式(比如GAT1400格式)存储应用系统的视频图像数据资源(比如人脸信息、车辆信息、告警信息、采集设备信息等);数据通道系统120,用于对数据库110和应用系统130之间传输的视频图像数据进行格式转换处理;应用系统130,用于通过数据通道系统120从数据库110中获取其他应用系统130上传的视频图像数据资源,或者,通过数据通道系统120将本地存储的视频图像数据资源上传至数据库110,以使其他应用系统130可以从数据库110中获取该视频图像数据资源。The embodiment of the application provides a data transmission method, which can be applied to a data channel system in an application scenario of data interaction between an application system and a database. FIG. 1 is an architecture of an application environment provided by an embodiment of the application. picture. As shown in FIG. 1, the application environment includes a database 110, a data channel system 120 and an application system 130. The database 110 and the application system 130 are connected through a data channel system 120. Among them, the database 110 is used to store video image data resources (such as face information, vehicle information, alarm information, collection equipment information, etc.) of the application system based on a standard format (such as GAT1400 format); the data channel system 120 is used to check the database The video image data transmitted between 110 and the application system 130 undergoes format conversion processing; the application system 130 is used to obtain the video image data resources uploaded by other application systems 130 from the database 110 through the data channel system 120, or through the data channel system 120 uploads the locally stored video image data resource to the database 110 so that other application systems 130 can obtain the video image data resource from the database 110.
下面将结合具体实施方式,对本申请实施例提供的一种数据的传输方法进行详细的说明,该方法应用于数据通道系统,该数据通道系统包括网关控制模块和数据通道集群。其中,网关控制模块与数据库连接,数据通道集群与应用系统连接。如图2所示,具体步骤如下:In the following, a data transmission method provided by an embodiment of the present application will be described in detail in conjunction with specific implementations. The method is applied to a data channel system, and the data channel system includes a gateway control module and a data channel cluster. Among them, the gateway control module is connected to the database, and the data channel cluster is connected to the application system. As shown in Figure 2, the specific steps are as follows:
步骤201,网关控制模块接收数据库发送的第一格式的第一数据,并将第一数据 发送至数据通道集群。Step 201: The gateway control module receives the first data in the first format sent by the database, and sends the first data to the data channel cluster.
其中,第一格式为数据库中存储第一数据的格式。Wherein, the first format is a format in which the first data is stored in the database.
在实施中,由于各应用系统采集的数据的类型可能不同,因此,数据库中存储有各应用系统上传的各种类型的数据(比如抓拍数据、告警数据、设备数据等),不同类型的数据对应不同的格式,将第一格式的数据记为第一数据。当某一应用系统需要从数据库中获取其他应用系统上传的某一类型的数据(也即第一数据)时,该应用系统可以向数据库发送数据请求。其中,该数据请求中携带有第一数据的地址。数据库接收到该数据请求后,可以向数据通道系统发送第一格式的第一数据。其中,第一格式为数据库中存储第一数据的格式。相应的,数据通道系统中的网关控制模块则可以接收到数据库发送的第一格式的第一数据,并将第一数据发送至数据通道集群。In the implementation, because the types of data collected by each application system may be different, the database stores various types of data uploaded by each application system (such as snapshot data, alarm data, equipment data, etc.), and different types of data correspond to For different formats, the data in the first format is recorded as the first data. When a certain application system needs to obtain a certain type of data (that is, the first data) uploaded by other application systems from the database, the application system may send a data request to the database. Wherein, the data request carries the address of the first data. After receiving the data request, the database can send the first data in the first format to the data channel system. Wherein, the first format is a format in which the first data is stored in the database. Correspondingly, the gateway control module in the data channel system can receive the first data in the first format sent by the database, and send the first data to the data channel cluster.
作为一种可选的实施方式,网关控制模块包括应用程序接口单元,应用程序接口单元包含第一数据对应的应用程序接口,数据通道集群包含第一数据对应的第一数据通道。网关控制模块接收数据库发送的第一格式的第一数据,并将第一数据发送至数据通道集群的处理过程为应用程序接口单元通过第一应用程序接口接收数据库发送的第一格式的第一数据,并将第一数据发送至数据通道集群中的第一数据通道。As an optional implementation manner, the gateway control module includes an application program interface unit, the application program interface unit includes an application program interface corresponding to the first data, and the data channel cluster includes a first data channel corresponding to the first data. The gateway control module receives the first data in the first format sent by the database, and sends the first data to the data channel cluster. The processing process is that the application program interface unit receives the first data in the first format sent by the database through the first application program interface. , And send the first data to the first data channel in the data channel cluster.
在实施中,网关控制模块包括应用程序接口单元。为了区分不同类型的数据,应用程序接口单元中包括用于接收不同类型的数据的应用程序接口(即应用程序接口单元中一个应用程序接口对应一种类型的数据)。同时,由于不同类型的数据的处理也不同。因此,数据通道集群中包含用于对不同类型的数据进行处理的数据通道(即数据通道集群中一个数据通道对应一种类型的数据)。因此,一种类型的数据在应用程序接口单元中对应一个应用程序接口,在数据通道集群中对应一个数据通道(比如,抓拍数据对应抓拍数据通道、告警数据对应告警数据通道、设备数据对应设备数据通道等)。相应的,针对第一数据,应用程序接口单元中包括第一数据对于的第一应用程序接口,数据通道集群中包含第一数据对应的第一数据通道。这样,网关控制模块中的应用程序接口单元可以通过第一应用程序接口接收数据库发送的第一格式的第一数据。然后,应用程序接口单元可以将第一数据发送至数据通道集群中的第一数据通道。In implementation, the gateway control module includes an application program interface unit. In order to distinguish different types of data, the application program interface unit includes application program interfaces for receiving different types of data (that is, one application program interface in the application program interface unit corresponds to one type of data). At the same time, because different types of data are processed differently. Therefore, the data channel cluster includes data channels for processing different types of data (that is, one data channel in the data channel cluster corresponds to one type of data). Therefore, a type of data corresponds to an application program interface in the application program interface unit, and corresponds to a data channel in the data channel cluster (for example, snapshot data corresponds to the snapshot data channel, alarm data corresponds to the alarm data channel, and device data corresponds to the device data Channels, etc.). Correspondingly, for the first data, the application program interface unit includes the first application program interface for the first data, and the data channel cluster includes the first data channel corresponding to the first data. In this way, the application program interface unit in the gateway control module can receive the first data in the first format sent by the database through the first application program interface. Then, the application program interface unit may send the first data to the first data channel in the data channel cluster.
步骤202,数据通道集群将第一数据的第一格式转换为第二格式,得到格式转换后的第一数据,并将格式转换后的第一数据发送至应用系统。Step 202: The data channel cluster converts the first format of the first data into the second format, obtains the first data after the format conversion, and sends the first data after the format conversion to the application system.
其中,第二格式为应用系统中存储第一数据的格式。Wherein, the second format is a format in which the first data is stored in the application system.
在实施中,由于应用系统在开发初期主要侧重视频图像应用功能的实现,对于标准规范并不支持,也即应用系统与数据库中存储的第一数据的格式并不一定相同。因此,为了保证应用系统可以存储和处理第一数据,数据通道集群接收到第一数据后,可以进一步将第一数据的第一格式转换为第二格式,得到格式转换后的第一数据。其中,第二格式为应用系统中存储第一数据的格式。然后,数据通道集群可以将格式转换后的第一数据发送至应用系统。相应的,应用系统则可以接收到第二格式的第一数据,以进行存储和处理。这样,无需耗费人力物力对应用系统进行二次开发,通过在应用系统和数据库之间设置数据通道系统,从而实现应用系统与数据库的数据交互。In the implementation, since the application system mainly focuses on the realization of the video image application function in the early stage of development, it does not support the standard specification, that is, the format of the first data stored in the application system and the database is not necessarily the same. Therefore, in order to ensure that the application system can store and process the first data, after receiving the first data, the data channel cluster can further convert the first format of the first data into the second format to obtain the first data after the format conversion. Wherein, the second format is a format in which the first data is stored in the application system. Then, the data channel cluster can send the first data after the format conversion to the application system. Correspondingly, the application system can receive the first data in the second format for storage and processing. In this way, there is no need to spend manpower and material resources on the secondary development of the application system, and data interaction between the application system and the database is realized by setting a data channel system between the application system and the database.
作为一种可选的实施方式,数据通道集群包含第一数据对应的第一数据通道,第一数据通道包括第一数据对应的第一数据映射表和第一数据驱动器。数据通道集群将第一数据的第一格式转换为第二格式,得到格式转换后的第一数据,并将格式转换后的第一数据发送至应用系统的处理过程如下。As an optional implementation manner, the data channel cluster includes a first data channel corresponding to the first data, and the first data channel includes a first data mapping table and a first data driver corresponding to the first data. The data channel cluster converts the first format of the first data into the second format, obtains the first data after the format conversion, and sends the first data after the format conversion to the application system. The processing process is as follows.
步骤一,第一数据通道根据第一数据映射表将第一数据的第一格式转换为第二格式,得到格式转换后的第一数据。Step 1: The first data channel converts the first format of the first data into the second format according to the first data mapping table to obtain the first data after the format conversion.
在实施中,由于不同类型的数据的格式转换处理不同,不同类型的数据在应用系统中存储方式也不同,不同的存储方式对应的数据驱动也不同(比如表述性状态传递(Representational State Transfer,REST)接口对应超文本传输协议(Hyper Text Transfer Protocol,HTTP)客户端、数据库对应数据库连接池、消息中间件对应消费者监听器)。因此,数据通道集群中包含用于对不同类型的数据进行处理的数据通道。其中,数据通道包括用于对不同类型的数据进行格式转换的数据映射表和用于发送不同类型的数据的数据驱动器。相应的,针对第一数据,数据通道集群包含第一数据对应的第一数据通道,第一数据通道包括第一数据对应的第一数据映射表和第一数据驱动器。这样,第一数据通道接收到第一数据后,可以根据第一数据映射表,将第一数据的第一格式转换为第二格式,得到格式转换后的第一数据。In the implementation, due to the different format conversion processing of different types of data, the storage methods of different types of data in the application system are also different, and the data drivers corresponding to different storage methods are also different (such as Representational State Transfer, REST ) The interface corresponds to the HyperText Transfer Protocol (HTTP) client, the database corresponds to the database connection pool, and the message middleware corresponds to the consumer listener). Therefore, the data channel cluster contains data channels for processing different types of data. Among them, the data channel includes a data mapping table for format conversion of different types of data and a data driver for sending different types of data. Correspondingly, for the first data, the data channel cluster includes a first data channel corresponding to the first data, and the first data channel includes a first data mapping table and a first data driver corresponding to the first data. In this way, after receiving the first data, the first data channel can convert the first format of the first data into the second format according to the first data mapping table to obtain the first data after the format conversion.
步骤二,第一数据通道通过第一数据驱动器将格式转换后的第一数据发送至应用系统。Step 2: The first data channel sends the converted first data to the application system through the first data driver.
在实施中,第一数据通道得到格式转换后的第一数据后,可以通过第一数据驱动器将格式转换后的第一数据发送至应用系统。相应的,应用系统则可以接收到第二格式的第一数据,以进行存储和处理。In implementation, after the first data channel obtains the first data after the format conversion, the first data after the format conversion may be sent to the application system through the first data driver. Correspondingly, the application system can receive the first data in the second format for storage and processing.
步骤203,数据通道集群接收应用系统发送的第三格式的第二数据,将第二数据 的第三格式转换为第四格式,得到格式转换后的第二数据,并将格式转换后的第二数据发送至网关控制模块。Step 203: The data channel cluster receives the second data in the third format sent by the application system, converts the third format of the second data into the fourth format, obtains the second data after the format conversion, and converts the second data after the format conversion. The data is sent to the gateway control module.
其中,第三格式为应用系统中存储第二数据的格式,第四格式为数据库中存储第二数据的格式。Among them, the third format is a format for storing the second data in the application system, and the fourth format is a format for storing the second data in the database.
在实施中,当某一应用系统需要将本地存储的某一类型的数据(即第二数据)上传至数据库时,该应用系统可以向数据通道系统中的数据通道集群发送第三格式的第二数据。其中,第三格式为应用系统中存储第二数据的格式。相应的,数据通道系统中的数据通道集群可以接收到应用系统发送的第三格式的第二数据。由于应用系统与数据库中存储的第二数据的格式并不一定相同。因此,为了保证数据库可以存储第二数据,数据通道集群可以进一步将第二数据的第三格式转换为第四格式,得到格式转换后的第二数据。其中,第四格式为数据库中存储第二数据的格式。之后,数据通道集群可以将格式转换后的第二数据发送至网关控制模块。In implementation, when an application system needs to upload a certain type of locally stored data (ie, second data) to the database, the application system can send the second format of the third format to the data channel cluster in the data channel system. data. Among them, the third format is a format for storing the second data in the application system. Correspondingly, the data channel cluster in the data channel system can receive the second data in the third format sent by the application system. Because the format of the second data stored in the application system and the database is not necessarily the same. Therefore, in order to ensure that the database can store the second data, the data channel cluster may further convert the third format of the second data into the fourth format to obtain the second data after the format conversion. Among them, the fourth format is a format for storing the second data in the database. After that, the data channel cluster can send the second data after the format conversion to the gateway control module.
作为一种可选的实施方式,数据通道集群包含第二数据对应的第二数据通道,第二数据通道包括第二数据对应的第二数据映射表和第二数据驱动器。数据通道集群接收应用系统发送的第三格式的第二数据,将第二数据的第三格式转换为第四格式,得到格式转换后的第二数据,并将格式转换后的第二数据发送至网关控制模块的处理过程如下。As an optional implementation manner, the data channel cluster includes a second data channel corresponding to the second data, and the second data channel includes a second data mapping table and a second data driver corresponding to the second data. The data channel cluster receives the second data in the third format sent by the application system, converts the third format of the second data into the fourth format, obtains the second data after the format conversion, and sends the second data after the format conversion to The processing procedure of the gateway control module is as follows.
步骤一,第二数据通道通过第二数据驱动器接收应用系统发送的第三格式的第二数据。Step 1: The second data channel receives the second data in the third format sent by the application system through the second data driver.
在实施中,由于不同类型的数据的格式转换处理不同,不同类型的数据在应用系统中存储方式不同,不同的存储方式对应的数据驱动也不同(比如表述性状态传递(Representational State Transfer,REST)接口对应超文本传输协议(Hyper Text Transfer Protocol,HTTP)客户端、数据库对应数据库连接池、消息中间件对应消费者监听器)。因此,数据通道集群中包含用于对不同类型的数据进行处理的数据通道。其中,数据通道包括用于对不同类型的数据进行格式转换的数据映射表和用于接收不同类型的数据的数据驱动器。相应的,针对第二数据,数据通道集群包含第二数据对应的第二数据通道,第二数据通道包括第二数据对应的第二数据映射表和第二数据驱动器。这样,该应用系统可以向数据通道集群中的第二数据通道的第二数据驱动器发送第三格式的第二数据。相应的,第二数据通道可以通过第二数据驱动器接收应用系统发送的第三格式的第二数据。In the implementation, because the format conversion processing of different types of data is different, the storage methods of different types of data in the application system are different, and the data drivers corresponding to different storage methods are also different (for example, Representational State Transfer, REST) The interface corresponds to the HyperText Transfer Protocol (HTTP) client, the database corresponds to the database connection pool, and the message middleware corresponds to the consumer listener). Therefore, the data channel cluster contains data channels for processing different types of data. Among them, the data channel includes a data mapping table for format conversion of different types of data and a data driver for receiving different types of data. Correspondingly, for the second data, the data channel cluster includes a second data channel corresponding to the second data, and the second data channel includes a second data mapping table and a second data driver corresponding to the second data. In this way, the application system can send the second data in the third format to the second data driver of the second data channel in the data channel cluster. Correspondingly, the second data channel can receive the second data in the third format sent by the application system through the second data driver.
步骤二,第二数据通道根据第二数据映射表将第二数据的第三格式转换为第四格式,得到格式转换后的第二数据,并将格式转换后的第二数据发送至网关控制模块。Step 2: The second data channel converts the third format of the second data into the fourth format according to the second data mapping table to obtain the second data after the format conversion, and sends the second data after the format conversion to the gateway control module .
在实施中,第二数据通道接收到应用系统发送的第三格式的第二数据后,可以根据第二数据映射表,将第二数据的第三格式转换为第四格式,得到格式转换后的第二数据。然后,第二数据通道可以将格式转换后的第二数据发送至网关控制模块。In implementation, after the second data channel receives the second data in the third format sent by the application system, it can convert the third format of the second data into the fourth format according to the second data mapping table to obtain the converted format The second data. Then, the second data channel may send the second data after the format conversion to the gateway control module.
步骤204,网关控制模块将格式转换后的第二数据发送至数据库。Step 204: The gateway control module sends the converted second data to the database.
在实施中,网关控制模块接收到格式转换后的第二数据后,可以将格式转换后的第二数据发送至数据库。相应的,数据库则可以接收到第四格式的第二数据,以存储第四格式的第二数据。这样,无需耗费人力物力对应用系统进行二次开发,通过在应用系统和数据库之间设置数据通道系统,从而实现应用系统与数据库的数据交互。In implementation, after the gateway control module receives the format-converted second data, it can send the format-converted second data to the database. Correspondingly, the database can receive the second data in the fourth format to store the second data in the fourth format. In this way, there is no need to spend manpower and material resources on the secondary development of the application system, and data interaction between the application system and the database is realized by setting a data channel system between the application system and the database.
作为一种可选的实施方式,网关控制模块包括网关单元。网关控制模块将格式转换后的第二数据发送至数据库的处理过程为网关控制模块通过网关单元将格式转换后的第二数据发送至数据库。As an optional implementation manner, the gateway control module includes a gateway unit. The processing process of the gateway control module sending the second data after the format conversion to the database is that the gateway control module sends the second data after the format conversion to the database through the gateway unit.
在实施中,网关控制模块中还包括用于向数据库发送数据的网关单元。当网关控制模块接收到格式转换后的第二数据后,可以通过网关单元将格式转换后的第二数据发送至数据库。In implementation, the gateway control module also includes a gateway unit for sending data to the database. After the gateway control module receives the format-converted second data, it can send the format-converted second data to the database through the gateway unit.
需要说明的是,步骤101和步骤102为应用系统通过数据通道系统从数据库中获取第一数据的过程,步骤103和步骤104为应用系统通过数据通道向数据库上传第二数据的过程。上述两个过程的处理顺序不区分先后顺序。It should be noted that step 101 and step 102 are processes for the application system to obtain the first data from the database through the data channel system, and steps 103 and 104 are processes for the application system to upload the second data to the database through the data channel. The processing sequence of the above two processes does not distinguish the sequence.
作为一种可选的实施方式,数据通道系统还包括通道管理模块,该通道管理模块用于创建数据通道集群。如图3所示,具体处理过程如下:As an optional implementation manner, the data channel system further includes a channel management module, and the channel management module is used to create a data channel cluster. As shown in Figure 3, the specific processing process is as follows:
步骤301,通道管理模块获取各数据对应的数据驱动器和数据映射表。Step 301: The channel management module obtains the data driver and the data mapping table corresponding to each data.
在实施中,由于不同类型的数据的格式转换处理不同,且不同类型的数据在应用系统中存储方式也不同。因此,不同类型的数据对应的数据驱动器和数据映射表也不同(即一种类型的数据对应一种数据驱动器和一种数据映射表)。数据通道系统中可以预先存储有各类型的数据对应的数据驱动器和数据映射表。其中,各类型的数据对应的数据驱动器和数据映射表的生成过程后续会进行详细介绍。当通道管理模块需要创建各类型的数据对应的数据通道集群时,通道管理模块可以从数据通道系统预先存储有各类型的数据对应的数据驱动器和数据映射表的存储设备中获取各类型的数据对应的数据驱动器和数据映射表。可选的,通道管理模块可以在数据通道系统启动初 始化时,创建数据通道集群,也可以根据用户的指令创建数据通道集群,本申请不作限定。In implementation, because different types of data have different format conversion processing, and different types of data are stored in different ways in the application system. Therefore, data drivers and data mapping tables corresponding to different types of data are also different (that is, one type of data corresponds to one data driver and one data mapping table). Data drivers and data mapping tables corresponding to various types of data can be pre-stored in the data channel system. Among them, the generation process of the data driver and the data mapping table corresponding to each type of data will be described in detail later. When the channel management module needs to create data channel clusters corresponding to various types of data, the channel management module can obtain the data corresponding to each type from the data channel system pre-stored with data drivers and data mapping tables corresponding to each type of data. Data drive and data mapping table. Optionally, the channel management module can create a data channel cluster when the data channel system is initialized, or it can create a data channel cluster according to a user's instruction, which is not limited in this application.
步骤302,通道管理模块根据各数据对应的数据驱动器和数据映射表,创建各数据对应的数据通道,组成数据通道集群。In step 302, the channel management module creates a data channel corresponding to each data according to the data driver and the data mapping table corresponding to each data to form a data channel cluster.
在实施中,由于一种类型的数据在应用程序接口单元中对应一个应该程序接口,在数据通道集群中对应一个数据通道,因此,通道管理模块获取到各类型的数据对应的数据驱动器和数据映射表后,针对每种类型的数据,通道管理模块可以根据该类型的数据对应的数据驱动器和数据映射表,创建该类型数据对应的数据通道,从而得到由各类型的数据对应的数据通道,组成数据通道集群。可选的,通道管理模块还可以根据用户的指令对数据通道集群中的某一数据通道进行开启操作、暂停操作、过滤设置、流量监控设置、销毁操作、再创建操作以及数据通道集群复制操作等。另外,通道管理模块还可以在应用系统和数据库中任何一方异常宕机时,提供数据通道的熔断保护策略。In implementation, since one type of data corresponds to a program interface in the application program interface unit, and a data channel in the data channel cluster, the channel management module obtains the data driver and data map corresponding to each type of data. After the table, for each type of data, the channel management module can create a data channel corresponding to the type of data according to the data driver and data mapping table corresponding to the type of data, so as to obtain the data channel corresponding to each type of data. Data channel cluster. Optionally, the channel management module can also open a data channel in the data channel cluster, pause operation, filter setting, traffic monitoring setting, destroy operation, re-creation operation, and data channel cluster copy operation according to the user's instructions. . In addition, the channel management module can also provide a fuse protection strategy for the data channel when any one of the application system and the database is down abnormally.
作为一种可选的实施方式,数据通道系统包括多个数据通道集群,多个数据通道集群包括主数据通道集群和备份数据通道集群。通道管理模块可以As an optional implementation manner, the data channel system includes multiple data channel clusters, and the multiple data channel clusters include a main data channel cluster and a backup data channel cluster. The channel management module can
当通道管理模块检测到第一数据通道集群故障时,将第二数据通道集群切换为主数据通道集群,第一数据通道集群为主数据通道集群,第二数据通道集群为备份数据通道集群。When the channel management module detects the failure of the first data channel cluster, the second data channel cluster is switched to the primary data channel cluster, the first data channel cluster is the primary data channel cluster, and the second data channel cluster is the backup data channel cluster.
作为一种可选的实施方式,数据通道系统还包括元数据管理模块。该元数据管理模块可以根据各数据的元数据生成各数据对应的驱动器和数据映射表。如图4所示,具体处理过程如下。As an optional implementation manner, the data channel system further includes a metadata management module. The metadata management module can generate the drive and data mapping table corresponding to each data according to the metadata of each data. As shown in Figure 4, the specific process is as follows.
步骤401,元数据管理模块获取各数据的元数据。Step 401: The metadata management module obtains metadata of each data.
在实施中,数据通道系统中可以预先存储有应用系统中各视图数据资源(即各数据)的元数据。其中,元数据是一种用于描述应用系统中各视图数据资源(如人脸信息、车辆信息、告警信息、采集设备信息等)的获取方式(如REST接口、消息中间件、数据库、大数据仓库等)的数据规则;元数据包括数据源(resources)和字段映射关系(mappings)两部分。为了便于处理,技术人员可以预先以XML(一种可扩展标记语言)或者JSON(一种编程语言)等格式对各数据的元数据进行描述配置。例如,抓拍数据资源的元数据包括抓拍数据源和抓拍字段映射关系。当元数据管理模块需要生成各数据对应的驱动器和数据映射表时,元数据管理模块可以获取各数据的元 数据。In implementation, the data channel system may pre-store metadata of each view data resource (that is, each data) in the application system. Among them, metadata is a method used to describe the acquisition of various view data resources (such as face information, vehicle information, alarm information, collection equipment information, etc.) in the application system (such as REST interface, message middleware, database, big data, etc.) Warehouse, etc.) data rules; metadata includes two parts: data sources (resources) and field mappings (mappings). In order to facilitate processing, technicians can describe and configure the metadata of each data in XML (an extensible markup language) or JSON (a programming language) in advance. For example, the metadata of the captured data resource includes the mapping relationship between the captured data source and the captured field. When the metadata management module needs to generate the drive and data mapping table corresponding to each data, the metadata management module can obtain the metadata of each data.
步骤402,元数据管理模块对各数据的元数据进行解析处理,得到各数据对应的数据驱动器元数据和数据映射表元数据。In step 402, the metadata management module parses the metadata of each data to obtain data driver metadata and data mapping table metadata corresponding to each data.
在实施中,元数据管理模块获取到各数据的元数据后,针对每个数据的元数据,元数据管理模块可以对该数据的元数据进行解析处理,得到该数据对应的数据驱动器元数据和数据映射表元数据。其中,数据驱动器元数据对应元数据中的数据源,数据映射表元数据对应元数据中的字段映射关系。In implementation, after the metadata management module obtains the metadata of each data, for each data metadata, the metadata management module can analyze and process the metadata of the data to obtain the data driver metadata and data corresponding to the data. Data mapping table metadata. Among them, the data driver metadata corresponds to the data source in the metadata, and the data mapping table metadata corresponds to the field mapping relationship in the metadata.
步骤403,元数据管理模块对各数据对应的数据驱动器元数据和数据映射表元数据进行翻译处理,得到各数据对应的数据驱动器和数据映射表,并存储各数据对应的数据驱动器和数据映射表。Step 403: The metadata management module translates the data driver metadata and data mapping table metadata corresponding to each data to obtain the data driver and data mapping table corresponding to each data, and stores the data driver and data mapping table corresponding to each data. .
在实施中,元数据管理模块得到各数据对应的数据驱动器元数据和数据映射表元数据后,针对每个数据,元数据管理模块可以对该数据对应的数据驱动器元数据和数据映射表元数据进行翻译处理,得到该数据对应的数据驱动器和数据映射表。然后,元数据管理模块可以将各数据对应的数据驱动器和数据映射表存储至本地。可选的,元数据管理模块可以将各数据对应的数据驱动器和数据映射表存储至ETCD(一种开源,支持高可用、高并发的分布式键值存储系统)中,从而保证创建数据通道的数据驱动器和数据映射表不会丢失,从而提升通道系统的稳定性。另外,针对每种类型的数据对应的数据通道可以进行多实例部署,通过ETCD对数据的数据驱动器和数据映射表的管理,可用确保多实例之间的数据幂等性。In the implementation, after the metadata management module obtains the data driver metadata and data mapping table metadata corresponding to each data, for each data, the metadata management module can the data driver metadata and data mapping table metadata corresponding to the data Perform translation processing to obtain the data driver and data mapping table corresponding to the data. Then, the metadata management module can store the data driver and data mapping table corresponding to each data locally. Optionally, the metadata management module can store the data driver and data mapping table corresponding to each data in ETCD (an open source, high-availability, high-concurrency distributed key-value storage system), so as to ensure the creation of data channels The data driver and data mapping table will not be lost, thereby improving the stability of the channel system. In addition, the data channel corresponding to each type of data can be deployed in multiple instances. Through the management of the data driver and data mapping table of the data through ETCD, the data idempotence between multiple instances can be ensured.
图5A为本申请实施例提供的一种数据的传输方法的示例的流程图。在该示例中,以抓拍数据为例进行介绍,抓拍数据在应用程序接口单元中对应抓拍应该程序接口,在数据通道集群中对应抓拍数据通道,抓拍数据通道中包括抓拍数据驱动器和抓拍数据映射表。如图5A所示,处理过程包括如下步骤。FIG. 5A is a flowchart of an example of a data transmission method provided by an embodiment of the application. In this example, we take the snapshot data as an example. The snapshot data corresponds to the snapshot application program interface in the application program interface unit, and the data channel cluster corresponds to the snapshot data channel. The snapshot data channel includes the snapshot data driver and the snapshot data mapping table. . As shown in Fig. 5A, the processing procedure includes the following steps.
步骤511,网关控制模块中的应用程序接口单元通过抓拍应用程序接口接收数据库发送的第一格式的抓拍数据。其中,第一格式为数据库中存储抓拍数据的格式。Step 511: The application program interface unit in the gateway control module receives the snapshot data in the first format sent by the database through the snapshot application program interface. Among them, the first format is the format for storing the snapshot data in the database.
步骤512,网关控制模块中的应用程序接口单元将第一格式的抓拍数据发送至数据通道集群中的抓拍数据通道。Step 512: The application program interface unit in the gateway control module sends the snapshot data in the first format to the snapshot data channel in the data channel cluster.
步骤513,抓拍数据通道通过抓拍数据映射表将抓拍数据的第一格式转换为第二格式,得到格式转换后的抓拍数据。其中,第二格式为应用系统中存储抓拍数据的格式。In step 513, the captured data channel converts the first format of the captured data into the second format through the captured data mapping table to obtain the captured captured data after the format conversion. Among them, the second format is a format for storing snapshot data in the application system.
步骤514,抓拍数据通道通过抓拍数据驱动器将格式转换后的抓拍数据发送至应用系统。In step 514, the snapshot data channel sends the format-converted snapshot data to the application system through the snapshot data driver.
步骤511至步骤514的处理过程与步骤201至步骤202的处理过程类型,此处不再赘述。The processing procedure from step 511 to step 514 and the processing procedure type from step 201 to step 202 are not repeated here.
图5B为本申请实施例提供的一种数据的传输方法的示例的流程图。在该示例中,以抓拍数据为例进行介绍,抓拍数据在数据通道集群中对应抓拍数据通道,抓拍数据通道中包括抓拍数据驱动器和抓拍数据映射表。如图5B所示,处理过程包括如下步骤。FIG. 5B is a flowchart of an example of a data transmission method provided by an embodiment of the application. In this example, the snapshot data is taken as an example. The snapshot data corresponds to the snapshot data channel in the data channel cluster. The snapshot data channel includes the snapshot data driver and the snapshot data mapping table. As shown in FIG. 5B, the processing procedure includes the following steps.
步骤521,数据通道集群中的抓拍数据通道通过抓拍数据驱动器接收应用系统发送的第二格式的抓拍数据。其中,第二格式为应用系统中存储抓拍数据的格式。Step 521: The snapshot data channel in the data channel cluster receives the snapshot data in the second format sent by the application system through the snapshot data driver. Among them, the second format is a format for storing snapshot data in the application system.
步骤522,抓拍数据通道通过抓拍数据映射表将抓拍数据的第二格式转换为第一格式,得到格式转换后的抓拍数据。其中,第一格式为数据库中存储抓拍数据的格式。Step 522: The captured data channel converts the second format of the captured data into the first format through the captured data mapping table to obtain the captured captured data after the format conversion. Among them, the first format is the format for storing the snapshot data in the database.
步骤523,抓拍数据通道将格式转换后的抓拍数据发送至网关控制模块中的网关单元。Step 523: The snapshot data channel sends the format-converted snapshot data to the gateway unit in the gateway control module.
步骤524,网关控制模块通过网关单元将格式转换后的抓拍数据发送至数据库。In step 524, the gateway control module sends the converted snapshot data to the database through the gateway unit.
步骤521至步骤524的处理过程与步骤203至步骤204的处理过程类型,此处不再赘述。The processing procedure from step 521 to step 524 and the processing procedure type from step 203 to step 204 are not repeated here.
本申请实施例提供了一种数据的传输方法。该方法应用于数据通道系统。该数据通道系统包括网关控制模块和数据通道集群。其中,网关控制模块与数据库连接,数据通道集群与应用系统连接。网关控制模块接收数据库发送的第一格式的第一数据,并将第一数据发送至数据通道集群。其中,第一格式为数据库中存储第一数据的格式。数据通道集群将第一数据的第一格式转换为第二格式,得到格式转换后的第一数据,并将格式转换后的第一数据发送至应用系统。其中,第二格式为应用系统中存储第一数据的格式。数据通道集群接收应用系统发送的第三格式的第二数据,将第二数据的第三格式转换为第四格式,得到格式转换后的第二数据,并将格式转换后的第二数据发送至网关控制模块。其中,第三格式为应用系统中存储第二数据的格式,第四格式为数据库中存储第二数据的格式。网关控制模块将格式转换后的第二数据发送至数据库。这样,无需耗费人力物力对应用系统进行二次开发,通过在应用系统和数据库之间设置数据通道系统,从而实现应用系统与数据库的数据交互,进而以数据库为枢纽实现不同应用系统之间的交互。The embodiment of the present application provides a data transmission method. This method is applied to the data channel system. The data channel system includes a gateway control module and a data channel cluster. Among them, the gateway control module is connected to the database, and the data channel cluster is connected to the application system. The gateway control module receives the first data in the first format sent by the database, and sends the first data to the data channel cluster. Wherein, the first format is a format in which the first data is stored in the database. The data channel cluster converts the first format of the first data into the second format, obtains the first data after the format conversion, and sends the first data after the format conversion to the application system. Wherein, the second format is a format in which the first data is stored in the application system. The data channel cluster receives the second data in the third format sent by the application system, converts the third format of the second data into the fourth format, obtains the second data after the format conversion, and sends the second data after the format conversion to Gateway control module. Among them, the third format is a format for storing the second data in the application system, and the fourth format is a format for storing the second data in the database. The gateway control module sends the converted second data to the database. In this way, there is no need to spend manpower and material resources on the secondary development of the application system. By setting a data channel system between the application system and the database, data interaction between the application system and the database is realized, and the database is the hub to realize the interaction between different application systems. .
本申请实施例还提供了一种数据通道系统,如图6所示,所述数据通道系统包括网关控制模块610和数据通道集群620,所述网关控制模块610与数据库连接,所述数据通道集群620与应用系统连接;An embodiment of the present application also provides a data channel system. As shown in FIG. 6, the data channel system includes a gateway control module 610 and a data channel cluster 620. The gateway control module 610 is connected to a database, and the data channel cluster 620 is connected to the application system;
所述网关控制模块610,用于接收所述数据库发送的第一格式的第一数据,并将所述第一数据发送至所述数据通道集群620;所述第一格式为所述数据库中存储所述第一数据的格式;The gateway control module 610 is configured to receive first data in a first format sent by the database, and send the first data to the data channel cluster 620; the first format is stored in the database The format of the first data;
所述数据通道集群620,用于将所述第一数据的所述第一格式转换为第二格式,得到格式转换后的第一数据,并将所述格式转换后的第一数据发送至所述应用系统;所述第二格式为所述应用系统中存储所述第一数据的格式;The data channel cluster 620 is configured to convert the first format of the first data into a second format, obtain the first data after the format conversion, and send the first data after the format conversion to the The application system; the second format is the format in which the first data is stored in the application system;
所述数据通道集群620,用于接收所述应用系统发送的第三格式的第二数据,将所述第二数据的所述第三格式转换为第四格式,得到格式转换后的第二数据,并将所述格式转换后的第二数据发送至所述网关控制模块610;所述第三格式为所述应用系统中存储所述第二数据的格式,所述第四格式为所述数据库中存储所述第二数据的格式;The data channel cluster 620 is configured to receive second data in a third format sent by the application system, convert the third format of the second data into a fourth format, and obtain the second data after the format conversion , And send the second data after the format conversion to the gateway control module 610; the third format is the format in which the second data is stored in the application system, and the fourth format is the database The format in which the second data is stored in;
所述网关控制模块610,用于将所述格式转换后的第二数据发送至所述数据库。The gateway control module 610 is configured to send the second data after the format conversion to the database.
作为一种可选的实施方式,所述网关控制模块610包括应用程序接口单元,所述应用程序接口单元包含所述第一数据对应的应用程序接口,所述数据通道集群620包含所述第一数据对应的第一数据通道;As an optional implementation manner, the gateway control module 610 includes an application program interface unit, the application program interface unit includes an application program interface corresponding to the first data, and the data channel cluster 620 includes the first The first data channel corresponding to the data;
所述应用程序接口单元,用于通过所述第一应用程序接口接收所述数据库发送的第一格式的第一数据,并将所述第一数据发送至所述数据通道集群620中的所述第一数据通道。The application program interface unit is configured to receive the first data in the first format sent by the database through the first application program interface, and send the first data to the data channel cluster 620. The first data channel.
作为一种可选的实施方式,所述数据通道集群620包含所述第一数据对应的第一数据通道,所述第一数据通道包括所述第一数据对应的第一数据映射表和第一数据驱动器;As an optional implementation manner, the data channel cluster 620 includes a first data channel corresponding to the first data, and the first data channel includes a first data mapping table and a first data mapping table corresponding to the first data. Data drive
所述第一数据通道,用于根据所述第一数据映射表将所述第一数据的所述第一格式转换为第二格式,得到格式转换后的第一数据;The first data channel is configured to convert the first format of the first data into a second format according to the first data mapping table to obtain the first data after the format conversion;
所述第一数据通道,用于通过所述第一数据驱动器将所述格式转换后的第一数据发送至所述应用系统。The first data channel is used to send the first data after the format conversion to the application system through the first data driver.
作为一种可选的实施方式,所述数据通道集群620包含所述第二数据对应的第二数据通道,所述第二数据通道包括所述第二数据对应的第二数据映射表和第二数据驱 动器;As an optional implementation manner, the data channel cluster 620 includes a second data channel corresponding to the second data, and the second data channel includes a second data mapping table and a second data mapping table corresponding to the second data. Data drive
所述第二数据通道,用于通过所述第二数据驱动器接收所述应用系统发送的第三格式的第二数据;The second data channel is configured to receive the second data in the third format sent by the application system through the second data driver;
所述第二数据通道,用于根据所述第二数据映射表将所述第二数据的所述第三格式转换为第四格式,得到格式转换后的第二数据,并将所述格式转换后的第二数据发送至所述网关控制模块610。The second data channel is configured to convert the third format of the second data into a fourth format according to the second data mapping table to obtain the second data after the format conversion, and convert the format The latter second data is sent to the gateway control module 610.
作为一种可选的实施方式,所述网关控制模块610包括网关单元;As an optional implementation manner, the gateway control module 610 includes a gateway unit;
所述网关控制模块610,用于通过所述网关单元将所述格式转换后的第二数据发送至所述数据库。The gateway control module 610 is configured to send the second data after the format conversion to the database through the gateway unit.
作为一种可选的实施方式,所述数据通道系统还包括通道管理模块630;As an optional implementation manner, the data channel system further includes a channel management module 630;
所述通道管理模块630,用于获取各数据对应的数据驱动器和数据映射表;The channel management module 630 is used to obtain the data driver and data mapping table corresponding to each data;
所述通道管理模块630,用于根据所述各数据对应的数据驱动器和数据映射表,创建所述各数据对应的数据通道,组成所述数据通道集群620。The channel management module 630 is configured to create a data channel corresponding to each data according to a data driver and a data mapping table corresponding to each data to form the data channel cluster 620.
作为一种可选的实施方式,所述数据通道系统包括多个数据通道集群,所述多个数据通道集群包括主数据通道集群和备份数据通道集群;As an optional implementation manner, the data channel system includes multiple data channel clusters, and the multiple data channel clusters include a primary data channel cluster and a backup data channel cluster;
所述通道管理模块630,用于当检测到第一数据通道集群故障时,将第二数据通道集群切换为主数据通道集群,所述第一数据通道集群为主数据通道集群,所述第二数据通道集群为备份数据通道集群。The channel management module 630 is configured to switch the second data channel cluster to the primary data channel cluster when the failure of the first data channel cluster is detected, the first data channel cluster is the primary data channel cluster, and the second data channel cluster is the primary data channel cluster. The data channel cluster is a backup data channel cluster.
作为一种可选的实施方式,所述数据通道系统还包括元数据管理模块640;As an optional implementation manner, the data channel system further includes a metadata management module 640;
所述元数据管理模块640,用于获取各数据的元数据;The metadata management module 640 is used to obtain metadata of each data;
所述元数据管理模块640,用于对所述各数据的元数据进行解析处理,得到所述各数据对应的数据驱动器元数据和数据映射表元数据;The metadata management module 640 is configured to analyze and process the metadata of each data to obtain data driver metadata and data mapping table metadata corresponding to each data;
所述元数据管理模块640,用于对所述各数据对应的数据驱动器元数据和数据映射表元数据进行翻译处理,得到所述各数据对应的数据驱动器和数据映射表,并存储所述各数据对应的数据驱动器和数据映射表。The metadata management module 640 is configured to perform translation processing on the data driver metadata and data mapping table metadata corresponding to each data to obtain the data driver and data mapping table corresponding to each data, and to store the data The data driver and data mapping table corresponding to the data.
本申请实施例提供了一种数据通道系统。该数据通道系统包括网关控制模块和数据通道集群。其中,网关控制模块与数据库连接,数据通道集群与应用系统连接。网关控制模块接收数据库发送的第一格式的第一数据,并将第一数据发送至数据通道集群。其中,第一格式为数据库中存储第一数据的格式。数据通道集群将第一数据的第一格式转换为第二格式,得到格式转换后的第一数据,并将格式转换后的第一数据发 送至应用系统。其中,第二格式为应用系统中存储第一数据的格式。数据通道集群接收应用系统发送的第三格式的第二数据,将第二数据的第三格式转换为第四格式,得到格式转换后的第二数据,并将格式转换后的第二数据发送至网关控制模块。其中,第三格式为应用系统中存储第二数据的格式,第四格式为数据库中存储第二数据的格式。网关控制模块将格式转换后的第二数据发送至数据库。这样,无需耗费人力物力对应用系统进行二次开发,通过在应用系统和数据库之间设置数据通道系统,从而实现应用系统与数据库的数据交互,进而以数据库为枢纽实现不同应用系统之间的交互。The embodiment of the present application provides a data channel system. The data channel system includes a gateway control module and a data channel cluster. Among them, the gateway control module is connected to the database, and the data channel cluster is connected to the application system. The gateway control module receives the first data in the first format sent by the database, and sends the first data to the data channel cluster. Wherein, the first format is a format in which the first data is stored in the database. The data channel cluster converts the first format of the first data into the second format, obtains the first data after the format conversion, and sends the first data after the format conversion to the application system. Wherein, the second format is a format in which the first data is stored in the application system. The data channel cluster receives the second data in the third format sent by the application system, converts the third format of the second data into the fourth format, obtains the second data after the format conversion, and sends the second data after the format conversion to Gateway control module. Among them, the third format is a format for storing the second data in the application system, and the fourth format is a format for storing the second data in the database. The gateway control module sends the converted second data to the database. In this way, there is no need to spend manpower and material resources on the secondary development of the application system. By setting a data channel system between the application system and the database, data interaction between the application system and the database is realized, and the database is the hub to realize the interaction between different application systems. .
在一个实施例中,提供了一种计算机设备,如图6所示,包括存储器及处理器,所述存储器上存储有可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述数据的传输方法。In one embodiment, a computer device is provided, as shown in FIG. 6, including a memory and a processor, the memory stores a computer program that can run on the processor, and the processor executes the computer program When realizing the above-mentioned data transmission method.
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述的数据的传输方法。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program is executed by a processor to realize the above-mentioned data transmission method.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage. In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database, or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered as the range described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本 申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the scope of the invention patent. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can be made, and these all fall within the scope of protection of this application. Therefore, the scope of protection of the patent of this application shall be subject to the appended claims.

Claims (11)

  1. 一种数据的传输方法,其特征在于,所述方法应用于数据通道系统,所述数据通道系统包括网关控制模块和数据通道集群,所述网关控制模块与数据库连接,所述数据通道集群与应用系统连接,所述方法包括:A data transmission method, characterized in that the method is applied to a data channel system, the data channel system includes a gateway control module and a data channel cluster, the gateway control module is connected to a database, and the data channel cluster is connected to the application System connection, the method includes:
    所述网关控制模块接收所述数据库发送的第一格式的第一数据,并将所述第一数据发送至所述数据通道集群;所述第一格式为所述数据库中存储所述第一数据的格式;The gateway control module receives the first data in the first format sent by the database, and sends the first data to the data channel cluster; the first format is that the first data is stored in the database Format
    所述数据通道集群将所述第一数据的所述第一格式转换为第二格式,得到格式转换后的第一数据,并将所述格式转换后的第一数据发送至所述应用系统;所述第二格式为所述应用系统中存储所述第一数据的格式;The data channel cluster converts the first format of the first data into a second format, obtains the first data after the format conversion, and sends the first data after the format conversion to the application system; The second format is a format in which the first data is stored in the application system;
    所述数据通道集群接收所述应用系统发送的第三格式的第二数据,将所述第二数据的所述第三格式转换为第四格式,得到格式转换后的第二数据,并将所述格式转换后的第二数据发送至所述网关控制模块;所述第三格式为所述应用系统中存储所述第二数据的格式,所述第四格式为所述数据库中存储所述第二数据的格式;The data channel cluster receives the second data in the third format sent by the application system, converts the third format of the second data into a fourth format, obtains the second data after the format conversion, and combines The second data after the format conversion is sent to the gateway control module; the third format is the format for storing the second data in the application system, and the fourth format is for storing the first data in the database. 2. The format of the data;
    所述网关控制模块将所述格式转换后的第二数据发送至所述数据库。The gateway control module sends the second data after the format conversion to the database.
  2. 根据权利要求1所述的方法,其特征在于,所述网关控制模块包括应用程序接口单元,所述应用程序接口单元包含所述第一数据对应的应用程序接口,所述数据通道集群包含所述第一数据对应的第一数据通道;The method according to claim 1, wherein the gateway control module includes an application program interface unit, the application program interface unit includes an application program interface corresponding to the first data, and the data channel cluster includes the The first data channel corresponding to the first data;
    所述网关控制模块接收所述数据库发送的第一格式的第一数据,并将所述第一数据发送至所述数据通道集群,包括:The gateway control module receiving the first data in the first format sent by the database and sending the first data to the data channel cluster includes:
    所述应用程序接口单元通过所述第一应用程序接口接收所述数据库发送的第一格式的第一数据,并将所述第一数据发送至所述数据通道集群中的所述第一数据通道。The application program interface unit receives the first data in the first format sent by the database through the first application program interface, and sends the first data to the first data channel in the data channel cluster .
  3. 根据权利要求1或2所述的方法,其特征在于,所述数据通道集群包含所述第一数据对应的第一数据通道,所述第一数据通道包括所述第一数据对应的第一数据映射表和第一数据驱动器;The method according to claim 1 or 2, wherein the data channel cluster includes a first data channel corresponding to the first data, and the first data channel includes first data corresponding to the first data The mapping table and the first data driver;
    所述数据通道集群将所述第一数据的所述第一格式转换为第二格式,得到格式转换后的第一数据,并将所述格式转换后的第一数据发送至所述应用系统,包括:The data channel cluster converts the first format of the first data into a second format, obtains the first data after the format conversion, and sends the first data after the format conversion to the application system, include:
    所述第一数据通道根据所述第一数据映射表将所述第一数据的所述第一格式转换为第二格式,得到格式转换后的第一数据;Converting, by the first data channel, the first format of the first data into a second format according to the first data mapping table, to obtain the first data after the format conversion;
    所述第一数据通道通过所述第一数据驱动器将所述格式转换后的第一数据发送至所 述应用系统。The first data channel sends the first data after the format conversion to the application system through the first data driver.
  4. 根据权利要求1所述的方法,其特征在于,所述数据通道集群包含所述第二数据对应的第二数据通道,所述第二数据通道包括所述第二数据对应的第二数据映射表和第二数据驱动器;The method according to claim 1, wherein the data channel cluster includes a second data channel corresponding to the second data, and the second data channel includes a second data mapping table corresponding to the second data And the second data drive;
    所述数据通道集群接收所述应用系统发送的第三格式的第二数据,将所述第二数据的所述第三格式转换为第四格式,得到格式转换后的第二数据,并将所述格式转换后的第二数据发送至所述网关控制模块,包括:The data channel cluster receives the second data in the third format sent by the application system, converts the third format of the second data into a fourth format, obtains the second data after the format conversion, and combines The second data after the format conversion is sent to the gateway control module, including:
    所述第二数据通道通过所述第二数据驱动器接收所述应用系统发送的第三格式的第二数据;The second data channel receives the second data in the third format sent by the application system through the second data driver;
    所述第二数据通道根据所述第二数据映射表将所述第二数据的所述第三格式转换为第四格式,得到格式转换后的第二数据,并将所述格式转换后的第二数据发送至所述网关控制模块。The second data channel converts the third format of the second data into a fourth format according to the second data mapping table to obtain the second data after the format conversion, and the second data after the format conversion is obtained. The second data is sent to the gateway control module.
  5. 根据权利要求1或4所述的方法,其特征在于,所述网关控制模块包括网关单元;The method according to claim 1 or 4, wherein the gateway control module comprises a gateway unit;
    所述网关控制模块将所述格式转换后的第二数据发送至所述数据库,包括:The gateway control module sending the second data after the format conversion to the database includes:
    所述网关控制模块通过所述网关单元将所述格式转换后的第二数据发送至所述数据库。The gateway control module sends the second data after the format conversion to the database through the gateway unit.
  6. 根据权利要求1所述的方法,其特征在于,所述数据通道系统还包括通道管理模块,所述方法还包括:The method according to claim 1, wherein the data channel system further comprises a channel management module, and the method further comprises:
    所述通道管理模块获取各数据对应的数据驱动器和数据映射表;The channel management module obtains the data driver and the data mapping table corresponding to each data;
    所述通道管理模块根据所述各数据对应的数据驱动器和数据映射表,创建所述各数据对应的数据通道,组成所述数据通道集群。The channel management module creates a data channel corresponding to each data according to a data driver and a data mapping table corresponding to each data to form the data channel cluster.
  7. 根据权利要求6所述的方法,其特征在于,所述数据通道系统包括多个数据通道集群,所述多个数据通道集群包括主数据通道集群和备份数据通道集群,所述方法还包括:The method according to claim 6, wherein the data channel system includes multiple data channel clusters, the multiple data channel clusters including a primary data channel cluster and a backup data channel cluster, and the method further comprises:
    当所述通道管理模块检测到第一数据通道集群故障时,将第二数据通道集群切换为主数据通道集群,所述第一数据通道集群为主数据通道集群,所述第二数据通道集群为备份数据通道集群。When the channel management module detects the failure of the first data channel cluster, the second data channel cluster is switched to the main data channel cluster, the first data channel cluster is the main data channel cluster, and the second data channel cluster is Backup data channel cluster.
  8. 根据权利要求1所述的方法,其特征在于,所述数据通道系统还包括元数据管理模块,所述方法还包括:The method according to claim 1, wherein the data channel system further comprises a metadata management module, and the method further comprises:
    所述元数据管理模块获取各数据的元数据;The metadata management module obtains metadata of each data;
    所述元数据管理模块对所述各数据的元数据进行解析处理,得到所述各数据对应的数 据驱动器元数据和数据映射表元数据;The metadata management module analyzes and processes the metadata of each data to obtain data driver metadata and data mapping table metadata corresponding to each data;
    所述元数据管理模块对所述各数据对应的数据驱动器元数据和数据映射表元数据进行翻译处理,得到所述各数据对应的数据驱动器和数据映射表,并存储所述各数据对应的数据驱动器和数据映射表。The metadata management module performs translation processing on the data driver metadata and data mapping table metadata corresponding to each data to obtain the data driver and data mapping table corresponding to each data, and stores the data corresponding to each data Drive and data mapping table.
  9. 一种数据通道系统,其特征在于,所述数据通道系统包括网关控制模块和数据通道集群,所述网关控制模块与数据库连接,所述数据通道集群与应用系统连接;A data channel system, characterized in that the data channel system includes a gateway control module and a data channel cluster, the gateway control module is connected to a database, and the data channel cluster is connected to an application system;
    所述网关控制模块,用于接收所述数据库发送的第一格式的第一数据,并将所述第一数据发送至所述数据通道集群;所述第一格式为所述数据库中存储所述第一数据的格式;The gateway control module is configured to receive first data in a first format sent by the database, and send the first data to the data channel cluster; the first format is that the database stores the The format of the first data;
    所述数据通道集群,用于将所述第一数据的所述第一格式转换为第二格式,得到格式转换后的第一数据,并将所述格式转换后的第一数据发送至所述应用系统;所述第二格式为所述应用系统中存储所述第一数据的格式;The data channel cluster is configured to convert the first format of the first data into a second format, obtain the first data after the format conversion, and send the first data after the format conversion to the Application system; the second format is a format in which the first data is stored in the application system;
    所述数据通道集群,用于接收所述应用系统发送的第三格式的第二数据,将所述第二数据的所述第三格式转换为第四格式,得到格式转换后的第二数据,并将所述格式转换后的第二数据发送至所述网关控制模块;所述第三格式为所述应用系统中存储所述第二数据的格式,所述第四格式为所述数据库中存储所述第二数据的格式;The data channel cluster is configured to receive second data in a third format sent by the application system, convert the third format of the second data into a fourth format, and obtain the second data after the format conversion, And send the second data after the format conversion to the gateway control module; the third format is the format in which the second data is stored in the application system, and the fourth format is the format stored in the database The format of the second data;
    所述网关控制模块,用于将所述格式转换后的第二数据发送至所述数据库。The gateway control module is configured to send the second data after the format conversion to the database.
  10. 一种计算机设备,包括存储器及处理器,所述存储器上存储有可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至8中任一项所述方法的步骤。A computer device, comprising a memory and a processor, and a computer program that can be run on the processor is stored on the memory, wherein the processor implements any one of claims 1 to 8 when the computer program is executed. The steps of the method described in item.
  11. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至8中任一项所述的方法的步骤。A computer-readable storage medium with a computer program stored thereon, wherein the computer program implements the steps of the method according to any one of claims 1 to 8 when the computer program is executed by a processor.
PCT/CN2020/119709 2020-03-13 2020-09-30 Data transmission method and data channel system WO2021179589A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010174731.3 2020-03-13
CN202010174731.3A CN111405035A (en) 2020-03-13 2020-03-13 Data transmission method and data channel system

Publications (1)

Publication Number Publication Date
WO2021179589A1 true WO2021179589A1 (en) 2021-09-16

Family

ID=71432507

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/119709 WO2021179589A1 (en) 2020-03-13 2020-09-30 Data transmission method and data channel system

Country Status (2)

Country Link
CN (1) CN111405035A (en)
WO (1) WO2021179589A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111405035A (en) * 2020-03-13 2020-07-10 北京旷视科技有限公司 Data transmission method and data channel system
CN115103021B (en) * 2022-05-18 2023-03-24 慧之安信息技术股份有限公司 Gateway access management method based on GAT1400 protocol
CN115037794A (en) * 2022-06-07 2022-09-09 抖音视界(北京)有限公司 Data acquisition method and device, computer equipment and readable storage medium
CN115103224B (en) * 2022-06-07 2023-04-25 慧之安信息技术股份有限公司 Video intelligent analysis method supporting GAT1400 protocol

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1448853A (en) * 2002-04-01 2003-10-15 上海网上乐园信息技术有限公司 Compasite distributed information processing system and implementation method thereof
CN101754221A (en) * 2008-12-19 2010-06-23 中国移动通信集团山东有限公司 Data transmission method between heterogeneous systems and data transmission system
US20180337889A1 (en) * 2017-05-19 2018-11-22 Vmware, Inc. Varying encryption level of traffic through network tunnels
CN109525539A (en) * 2017-09-20 2019-03-26 中移(杭州)信息技术有限公司 A kind of capacity calling method calls receipt method, information processing method and system
CN110162571A (en) * 2019-04-26 2019-08-23 厦门市美亚柏科信息股份有限公司 A kind of system, method, storage medium that data among heterogeneous databases synchronize
CN111405035A (en) * 2020-03-13 2020-07-10 北京旷视科技有限公司 Data transmission method and data channel system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7096033B1 (en) * 2000-07-18 2006-08-22 Koninkiljke Phillips Electronics N.V. Mobile apparatus enabling inter-network communication
US10325225B2 (en) * 2012-05-09 2019-06-18 Nasdaq Technology Ab Methods and arrangements for an automated exchange system
CN105094707B (en) * 2015-08-18 2018-03-13 华为技术有限公司 A kind of data storage, read method and device
CN105743709A (en) * 2016-04-05 2016-07-06 浪潮电子信息产业股份有限公司 Management device, complete cabinet management system and management method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1448853A (en) * 2002-04-01 2003-10-15 上海网上乐园信息技术有限公司 Compasite distributed information processing system and implementation method thereof
CN101754221A (en) * 2008-12-19 2010-06-23 中国移动通信集团山东有限公司 Data transmission method between heterogeneous systems and data transmission system
US20180337889A1 (en) * 2017-05-19 2018-11-22 Vmware, Inc. Varying encryption level of traffic through network tunnels
CN109525539A (en) * 2017-09-20 2019-03-26 中移(杭州)信息技术有限公司 A kind of capacity calling method calls receipt method, information processing method and system
CN110162571A (en) * 2019-04-26 2019-08-23 厦门市美亚柏科信息股份有限公司 A kind of system, method, storage medium that data among heterogeneous databases synchronize
CN111405035A (en) * 2020-03-13 2020-07-10 北京旷视科技有限公司 Data transmission method and data channel system

Also Published As

Publication number Publication date
CN111405035A (en) 2020-07-10

Similar Documents

Publication Publication Date Title
WO2021179589A1 (en) Data transmission method and data channel system
US9348665B2 (en) Mapping messages between web services
US20070260750A1 (en) Adaptable data connector
CN112286503A (en) Multi-registration center micro-service unified management method, device, equipment and medium
US10372929B1 (en) Secure file transfer and notification server
US10419822B2 (en) Method, device, and system for switching at a mobile terminal of a smart television and acquiring information at a television terminal
US11431806B2 (en) Internet of things information system of multiple objects
US20140188802A1 (en) Pull and paste
AU2014403138A1 (en) Terminal, server, and terminal control method
WO2016145981A1 (en) Data transmission system and method
US9277027B2 (en) Method for providing message and device therefor
CN112688952B (en) Message processing method, device, radio remote unit and medium
US20120002243A1 (en) Delivery of scan services over a device service port
US20140211248A1 (en) Web server apparatus, control method, and program therefor
US9148404B2 (en) System for accessing data of cloud database using transparent technology
CN104243198A (en) Network management method and system based on network configuration protocol
US10554723B2 (en) HTTP server, method for controlling the same, and image forming apparatus
US9686361B2 (en) Communication device, communication system, communication method and computer program product
EP4044508A1 (en) Data processing method and apparatus
US10334004B2 (en) System and method for networked video capture, backup, and serving
US9137289B2 (en) Facilitating a stateless transmission of data in an information technology system
CN116095111A (en) Configuration method and device of data acquisition equipment and platform server of Internet of things
CN112468886A (en) Multicast data forwarding method, device, equipment and readable storage medium
CN103067419A (en) Distributed type file system and method of controlling file storage in distributed type file system
CN111027300A (en) Method and device for generating report form in user-defined mode

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20923773

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20923773

Country of ref document: EP

Kind code of ref document: A1