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

Data storage and reading method, data processing device and electronic equipment

A technology for data storage and data reading, applied in the computer field, can solve problems such as inability to store, length limitation of VARCHAR data type, etc.

Pending Publication Date: 2020-03-10
ALIBABA CLOUD COMPUTING LTD
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, users often encounter the following problems during use: 1. Don't know how to choose the appropriate data type length; 2. When the actual data exceeds the set length, it cannot be stored, and the only option is to modify the data type length or rebuild the table; 3. Common database products have length restrictions on the VARCHAR data type

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 and reading method, data processing device and electronic equipment
  • Data storage and reading method, data processing device and electronic equipment
  • Data storage and reading method, data processing device and electronic equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0068] Based on the above data storage and reading scheme ideas, such as Figure 4 As shown, it is the flow of the data storage method shown in the embodiment of the present invention Figure 1 , the execution body of this method can be image 3 The data storage device 330 shown in. Such as Figure 4 As shown, the data storage method includes the following steps:

[0069] S410. Acquire data to be stored.

[0070] Wherein, the data to be stored may be data of VARCHAR data type to be written into the database. The file designated for writing data corresponding to the database is recorded as the original storage file. The database can pre-designate the maximum data length of data to be written, such as data of VARCHAR data type.

[0071] S420. Determine whether the length of the data is greater than a preset length threshold.

[0072] After acquiring the data to be stored, it is first judged whether the length of the data is greater than a preset length threshold. The len...

Embodiment 2

[0080] On the basis of the previous embodiment, this embodiment adds the following extended content.

[0081] First, if Figure 5 Shown is the flow of the data storage method of the embodiment of the present invention Figure II . On the basis of the method shown in the previous embodiment, a process of identifying data stored in a specified file is added. Such as Figure 5 As shown, after step S430, the following steps can also be performed:

[0082] S510. Set a flag in the original storage file for identifying the content of the original record as a specified file index.

[0083] In order to easily identify whether the content stored in the original record is the real stored data or the specified file index used to store the data, the original record that stores the specified file index can be identified, such as setting the content used to identify the original record in the original storage file Flag for the specified file index. In practical application scenarios, i...

Embodiment 3

[0091] Based on the above data storage and reading scheme ideas, such as Figure 7 As shown, it is the flow of the data reading method shown in the embodiment of the present invention Figure 1 , the execution body of this method can be image 3 The data reading device 340 shown in. Such as Figure 7 As shown, the data reading method includes the following steps:

[0092] S710. Obtain an original record of the data to be read in the original storage file.

[0093] Wherein, the data to be obtained may be data of VARCHAR data type to be read from the database. The file designated for storing data corresponding to the database is recorded as the original storage file. The database can pre-specify the maximum data length of stored data such as VARCHAR data type.

[0094] According to the externally input query condition, the original record of the data to be read in the original storage file is locked.

[0095] S720, judging whether the content of the original record is a s...

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 and reading method, a data processing device and electronic equipment, and the data storage method comprises the steps: obtaining to-be-stored data; judging whether the length of the data is greater than a preset length threshold value or not; if the length of the data is greater than the length threshold, storing the data into a specified file except the original storage file, and writing a specified file index corresponding to the data into an original record corresponding to the data in the original storage file; the data reading method comprises the steps of obtaining an original record of to-be-read data in an original storage file; judging whether the content of the original record is a specified file index or not; if the content of the original record is the specified file index, reading the data pointed by the specified file index as the finally read data content, wherein the maximum length of the data allowed to be written in the specified file is greater than a length threshold. According to the scheme of the embodiment of the invention, the storage and reading of the ultra-long data can be flexibly realized.

Description

technical field [0001] The present application relates to the field of computer technology, in particular to a data storage and reading method, a data processing device and electronic equipment. Background technique [0002] The VARCHAR data type is one of the most common data types in relational databases. However, users often encounter the following problems during use: 1. Don't know how to choose the appropriate data type length; 2. When the actual data exceeds the set length, it cannot be stored, and the only option is to modify the data type length or rebuild the table; 3. Common database products have length restrictions on the VARCHAR data type. Contents of the invention [0003] The invention provides a data storage and reading method, a data processing device and electronic equipment, which can flexibly realize the storage and reading of ultra-long data. [0004] In order to achieve the above object, embodiments of the present invention adopt the following techn...

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): G06F16/28G06F16/22
Inventor 张清伟潘岳郑博文王联辉张浩然曾杰南张包峰
Owner ALIBABA CLOUD COMPUTING LTD
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