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

Data storage method and device, data query method and device, server and storage medium

A data storage and data query technology, applied in the field of data processing, can solve the problem of occupying database disk space, and achieve the effect of reducing the space occupied

Pending Publication Date: 2020-03-17
深圳市铭数信息有限公司
View PDF4 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, storing these large fields directly in the database consumes a lot of disk space in the database

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
  • Data storage method and device, data query method and device, server and storage medium
  • Data storage method and device, data query method and device, server and storage medium
  • Data storage method and device, data query method and device, server and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0052] figure 1 The flow diagram of a data storage method provided by Embodiment 1 of the present invention is applicable to the scenario where data is compressed and then stored in a database. The method can be executed by a data storage device, and the device can use software and / or hardware and can be integrated on the server.

[0053] like figure 1 As shown, the data storage method provided by Embodiment 1 of the present invention includes:

[0054] S110. Receive data to be stored transmitted based on the storage request, where the data to be stored includes one or more text fields, and each text field corresponds to a unique field identifier.

[0055]Wherein, the storage request refers to a request generated when data needs to be stored. The data to be stored refers to the data that needs to be stored in the database. Specifically, the data type of the data to be stored is a JAVA data type. A text field refers to a piece of text that records information, such as reco...

Embodiment 2

[0077] figure 2 It is a schematic flow chart of a data query method provided in Embodiment 2 of the present invention, which is applicable to the scenario of querying data to be queried stored in a database. The method can be executed by a data query device, which can be implemented in the form of software and / or hardware, and can be integrated on a server.

[0078] like figure 2 As shown, the data query method provided by Embodiment 2 of the present invention includes:

[0079] S210. Receive the data to be queried transmitted based on the query request, the data to be queried includes one or more text fields, and each text field corresponds to a unique field identifier.

[0080] Wherein, the query request refers to a request generated when data needs to be queried. The data to be queried refers to data that needs to be queried. Specifically, the data to be queried is stored in the database and transmitted from the database to the JAVA application program. The data type...

Embodiment 3

[0103] image 3 It is a schematic structural diagram of a data storage device provided by Embodiment 3 of the present invention. This embodiment is applicable to the scene where data is compressed and then stored in a database. The device can be implemented by software and / or hardware, and can be integrated on the server.

[0104] like image 3 As shown, the data storage device provided in this embodiment may include a receiving module 310, a judging module 320, a compression module 330 and a storage module 340, wherein:

[0105] The receiving module 310 is configured to receive the data to be stored transmitted based on the storage request, the data to be stored includes one or more text fields, and each text field corresponds to a unique field identifier;

[0106] Judging module 320, configured to judge whether the text field needs to be compressed according to the field identifier;

[0107] The compression module 330 is used to call a preset compression algorithm to comp...

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 embodiment of the invention provides a data storage method and device, a data query method and device, a server and a storage medium. The data storage method comprises: receiving to-be-stored datatransmitted based on a storage request, wherein the to-be-stored data comprises one or more text fields, and each text field corresponds to a unique field identifier; judging whether a text field needs to be compressed or not according to the field identifier; if the text field needs to be compressed, calling a preset compression algorithm to compress the text field based on a configured custom processor; and performing data type conversion on the compressed to-be-stored data, and storing the data into a database. And the effect of reducing the occupied space of the disk of the database is achieved.

Description

technical field [0001] The embodiments of the present invention relate to the technical field of data processing, and in particular, to a data storage and query method, device, server and storage medium. Background technique [0002] During the project development process, it may be necessary to store some relatively large text data (such as JSON string results returned by an interface, message results returned by an SDK, etc.) in the corresponding fields of the database. Frequent access operations may be performed on this data. [0003] At present, the usual practice is to define a large text field type in the database, such as text (can store 65535 characters), or mediumtext (can store 16777215 characters) to store these large fields, and then read and write through conventional methods operate. [0004] However, storing these large fields directly in the database consumes a lot of disk space in the database. Contents of the invention [0005] Embodiments of the prese...

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
IPC IPC(8): G06F16/21G06F16/28
CPCG06F16/211G06F16/28
Inventor 张维
Owner 深圳市铭数信息有限公司
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