Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Gateway data uploading database connection number control method, equipment, device, and medium

A technology for data uploading and control methods, applied in the field of data storage, can solve the problems of database congestion, fullness, and the number of connections cannot be released, and achieve the effect of reducing pressure and improving user experience.

Inactive Publication Date: 2019-03-26
ZHUHAI PILOT TECH
View PDF8 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In order to overcome a series of problems caused by congestion and fullness of database connections in the prior art, and the number of connections cannot be released, one of the purposes of the present invention is to provide a method for controlling the number of database connections for gateway data upload. Save it as a target file and not store it directly (upload the database) to reduce the pressure on the database. In addition, through the special file scanning service and data storage service, and limit the optimal number of threads started by the storage service to further control the database connection , which also uses a thread-safe blocking queue LinkedBlockingQueue to ensure the orderly storage of data and improve user experience

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Gateway data uploading database connection number control method, equipment, device, and medium
  • Gateway data uploading database connection number control method, equipment, device, and medium
  • Gateway data uploading database connection number control method, equipment, device, and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0040] Embodiment 1 of the present invention discloses a method for controlling the number of gateway data upload database connections, which can be executed by the storage platform (hardware or / and software), please refer to figure 1 As shown, it includes the following steps:

[0041] 110. The server obtains the file uploaded by the gateway and the time stamp of the file.

[0042] After the Xgate gateway uploads the file to the storage platform, the interface server of the storage platform obtains the compressed stream of the uploaded file, and judges whether the time stamp is greater than the system time, or whether it is smaller than the system time by the preset number of days (set according to needs, such as 10 days, 30 days, etc.) days, 35 days, etc.), if the timestamp is greater than the system time, or less than the system time by the preset number of days, then discard the file uploaded by the gateway. The file name of the file uploaded by the gateway includes the S / ...

Embodiment 2

[0054] Embodiment 2 discloses a gateway data upload database connection number control device corresponding to the above embodiment, please refer to figure 2 shown, which includes:

[0055] Obtaining module 210, for obtaining the file uploaded by the gateway, and the time stamp of the file;

[0056] The saving module 220 is configured to decompress the file, and save the target file into a corresponding folder according to the time stamp, the target file is a decompressed file;

[0057] The upload module 230 is used to generate a cache thread pool, and the cache thread pool is used to manage scanning threads and data processing threads, and uses blocking queues to store target files scanned by scanning threads, and the data processing threads read from the blocking queues. Get the content of the target file and perform the upload database operation.

Embodiment 3

[0059] image 3 A schematic structural diagram of an electronic device provided in Embodiment 3 of the present invention, such as image 3 As shown, the electronic device is a server, which includes a processor 310, a memory 320, an input device 330, and an output device 340; the number of processors 310 in the computer device may be one or more, image 3 Take a processor 310 as an example; the processor 310, memory 320, input device 330 and output device 340 in the electronic device can be connected by bus or other methods, image 3 Take connection via bus as an example.

[0060] The memory 320, as a computer-readable storage medium, can be used to store software programs, computer-executable programs and modules, such as program instructions / modules corresponding to the gateway data upload database connection number control method in the embodiment of the present invention (for example, gateway data The acquisition module 210, the storage module 220 and the upload module 2...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a gateway data uploading database connection number control method, which comprises the following steps: obtaining a file uploaded by a gateway and a timestamp of the file; decompressing the file and storing a target file to a corresponding folder according to the timestamp; generating a cache thread pool, wherein the cache thread pool is used for managing a scanning threadand a data processing thread and using a blocking queue to store the target file scanned by the scanning thread, and the data processing thread reads the content of the target file from the blockingqueue and executes an uploading database operation. The invention also discloses gateway data uploading database connection number control equipment, an electronic device and a storage medium. The to-be-uploaded file is temporarily stored into the target file; the manner of not directly putting in storage reduces the pressure of the database; moreover, through a special file scanning service and adata storing service, the number of the optimal threads started by the storing service is limited to further control database connection, thereby improving the user experience.

Description

technical field [0001] The present invention relates to the technical field of data storage, and in particular to a method, device, electronic equipment and medium for controlling the number of connections to an Internet of Things gateway data upload database. Background technique [0002] Now the system’s Internet of Things data acquisition module data upload method is that the real-time data collected by the equipment is unified in the gateway, and then the gateway uploads to the cloud platform through the 4G wireless network or optical fiber. After the platform receives the data, it starts a thread to analyze and correct the data. After the verification is passed, the data is inserted into the database. However, when there are more and more gateways, data storage is likely to cause the database connection to be full and the table to be locked. Imagine if the upper limit of the number of database connections is 100, and now there are more than 100 gateways uploading data a...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): H04L29/08H04L29/06G06F16/25
CPCH04L67/06H04L69/04
Inventor 温桂龙王炜连朔
Owner ZHUHAI PILOT TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products