Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device for generating serial numbers

A serial number, serial number generation technology, applied in the computer field, can solve the problem of lack of acquisition sequence, inability to know the data serial number, etc.

Inactive Publication Date: 2015-09-30
WUXI TVMINING MEDIA SCI & TECH
View PDF3 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] At present, the commonly used databases, such as MySQL, lack the way to obtain the sequence. When inserting data into the table of the database, the sequence number of the inserted data cannot be known.

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
  • Method and device for generating serial numbers
  • Method and device for generating serial numbers
  • Method and device for generating serial numbers

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0055] figure 2 It is a flowchart of a method for generating a serial number provided in Embodiment 1 of the present invention. Such as figure 2 As shown, the method includes the following steps S201-S205:

[0056] Step S201: According to the identifier of the data table where the current data is to be stored, the initial value of the serial number corresponding to the data table where the current data is to be stored, the step size and the last allocated serial number are obtained from the preset sequence table;

[0057] Step S202: Judging whether the data table where the current data is to be stored is the first input data, if yes, execute S203, otherwise execute S204;

[0058] Step S203: Use the initial value of the serial number corresponding to the data table where the current data is to be stored as the serial number of the current data, and record the serial number of the current data as the last allocated serial number corresponding to the data table where the curr...

Embodiment 2

[0064] image 3 It is a flowchart of a method for generating a serial number provided in Embodiment 2 of the present invention. Such as image 3 As shown, the method includes the following steps S301-S309:

[0065] Step S301: According to the identifier of the data table where the current data is to be stored, the initial value of the serial number corresponding to the data table where the current data is to be stored, the step size and the last allocated serial number are obtained from the preset sequence table;

[0066] Step S302: Determine whether the data table to be stored in the current data is the first input data, if yes, execute S303, otherwise execute S304;

[0067] Step S303: Use the initial value of the serial number corresponding to the data table where the current data is to be stored as the serial number of the current data, and record the serial number of the current data as the last allocated serial number corresponding to the data table where the current da...

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 method and device for generating serial numbers. The method and device are used for acquiring the serial numbers corresponding to inserted data when the data are inserted into a data base and achieving the purpose that each datum has unique identification, that is, one serial number. The method comprises the steps that according to identification of a data table in which current data are stored, a serial number initial value and a step size which correspond to the data table in which the current data are stored and last distributed serial numbers are acquired from a preset serial table; serial numbers of the current data are generated according to the serial number initial value and the step size which correspond to the data table in which the current data are stored and the last distributed serial numbers; the current data and the serial numbers of the current data are stored in the data table in which the current data are stored; when a new data table occurs, the serial table records identification of the new data table and a serial number initial value and a step size which correspond to the new data table. According to the method, the serial numbers corresponding to the inserted data in the data base can be effectively acquired.

Description

technical field [0001] The invention relates to the field of computers, in particular to a method and device for generating serial numbers. Background technique [0002] In the information society, fully and effectively managing and utilizing various information resources is a prerequisite for scientific research and decision-making management. Database technology is the core part of various information systems such as management information systems, office automation systems, and decision support systems, and is an important technical means for scientific research and decision-making management. In order to better support the above functions, the database needs to store a large amount of data in tables of the database. [0003] At present, the commonly used databases, such as MySQL, lack the way to obtain the sequence. When inserting data into the table of the database, it is impossible to know the sequence number of the inserted data. Therefore, there is an urgent need f...

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): G06F17/30
CPCG06F16/2282
Inventor 徐晓东
Owner WUXI TVMINING MEDIA SCI & TECH