CN104049935A - Method for generating variable printing random numbers of newspapers - Google Patents
Method for generating variable printing random numbers of newspapers Download PDFInfo
- Publication number
- CN104049935A CN104049935A CN201310418745.5A CN201310418745A CN104049935A CN 104049935 A CN104049935 A CN 104049935A CN 201310418745 A CN201310418745 A CN 201310418745A CN 104049935 A CN104049935 A CN 104049935A
- Authority
- CN
- China
- Prior art keywords
- random number
- newspaper
- order
- random numbers
- output file
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Landscapes
- Record Information Processing For Printing (AREA)
- Document Processing Apparatus (AREA)
Abstract
The invention discloses a method for generating variable printing random numbers of newspapers. The method comprises the following steps: a. setting parameters; b. generating a new random number by using an E language random number taking command; c. determining whether the random numbers generated in step b meet large and small limit requirements and the condition that the random numbers generated in step b and the previously generated random numbers are not repeated simultaneously or not, if so, storing the generated random numbers and continuing, otherwise, returning to step b; d. determining whether the number of the stored random numbers meets the condition of the set number, if so, packaging data and generating an output file, otherwise, returning to step b. Through an E language direct text line writing command, line feed in batch does not need to be carried out on a large batch of data, and the random number with the required number can be quickly generated, so that the variable printing requirement of newspapers can be simply and quickly met.
Description
[technical field]
The present invention relates to random number, relate in particular to the generation method of the variable printed random number of a kind of newspaper.
[background technology]
In recent years, along with the development of digital media technology and the increase of personal printing demand, variable information on printed matter is more and more, bar code for example, number, bill etc., traditional printing industry faces new challenges, the variable printed fast development in every field, makes journalism have to be paid attention to.Embedded fusion is variable printed stamps different content need to every part of newspaper, comprise word, numeral, picture, bar code, Quick Response Code etc.,, targetedly newspaper product personalized to realize, variable printed technology and traditional printing are combined, be embodied as every part of newspaper and print different contents.Because the variable data of journalism in variable printed can not repeat, the source of therefore not repeating variable data just becomes the variable printed key issue of journalism.
The variable printed data of journalism have following two features:
One, data volume is very large, reach hundreds thousand of more than;
Two, data do not repeat, and have specific call format; Need to produce two groups of data, one group is the data that printing machine will be used, and another group is for mobile phone prize drawing platform, the data of using as prize drawing database.
It is that conventional random number generates software that < < random number generates expert > >, but this software is carrying out needing long time when a large amount of random number record enters a new line in batches.With this Software Create 600,000, with interior 300,000 unduplicated random data, need more than 50 minutes, and can not add specific call format, cannot meet the needs that the variable printed random number of newspaper generates.
[summary of the invention]
The technical problem to be solved in the present invention is to provide a kind of generation method of the variable printed random number of newspaper of quick generation random data.
The technical matters that the present invention further will solve is to provide a kind of generation method of the variable printed random number of newspaper of the call format that can meet the variable printed data source of journalism.
In order to solve the problems of the technologies described above, the technical solution used in the present invention is that the generation method of the variable printed random number of a kind of newspaper, comprises the following steps:
A. parameters: in order to set the figure place of random number, big or small boundary and number;
B. with the random number order of getting of E language, generate a new random number;
C. the condition that judges whether random number that b step generates meets that big or small boundary requires simultaneously and do not repeat mutually with the random number having generated before, as be yes, store random number continuation that b step generates, otherwise return to step b;
D. whether the number that judges current random number of having stored meets the condition of the number of setting, as is yes, encapsulation of data produce output file, otherwise return to step b.
The generation method of the variable printed random number of above-described newspaper, step a comprises provides a user interface, and this user interface comprises:
Random number figure place input block, in order to set the figure place of random number;
Random number range input block, in order to set the big or small boundary of random number;
Random number quantity input block, in order to set the number of random number.
The generation method of the variable printed random number of above-described newspaper, user interface also comprises a filename input block, in order to set the title of this at least one output file.
The generation method of the variable printed random number of above-described newspaper, in steps d, is to produce two output files, and wherein, the first output file is preserved the information for the variable printed equipment of a newspaper, includes the random number of setting number; The second output file is preserved Referral information, includes the random number of described setting number, and the sequence number of corresponding each random number.
The generation method of the variable printed random number of above-described newspaper, the generation of the second output file data, gets by the conversion of E language database; first create an EDB database, then add the random number of described setting number and the corresponding field increasing by the form of database; Wherein, comprise the front variable code of random number, newspaper ID code, date format and newspaper price, deposit in an EDB database on the same day, then the EDB format conversion of E language is become to XLS form.
The present invention directly writes line of text order by E language, does not need again large batch of data to be carried out to batch line feed, can generate fast the random number of required quantity, thereby meet quickly and easily the variable printed needs of newspaper.
[accompanying drawing explanation]
Below in conjunction with the drawings and specific embodiments, the present invention is further detailed explanation.
Fig. 1 is the process flow diagram of the generation method of the variable printed random number of embodiment of the present invention newspaper.
Fig. 2 is the exploded view of two groups of data output formats of generation method of the variable printed random number of embodiment of the present invention newspaper.
[embodiment]
As shown in Figure 1, the generation method of the variable printed random number of embodiment of the present invention newspaper comprises the following steps:
S101: data parameters is set, in order to set the parameters such as the figure place of random number, big or small boundary and random number number;
S102: utilize the random number order of getting of E language to generate a new random number;
S103: judge that whether new random number is arranging scope, if so, goes to step S104, otherwise goes to step S102;
S104: judge that whether new random number repeats mutually with the random number having generated, and if so, goes to step S102, otherwise goes to step S105;
S105: this new random number is preserved;
S106: whether the number that judges current random number of having preserved has met the condition of the number of setting, and is to go to step S107, otherwise go to step S102;
S107: encapsulation of data also produces two output files, first in these two output files is TXT form, second is XLS form, the first output file in these two output files is preserved the information for the variable printed equipment of a newspaper, and the information of this first output file includes the random number of setting number; The second output file is preserved Referral information, comprises the random number of above-mentioned setting number and the sequence number of corresponding each random number.
This flow process, its thinking comprises: use two circulations: be responsible for for one getting newly-generated random number with the random number order of getting of E language, another is responsible for judging whether newly-generated random number repeats.By outer circulation, peek, the qualified number taking out is deposited in to array, and record the number (number of array is as the cycle index of interior circulation) of array.Interior circulation is used for judging whether the random number of taking out and each number depositing in array equate, as long as with wherein any equates, do a mark, jump out interior circulation, again peek.
The step that generates a new random number realizes by directly calling the random number order of getting of E language.
The present embodiment is for the generation of second group of data of needs of variable printed prize drawing, by the conversion of E language database, get, first create an EDB database, then the not repeating random number generating (is comprised to the front variable code of random number according to the corresponding field that adds certain variable or increase by the form of database above, newspaper ID code, date format, newspaper price), deposit in an EDB database on the same day, then become XLS form by E E Language DB format conversion.Wherein, corresponding field, for some variable parameters that user arranges, comprises the variable code before random number, newspaper ID code, and on the date, newspaper price, forms specific form after adding these variablees, for the use of prize drawing platform.
The setting of above-mentioned parameter realizes by a user interface, and this user interface comprises:
One random number figure place input block, in order to set the figure place of random number, such as: 6, the scope of this figure place is 1-15 position, for convenience's sake, default value can be made as to 6.One random number range input block, in order to set the big or small boundary of random number, such as: minimum number is 1, maximum number is 600,000.One random number quantity input block, in order to set the number of random number, such as: 300,000, in this number, be limited to 1,000,000.
One filename input block, in order to set the title of output file, such as the title of the newspaper of required printing.
One time input block, in order to set a time parameter and to be saved in this output file, such as having date information, for convenience's sake, this information can directly be transferred from system clock.
For two output files, can only input a title, and automatically before or after this title, add and differentiate character by program.Such as: when input name is called " X report ", the first output file can improve automatically as " X report "+" date "+" printing equipment is used "; The second output file can improve automatically as " X report "+" date "+" inquiry is used ".
Compared with prior art, the variable printed random digit generation method of newspaper of the present invention, its usefulness comprises:
1. by E language, directly write line of text order, do not need again large batch of data to carry out batch line feed, can generate fast the random number of required quantity, such as: produce 300,000 not repeating data approximately need 8-10 minute, compared with prior art about 50 minutes, a lot of fast.Thereby, meet quickly and easily the variable printed needs of newspaper.
2. can, according to user's requirement, corresponding parameter be set.As: the front variable code of random number is set; Newspaper price is set, newspaper ID code is set, data storage disk symbol and path etc. are set, user can arrange relevant parameter as required; The random number generating is unique, can not repeat, and output file meets the call format of the variable printed data source of journalism.
Foregoing; it is only preferred embodiment of the present invention; not for limiting embodiment of the present invention; those of ordinary skills are according to main design of the present invention and spirit; can carry out very easily corresponding flexible or modification, therefore protection scope of the present invention should be as the criterion with the desired protection domain of claims.
Claims (5)
1. a generation method for the variable printed random number of newspaper, is characterized in that, comprises the following steps:
A. parameters: in order to set the figure place of random number, big or small boundary and number;
B. with the random number order of getting of E language, generate a new random number;
C. the condition that judges whether random number that b step generates meets that big or small boundary requires simultaneously and do not repeat mutually with the random number having generated before, as be yes, store random number continuation that b step generates, otherwise return to step b;
D. whether the number that judges current random number of having stored meets the condition of the number of setting, as is yes, encapsulation of data produce output file, otherwise return to step b.
2. the generation method of the variable printed random number of newspaper according to claim 1, is characterized in that, step a comprises provides a user interface, and this user interface comprises:
Random number figure place input block, in order to set the figure place of random number;
Random number range input block, in order to set the big or small boundary of random number;
Random number quantity input block, in order to set the number of random number.
3. the generation method of the variable printed random number of newspaper according to claim 2, is characterized in that, user interface also comprises filename input block, in order to set the title of this at least one output file.
4. according to the generation method of the variable printed random number of newspaper described in arbitrary claim in claims 1 to 3, it is characterized in that, in steps d, to produce two output files, wherein, the first output file is preserved the information for the variable printed equipment of a newspaper, includes the random number of setting number; The second output file is preserved Referral information, includes the random number of described setting number, and the sequence number of corresponding each random number.
5. the generation method of the variable printed random number of newspaper according to claim 4, is characterized in that, the generation of the second output file data gets by the conversion of E language database; first create an EDB database, then add the random number of described setting number and the corresponding field increasing by the form of database; Wherein, comprise the front variable code of random number, newspaper ID code, date format and newspaper price, deposit in an EDB database on the same day, then the EDB format conversion of E language is become to XLS form.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310418745.5A CN104049935A (en) | 2013-09-13 | 2013-09-13 | Method for generating variable printing random numbers of newspapers |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310418745.5A CN104049935A (en) | 2013-09-13 | 2013-09-13 | Method for generating variable printing random numbers of newspapers |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104049935A true CN104049935A (en) | 2014-09-17 |
Family
ID=51502862
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310418745.5A Pending CN104049935A (en) | 2013-09-13 | 2013-09-13 | Method for generating variable printing random numbers of newspapers |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104049935A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106470108A (en) * | 2015-08-20 | 2017-03-01 | 阿里巴巴集团控股有限公司 | A kind of method and device of the password generating object event |
CN107729713A (en) * | 2017-10-24 | 2018-02-23 | 广州视睿电子科技有限公司 | Sample processing method, device and equipment, readable storage medium storing program for executing |
-
2013
- 2013-09-13 CN CN201310418745.5A patent/CN104049935A/en active Pending
Non-Patent Citations (2)
Title |
---|
李连弟.: "JAVA语言随机数的产生及其应用", 《浙江工贸职业技术学院学报》 * |
王霞俊.: "Java中随机数的生成、分析及其应用", 《福建电脑》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106470108A (en) * | 2015-08-20 | 2017-03-01 | 阿里巴巴集团控股有限公司 | A kind of method and device of the password generating object event |
CN106470108B (en) * | 2015-08-20 | 2020-02-14 | 阿里巴巴集团控股有限公司 | Method and device for generating password of target event |
CN107729713A (en) * | 2017-10-24 | 2018-02-23 | 广州视睿电子科技有限公司 | Sample processing method, device and equipment, readable storage medium storing program for executing |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Williams | Non-Designer's Type Book, The (Non-Designer's) | |
CN105183475A (en) | Method and system for customizing individuality pages of portal website by user himself | |
CN106021394A (en) | Website construction method and apparatus | |
CN103593456B (en) | Worksheet self-defining method for designing and device | |
CN105607880A (en) | Printing method and device for examined and approved documents | |
CN108959230B (en) | Method and device for generating report template | |
CN101631398A (en) | Mobile terminal electronic-book management system and mobile terminal electronic-book management method | |
CN108197085A (en) | A kind of submission reviewing method and device | |
CN104112004A (en) | Method for intelligently copying data on user interface | |
CN107678872A (en) | The processing method and processing device of electronic whiteboard | |
CN107357773A (en) | A kind of generation method and system of PDF electronic invoices | |
CN106970913A (en) | The extracting method and device of a kind of time | |
CN104049935A (en) | Method for generating variable printing random numbers of newspapers | |
CN104615422A (en) | Procedure customizing method for application software interface | |
CN112799655A (en) | Multi-type code automatic generation method, device and medium based on pre-training | |
CN107844950A (en) | A kind of calendar event creation method, apparatus, computer installation and storage medium | |
CN116488986A (en) | Event-driven message touch method, system and device and storage medium | |
US20140214701A1 (en) | System and method for providing legal citations | |
GB2458692A (en) | A process for generating database-backed, web-based documents | |
CN108766513A (en) | A kind of wisdom health medical treatment data structured processing system | |
CN111143450B (en) | Method and device for importing data | |
CN111563065B (en) | Document storage method and device and computer readable storage medium | |
CN103593473A (en) | Form displaying method and system | |
CN102708206A (en) | Data format description method | |
CN100498765C (en) | Method and device for making electric newspaper printing plate |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20140917 |
|
RJ01 | Rejection of invention patent application after publication |