CN110286879A - A kind of processing method of random number - Google Patents

A kind of processing method of random number Download PDF

Info

Publication number
CN110286879A
CN110286879A CN201910574677.9A CN201910574677A CN110286879A CN 110286879 A CN110286879 A CN 110286879A CN 201910574677 A CN201910574677 A CN 201910574677A CN 110286879 A CN110286879 A CN 110286879A
Authority
CN
China
Prior art keywords
random number
micro
control unit
sequence
main control
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
Application number
CN201910574677.9A
Other languages
Chinese (zh)
Inventor
倪欢
王武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen City Chi Micro Smart Technology Development Co Ltd
Shenzhen JWIPC Technology Development Co Ltd
Original Assignee
Shenzhen City Chi Micro Smart Technology Development Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen City Chi Micro Smart Technology Development Co Ltd filed Critical Shenzhen City Chi Micro Smart Technology Development Co Ltd
Priority to CN201910574677.9A priority Critical patent/CN110286879A/en
Publication of CN110286879A publication Critical patent/CN110286879A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention is applicable in random number preconditioning technique field, provide a kind of processing method of random number, this method comprises: adding micro-control unit on mainboard, micro-control unit obtains the random number of randomizer generation in real time, and is pre-processed to random number and directly read use for main control chip;Present invention employs the privately owned communication protocol of micro-control unit anolog random number generator and carry out standard interface conversion, corresponding algorithm process is carried out to the random number read in the inside of micro-control unit simultaneously, main control chip use is available to after can pre-processing according to actual needs using different algorithm or data processing method to data, the resource of main control chip is greatly saved, it avoids having saved cost using programmable logic device simultaneously, and the firmware that can need to update micro-control unit according to client at any time realizes the pretreatment to data, cost is saved;It realizes the resource for saving main control chip, improves user experience to the greatest extent.

Description

A kind of processing method of random number
Technical field
The invention belongs to random number preconditioning technique field more particularly to a kind of processing methods of random number.
Background technique
Existing randomizer uses privately owned communication protocol mostly, so this chip is applied to SOC (master control core Piece) hardware interface of the SOC with this agreement is just needed above, but major part SOC is the hardware for not supporting this proprietary protocol Interface makes in this way so just needing to communicate to realize and be converted to standard interface with SOC by CPLD (programmable logic device) Cost is uncontrollable, and design complexities are got higher;It is all simultaneously using at SOC when carrying out pretreated to random number Reason largely occupies the process resource of SOC in this way, reduces SOC efficiency, cannot be main performance on core data is handled Face, such method lose more than gain, and bad usage experience can be brought due to SOC performance loss, if there is a large amount of random Number is especially prominent if obtaining, it is understood that SOC is since dominant frequency is high, so needing as far as possible to be detached from some data processings SOC makes SOC by resource on core data is handled.
Summary of the invention
The purpose of the present invention is to provide a kind of processing methods of random number, it is intended to solve not providing due to the prior art A method of it effectively can reduce the resource utilization of main control chip, and reduces and occur with the stochastic source of privately owned communication protocol The cost that device is communicated causes user experience bad and problem at high cost.
The present invention provides a kind of processing methods of random number, and the method includes the following steps:
Micro-control unit is set, and micro-control unit is connect with main control chip and randomizer respectively, microcontroller list Member obtains the random number that the randomizer occurs in real time, and carries out pretreatment to the random number and supply the main control chip Directly read use.
Preferably, the random number is divided into multiple groups, exclusive or is carried out to the random number in described group and generates the first sequence Column.
Preferably, it detects whether the random number in the First ray has randomness, has randomness then to described the One sequence carries out displacement and generates the second sequence, and carries out exclusive or to second sequence and obtain processing result to the end;It is on the contrary then pick up It takes the original random number progress sequence in the First ray to upset and supplement random number and forms third sequence.
Preferably, whether the random number detected in the third sequence has randomness, has randomness then by described the Multiple random numbers in three sequences are inserted into respectively in multiple described groups, on the contrary then delete the third sequence.
Preferably, the micro-control unit is connected with the main control chip by I2C bus or SPI interface.
Preferably, the micro-control unit by the communication protocol of randomizer described in I/O port analog with it is described Randomizer connection is communicated.
The present invention adds micro-control unit on mainboard, and micro-control unit obtains the random of randomizer generation in real time Number, and random number is pre-processed and directly reads use for main control chip;Present invention employs micro-control unit simulation is random The privately owned communication protocol of number generator and carry out standard interface conversion, at the same the inside of micro-control unit to read with Machine number carries out corresponding algorithm process, can according to actual needs using different algorithm or data processing method to data into It is available to main control chip use after row pretreatment, the resource of main control chip is greatly saved, is saved in embedded device The resource of main control chip can improve user experience well, while avoid having saved cost using programmable logic device, And it due to can flexibly pre-process random number using algorithm, can be needed to update micro-control unit at any time according to client Firmware realize pretreatment to data, saved cost, while function modoularization can be made, weight do not had to for hardware design Multiple design, can add according to actual needs or customizing functions can be completed in removing module;Realization saves main control chip Resource improves user experience to the greatest extent.
Detailed description of the invention
Fig. 1 is the implementation flow chart of the processing method of random number provided in an embodiment of the present invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
Specific implementation of the invention is described in detail below in conjunction with specific embodiment:
Fig. 1 shows the implementation process of the processing method of random number provided in an embodiment of the present invention, for ease of description, only Part related to the embodiment of the present invention is shown, details are as follows:
In step s101, be arranged micro-control unit, micro-control unit respectively with main control chip and randomizer Connection, micro-control unit obtain the random number of randomizer generation in real time, and are pre-processed random number for master control core Piece directly reads use.
In an embodiment of the present invention, using micro-control unit to replace programmable logic device, to reduce cost, and make Stochastic source pretreatment is carried out with micro-control unit, the resource utilization of main control chip is reduced, main control chip is enable more to enrich Processing core data, improve user experience.
In step s 102, random number is divided into multiple groups, exclusive or is carried out to the random number in group and generates First ray.
In an embodiment of the present invention: random number is divided into multiple groups by micro-control unit, and is carried out to the random number in group different Or generate First ray.
In step s 103, whether the random number detected in First ray has randomness, has randomness then to first Sequence carries out displacement and generates the second sequence, and carries out exclusive or to the second sequence and obtain processing result to the end;It is on the contrary then pick up first Original random number progress sequence in sequence, which is upset and supplements random number, forms third sequence.
In an embodiment of the present invention;When detecting that the random number in First ray does not have randomness, the first sequence is picked up Original random number progress sequence in column, which is upset and supplements random number, forms third sequence, to improve the randomness of random number, and The further detection processing in step S104, to further increase the randomness of random number.
In step S104, whether the random number detected in third sequence has randomness, has randomness then by third Multiple random numbers in sequence are inserted into respectively in multiple groups, on the contrary then delete third sequence.
In an embodiment of the present invention: micro-control unit is connect by I2C bus or SPI interface with main control chip;Micro-control Unit processed is connect with randomizer by the communication protocol of I/O port analog randomizer and is communicated;To replace Programmable logic device reduces costs.
The present invention adds micro-control unit on mainboard, and micro-control unit obtains the random of randomizer generation in real time Number, and random number is pre-processed and directly reads use for main control chip;Present invention employs micro-control unit simulation is random The privately owned communication protocol of number generator and carry out standard interface conversion, at the same the inside of micro-control unit to read with Machine number carries out corresponding algorithm process, can according to actual needs using different algorithm or data processing method to data into It is available to main control chip use after row pretreatment, the resource of main control chip is greatly saved, is saved in embedded device The resource of main control chip can improve user experience well, while avoid having saved cost using programmable logic device, And it due to can flexibly pre-process random number using algorithm, can be needed to update micro-control unit at any time according to client Firmware realize pretreatment to data, saved cost, while function modoularization can be made, weight do not had to for hardware design Multiple design, can add according to actual needs or customizing functions can be completed in removing module;Realization saves main control chip Resource improves user experience to the greatest extent.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.

Claims (6)

1. a kind of processing method of random number, which is characterized in that the method includes the following steps:
Micro-control unit is set, and micro-control unit is connect with main control chip and randomizer respectively, and micro-control unit is real When obtain the random number that the randomizer occurs, and it is direct for the main control chip to carry out pretreatment to the random number It reads and uses.
2. the method as described in claim 1, which is characterized in that the method also includes:
The random number is divided into multiple groups, exclusive or is carried out to the random number in described group and generates First ray.
3. the method as described in claim 1, which is characterized in that the method also includes:
It detects whether the random number in the First ray has randomness, there is randomness then to move to the First ray Position generates the second sequence, and carries out exclusive or to second sequence and obtain processing result to the end;It is on the contrary then pick up first sequence Original random number progress sequence in column, which is upset and supplements random number, forms third sequence.
4. the method as described in claim 1, which is characterized in that the method also includes:
Whether the random number detected in the third sequence has randomness, has randomness then will be more in the third sequence A random number is inserted into respectively in multiple described groups, on the contrary then delete the third sequence.
5. the method as described in claim 1, which is characterized in that the method also includes:
The micro-control unit is connected with the main control chip by I2C bus or SPI interface.
6. the method as described in claim 1, which is characterized in that the method also includes:
Communication protocol and the randomizer of the micro-control unit by randomizer described in I/O port analog Connection is communicated.
CN201910574677.9A 2019-06-28 2019-06-28 A kind of processing method of random number Pending CN110286879A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910574677.9A CN110286879A (en) 2019-06-28 2019-06-28 A kind of processing method of random number

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910574677.9A CN110286879A (en) 2019-06-28 2019-06-28 A kind of processing method of random number

Publications (1)

Publication Number Publication Date
CN110286879A true CN110286879A (en) 2019-09-27

Family

ID=68019527

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910574677.9A Pending CN110286879A (en) 2019-06-28 2019-06-28 A kind of processing method of random number

Country Status (1)

Country Link
CN (1) CN110286879A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105159653A (en) * 2015-08-18 2015-12-16 珠海市一微半导体有限公司 Random number post-processing circuit and method
CN107508679A (en) * 2017-07-11 2017-12-22 深圳市中易通安全芯科技有限公司 A kind of binding and the authentication method of intelligent terminal main control chip and encryption chip
CN109344664A (en) * 2018-08-21 2019-02-15 西安得安信息技术有限公司 A kind of cipher card and its encryption method that based on FPGA data are carried out with algorithm process
CN109407578A (en) * 2018-10-15 2019-03-01 杭州和利时自动化有限公司 A kind of data processing method of Profibus-DP bus control unit

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105159653A (en) * 2015-08-18 2015-12-16 珠海市一微半导体有限公司 Random number post-processing circuit and method
CN107508679A (en) * 2017-07-11 2017-12-22 深圳市中易通安全芯科技有限公司 A kind of binding and the authentication method of intelligent terminal main control chip and encryption chip
CN109344664A (en) * 2018-08-21 2019-02-15 西安得安信息技术有限公司 A kind of cipher card and its encryption method that based on FPGA data are carried out with algorithm process
CN109407578A (en) * 2018-10-15 2019-03-01 杭州和利时自动化有限公司 A kind of data processing method of Profibus-DP bus control unit

Similar Documents

Publication Publication Date Title
CN108376142A (en) A kind of distributed memory database method of data synchronization and system
CN104281520A (en) Tracking and debugging method, device and system
CN108984354A (en) A kind of server chips debug circuit, adjustment method and server
CN205750382U (en) A kind of novel complex communication bus circuit
CN105897537B (en) A kind of method and system of battery management system configuration vehicle communication protocol
CN109917891A (en) A kind of PCIE accelerates network interface card power supply circuit and its design method
US20230221764A1 (en) Modular embedded compute appliance docking board, and methods and systems for the same
CN109660391A (en) A kind of pond server system firmware upgrade method, system and relevant apparatus
CN110286879A (en) A kind of processing method of random number
CN102880497B (en) Complier and method for reusing and optimizing software management memory
CN111208985B (en) Data processing method, system and storage medium based on producer consumer model
CN211293972U (en) Encryption card
CN110740085B (en) Communication method, communication device and terminal based on parallel operation system
CN112615739B (en) Method and system for adapting OCP3.0 network card in multi-host application environment
CN114157410B (en) Lightweight 5G hard encryption communication module for power terminal
US9239720B2 (en) Device and method for generating application model based on layered structure
CN105302557A (en) Thread establishing and processing method and apparatus
CN110389751B (en) Data interface mock method applied to knowledge graph
CN104506651A (en) Virtual application service management method and system thereof
CN104407920A (en) Data processing method and system based on inter-process communication
CN110222014B (en) Maintenance method of bus map of distributed file system and related components
CN103281326A (en) Cluster system password-free accessing configuration method based on same secret key file
CN113407472A (en) Embedded device and program parallel downloading method thereof
CN107273164A (en) A kind of method for realizing Auto-matching scene optimization strategy when linux system performance optimizes
CN103927153B (en) A kind of method of system configuration, equipment and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190927