Burning method and device of user identification code, storage medium and upper computer

文档序号:85729 发布日期:2021-10-08 浏览:34次 中文

阅读说明:本技术 用户识别码的烧录方法、装置、存储介质及上位机 (Burning method and device of user identification code, storage medium and upper computer ) 是由 许锦海 唐振中 郑思 于 2021-07-14 设计创作,主要内容包括:本申请实施例公开了一种用户识别码的烧录方法、装置、存储介质及上位机。通过显示单元显示烧录页面;其中,烧录页面设置有用户识别码输入框、编辑控制控件、密钥文件选择控件和存储路径显示区;获取用户在用户识别码输入框中输入的用户识别码;使用预设的加密算法生成用户识别码对应的密钥文件,以及在指定存储位置存储密钥文件;接收到针对编辑控制控件的锁定指令时,将用户识别码输入框设置为锁定状态;接收针对密钥文件选择控件的选择指令,从指定存储位置中选择密钥文件;对密钥文件和用户识别码进行校验;校验通过后,将用户识别码和密钥文件烧录至烧录板,本申请可以避免因为人工切换烧录代码失误,导致大批量模块代码烧录错误的问题。(The embodiment of the application discloses a method and a device for burning a user identification code, a storage medium and an upper computer. Displaying the burning page through a display unit; the burning page is provided with a user identification code input frame, an editing control, a key file selection control and a storage path display area; acquiring a user identification code input by a user in a user identification code input box; generating a key file corresponding to the user identification code by using a preset encryption algorithm, and storing the key file in a specified storage position; when a locking instruction for the editing control is received, setting the user identification code input box to be in a locking state; receiving a selection instruction aiming at the key file selection control, and selecting the key file from a specified storage position; verifying the key file and the user identification code; after the verification is passed, the user identification code and the key file are burned to the burning board, and the problem of burning errors of mass module codes caused by errors of manual switching of burning codes can be avoided.)

1. A method for burning a user identification code is characterized by comprising the following steps:

displaying the burning page through a display unit; the burning page is provided with a user identification code input frame, an editing control, a key file selection control and a storage path display area;

acquiring a user identification code input by a user in the user identification code input box;

generating a key file corresponding to the user identification code by using a preset encryption algorithm, and storing the key file in a specified storage position;

when a locking instruction for the editing control is received, setting the user identification code input box to be in a locking state;

receiving a selection instruction for the key file selection control, selecting the key file from the specified storage location;

verifying the key file and the user identification code;

and after the verification is passed, burning the user identification code and the key file to a burning board.

2. The method of claim 1, wherein the burning interface further comprises a serial parameter configuration area;

the method further comprises the following steps:

configuring serial port parameters based on a configuration instruction aiming at the serial port parameter configuration area; wherein, the serial port parameter includes: one or more of a port number, a baud rate, a data bit, a stop bit, and a check bit.

3. The method of claim 1 or 2, further comprising:

counting the burning success times and the burning failure times of the burning board, and displaying the burning success times and the burning failure times on a burning page.

4. The method of claim 3, wherein the verifying the key file and the user identification code comprises:

carrying out integrity check on the key file and the user identification code through a cyclic redundancy check algorithm;

after the verification is passed, sending the key file and the user identification code to the burning board;

receiving a key file and a user identification code returned by the burning board;

when the transmitted key file and the subscriber identity code are the same as the received key file and the subscriber identity code, the transmission line is normal.

5. The method of claim 1, 2 or 4, further comprising:

receiving a burning mode selection instruction from the burning board;

and determining the currently used burning mode according to the burning mode selection instruction.

6. The method of claim 5, wherein the symmetric encryption algorithm encrypts the user identifier to obtain the key file.

7. The method of claim 6, further comprising:

acquiring a burning result;

if the burning result indicates that burning is successful, displaying a burning success prompt message on the burning page; or

And if the burning result indicates that the burning fails, displaying a burning failure prompt message on the burning page.

8. A burning device of user identification codes is characterized by comprising:

the display unit is used for displaying the burning page; the burning page is provided with a user identification code input frame, an editing control, a key file selection control and a storage path display area;

an acquisition unit configured to acquire a user identification code input by a user in the user identification code input box;

the encryption unit is used for generating a key file corresponding to the user identification code by using a preset encryption algorithm and storing the key file in a specified storage position;

the locking unit is used for setting the user identification code input box into a locking state when receiving a locking instruction aiming at the editing control;

the selecting unit is used for receiving a selection instruction aiming at the key file selection control and selecting the key file from the specified storage position;

the verification unit is used for verifying the key file and the user identification code;

and the burning unit is used for burning the user identification code and the key file to a burning board after the verification is passed.

9. A computer storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to carry out the method steps according to any one of claims 1 to 7.

10. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1 to 7.

Technical Field

The present application relates to the field of testing, and in particular, to a method and an apparatus for burning a user identification code, a storage medium, and an upper computer.

Background

In order to protect intellectual property of a chip, a user identification code (Customer ID) is generally allocated to the chip, a chip manufacturer distributes the user identification code to a Customer when the chip manufacturer leaves a factory, then encrypts the user identification code and burns the encrypted user identification code into the chip, and a user may burn wrong codes into the chip in the process of burning the user identification code, so that a rework phenomenon is caused, and how to improve the success rate of burning the user identification code is an urgent problem to be solved at present.

Disclosure of Invention

The embodiment of the application provides a method and a device for burning a user identification code, a storage medium and an upper computer, and can solve the problems that errors are easy to occur and the efficiency is low in burning the user identification code in the related technology. The technical scheme is as follows:

in a first aspect, an embodiment of the present application provides a method for burning a user identifier, where the method includes:

displaying the burning page through a display unit; the burning page is provided with a user identification code input frame, an editing control, a key file selection control and a storage path display area;

acquiring a user identification code input by a user in the user identification code input box;

generating a key file corresponding to the user identification code by using a preset encryption algorithm, and storing the key file in a specified storage position;

when a locking instruction for the editing control is received, setting the user identification code input box to be in a locking state;

receiving a selection instruction for the key file selection control, selecting the key file from the specified storage location;

verifying the key file and the user identification code;

and after the verification is passed, burning the user identification code and the key file to a burning board.

In a second aspect, an embodiment of the present application provides a device for burning a user identifier, including:

the display unit is used for displaying the burning page; the burning page is provided with a user identification code input frame, an editing control, a key file selection control and a storage path display area;

an acquisition unit configured to acquire a user identification code input by a user in the user identification code input box;

the encryption unit is used for generating a key file corresponding to the user identification code by using a preset encryption algorithm and storing the key file in a specified storage position;

the locking unit is used for setting the user identification code input box into a locking state when receiving a locking instruction aiming at the editing control;

the selecting unit is used for receiving a selection instruction aiming at the key file selection control and selecting the key file from the specified storage position;

the verification unit is used for verifying the key file and the user identification code;

and the burning unit is used for burning the user identification code and the key file to a burning board after the verification is passed.

In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.

In a fourth aspect, an embodiment of the present application provides an upper computer, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.

The beneficial effects brought by the technical scheme provided by some embodiments of the application at least comprise:

the method includes the steps that a user identification code is input through a burning interface, a key file generated by selecting the user identification code is selected, the user identification code is locked after being edited, subsequent errors are prevented from being modified, then the user identification code and the key file are verified, and after the user identification code and the key file are verified, the user identification code and the key file are burnt into a storage unit of a burning board.

Drawings

In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.

Fig. 1 is a network structure diagram provided in an embodiment of the present application;

fig. 2 is a schematic flowchart illustrating a method for burning a user identifier according to an embodiment of the present disclosure;

fig. 3A to fig. 3E are schematic diagrams of burned pages provided in the embodiment of the present application;

fig. 4 is a schematic structural diagram of a method for burning a user identifier according to an embodiment of the present disclosure;

fig. 5 is a schematic structural diagram of an upper computer provided in an embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.

When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.

In the description of the present application, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art. Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.

Referring to fig. 1, a network architecture diagram provided for an embodiment of the present application includes: host computer 11 and burn board 12, the quantity of burning board 12 can be a plurality of, and host computer 11 can carry out manual burning or automatic burning to a plurality of burning boards simultaneously in batches.

Wherein, host computer 11 of this application has display device, includes but not limited to: desktop, laptop, tablet, or cell phone, etc.; burn board 12 has one or more microcontrollers that include read only memory for storing application program code. The communication mode between the upper computer 11 and the burning board 12 may be a wired communication mode (for example, a serial communication mode), and the wired communication mode includes, but is not limited to, a USB cable, a URAT cable, a network cable, a coaxial cable, or other cables.

Referring to fig. 2, a schematic flow chart of a method for burning a subscriber identity code according to an embodiment of the present application is shown based on the network architecture of fig. 1. As shown in fig. 2, the method of the embodiment of the present application may include the steps of:

s201, displaying the burning page through a display unit.

When the burning board needs to be burned, the upper computer displays a burning page through the display unit, and the burning page is a graphical interface for interaction between a user and the upper computer. The burning page is provided with a user identification code input frame, an editing control, a key file selection control and a storage path display area, wherein the user identification code is input by a user in the user identification code input frame, the editing control is used for locking or unlocking characters input in the user identification code, the key file selection control is used for selecting a key file, and the storage path display area is used for displaying a storage path of the selected key file.

S202, acquiring the user identification code input by the user in the user identification code input box.

Wherein, when the user identification code input box belongs to the unblock state, the host computer obtains the user identification code that the user input in the user identification code input box through input device, and input device includes: a keyboard, a mouse, or a touch screen, etc. When the manufacturer provides the generated chip to the customer, a unique user identification code is allocated to the customer so as to distinguish different customers.

S203, generating a key file corresponding to the user identification code by using a preset encryption algorithm, and storing the key file in a specified storage position.

The encryption algorithm may be a symmetric decryption algorithm, for example: DES algorithm, 3DES algorithm, TDEA algorithm, Blowfish algorithm, etc., and the encryption algorithm may also be an asymmetric encryption algorithm, such as: RSA algorithm, Elgamal algorithm, knapsack algorithm or Rabin algorithm, etc. The upper computer encrypts the user identification code by using an encryption algorithm to obtain a key file, and stores the key file in a specified storage position.

And S204, when a locking instruction for the editing control is received, setting the user identification code input box to be in a locking state.

The locking instruction is generated by the user executing a triggering operation on the editing control, the type of the triggering operation can be mouse operation, keyboard operation or touch operation, and the like, the user identification code input box cannot be edited in a locking state, so that characters in the user identification code input box can be prevented from being modified, and the subsequent user identification code with a wrong burning can be prevented.

S205, when a selection instruction for the key file selection control is received, selecting the key file from the designated storage position, and displaying the storage path of the key file in the storage path display area.

When a user executes a trigger operation on the key file selection control through the input device, the input device generates a selection instruction and sends the selection instruction to the processor of the upper computer, the processor of the upper computer responds to the selection instruction and displays the structure diagrams of all storage paths, the user selects a key file in a certain storage path, and then the storage path of the selected key file is displayed in the county and city areas of the storage paths.

For example, referring to the burn page shown in fig. 3A, in the box, a user identifier input box, an edit control, a key file selection control, and a storage path display area are set on the burn page, and the user identifier input box is set with a comment text "input Customer _ ID: 0x ", the user identification code is a 16-system character starting at 0x, and the memory path display area is provided with the comment text" please select the key file ". The editing control and the key file selection control are one button, a user clicks the button corresponding to the editing control, locked or unlocked characters are displayed on the button, and when the button displays locking, the user identification code input box is in an unlocked state and can freely input the characters; when the button is unlocked, the user identification code input box is in a locked state, and the input of characters is forbidden. When a user clicks a button of the key file selection control, a structure chart of each storage path on the upper computer is displayed, the user selects a key file in one storage path, and then the storage path of the selected key file is displayed in the storage path display area.

S206, verifying the key file and the user identification code.

The verification comprises integrity verification and verification of a transmission line between the upper computer and the burning board.

In one or more possible embodiments, verifying the key file and the user identification code includes:

carrying out integrity check on the key file and the user identification code through a cyclic redundancy check algorithm;

after the verification is passed, sending the key file and the user identification code to the burning board; the burning board sends the received key file and the user identification code to an upper computer;

receiving a key file and a user identification code returned by the burning board;

when the transmitted key file and the subscriber identity code are the same as the received key file and the subscriber identity code, the transmission line is normal.

And S207, after the verification is passed, burning the user identification code and the key file to a burning board.

The upper computer can determine the currently used burning mode according to a burning mode selection instruction sent by the burning board. The upper computer sends a burning command to the burning board through the serial port in the manual mode, the burning process is started, the content in the storage medium of the burning board can be verified after burning is finished, and the burning result is sent to the sorting machine after verification is passed, so that manual burning action is finished; when automatic burning is carried out, the sorting machine replaces a serial port to send a burning command and starts a burning process.

For example, referring to fig. 3C, a recording interface is provided with a recording control, and when the upper computer detects a recording command triggered on the recording control, it checks whether the user identifier and the key file are matched, and if not, an error prompt window as shown in fig. 3C is displayed.

Further, as shown in fig. 3D and 3E, the upper computer detects the burning result after the burning is completed, if the burning is successful, a burning success prompt message is displayed, and if the burning is failed, a burning failure prompt message is displayed, and the burning success prompt message and the burning failure prompt message can be distinguished by different colors.

Further, referring to fig. 3D and 3E, the upper computer counts the number of successful burning times and the number of failed burning times of the burning board, and displays the number of successful burning times and the number of failed burning times on the burning page.

In one or more possible embodiments, the upper computer and the burning board communicate with each other through a serial port, and the burning interface further comprises a serial port parameter configuration area; before executing burning, configuring serial port parameters by the upper computer based on a configuration instruction aiming at the serial port parameter configuration area; wherein, the serial port parameter includes: one or more of a port number, a baud rate, a data bit, a stop bit, and a check bit.

For example, referring to the burning page shown in fig. 3B, an area in a frame of the burning page is a serial port parameter configuration area, the serial port parameter configuration area includes input frames of each serial port parameter, a user can input a parameter value of the serial port parameter in each input frame through an input device, the serial port parameter configuration area is further provided with a refresh list control and a serial port switch control, after the input of the parameter value is completed, the user can complete the update of the parameter value through the refresh list control, and when communication is needed between the upper computer and the burning board, a serial port is opened through the serial port switch control; and when the communication is not needed, the serial port is closed through the serial port switch control.

The beneficial effect of this application includes: the method includes the steps that a user identification code is input through a burning interface, a key file generated by selecting the user identification code is selected, the user identification code is locked after being edited, subsequent errors are prevented from being modified, then the user identification code and the key file are verified, and after the user identification code and the key file are verified, the user identification code and the key file are burnt into a storage unit of a burning board.

The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.

Please refer to fig. 4, which illustrates a schematic structural diagram of a method for burning a user identifier according to an exemplary embodiment of the present application. The burning method of the user identification code can be realized into all or part of the upper computer through software, hardware or the combination of the software and the hardware. The device 4 comprises: display unit 401, acquisition unit 402, encryption unit 403, locking unit 404, selection unit 405, verification unit 406 and burning unit 407.

A display unit 401, configured to display a burning page; the burning page is provided with a user identification code input frame, an editing control, a key file selection control and a storage path display area;

an obtaining unit 402, configured to obtain a user identification code input by a user in the user identification code input box;

an encryption unit 403, configured to generate a key file corresponding to the user identifier using a preset encryption algorithm, and store the key file in a specified storage location;

a locking unit 404, configured to set the user identification code input box to a locked state when a locking instruction for the editing control is received;

a selecting unit 405, configured to receive a selection instruction for the key file selection control, and select the key file from the specified storage location;

a verification unit 406, configured to verify the key file and the user identifier;

and the burning unit 407 is configured to burn the user identifier and the key file into the burning board after the verification is passed.

In one or more embodiments, the burning interface further includes a serial port parameter configuration area;

the method further comprises the following steps:

the configuration unit is used for configuring the serial port parameters based on the configuration instruction aiming at the serial port parameter configuration area; wherein, the serial port parameter includes: one or more of a port number, a baud rate, a data bit, a stop bit, and a check bit.

In one or more embodiments, further comprising:

and the counting unit is used for counting the burning success times and the burning failure times of the burning board and displaying the burning success times and the burning failure times on a burning page.

In one or more embodiments, the verifying the key file and the user identification code includes:

carrying out integrity check on the key file and the user identification code through a cyclic redundancy check algorithm;

after the verification is passed, sending the key file and the user identification code to the burning board;

receiving a key file and a user identification code returned by the burning board;

when the transmitted key file and the subscriber identity code are the same as the received key file and the subscriber identity code, the transmission line is normal.

In one or more embodiments, further comprising:

the mode determining unit is used for receiving a burning mode selection instruction from the burning board;

and determining the currently used burning mode according to the burning mode selection instruction.

In one or more embodiments, the symmetric encryption algorithm encrypts the user identifier to obtain the key file.

In one or more embodiments, further comprising:

the prompting unit is used for acquiring a burning result;

if the burning result indicates that burning is successful, displaying a burning success prompt message on the burning page; or

And if the burning result indicates that the burning fails, displaying a burning failure prompt message on the burning page.

It should be noted that, when the burning apparatus for a user identifier provided in the foregoing embodiment executes the burning method for a user identifier, only the division of the functional modules is taken as an example, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the method for burning the user identification code provided by the above embodiment and the embodiment of the method for burning the user identification code belong to the same concept, and the implementation process is detailed in the embodiment of the method, which is not described herein again.

The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.

An embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, where the instructions are suitable for being loaded by a processor and executing the method steps in the embodiment shown in fig. 2, and a specific execution process may refer to a specific description of the embodiment shown in fig. 2, which is not described herein again.

Fig. 5 is a schematic structural diagram of an apparatus according to an embodiment of the present disclosure. As shown in fig. 5, the apparatus 1000 may be the upper computer 11 in fig. 1, and the apparatus 1000 may include: at least one processor 1001, at least one network interface 1004, a user interface 1003, memory 1005, at least one communication bus 1002.

Wherein a communication bus 1002 is used to enable connective communication between these components.

The user interface 1003 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.

The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.

Processor 1001 may include one or more processing cores, among other things. The processor 1001, which is connected to various parts throughout the apparatus 1000 using various interfaces and lines, performs various functions of the apparatus 1000 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1005, and calling data stored in the memory 1005. Alternatively, the processor 1001 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable gate Array (FPGA), and Programmable Logic Array (PLA). The processor 1001 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 1001, but may be implemented by a single chip.

The Memory 1005 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable medium. The memory 1005 may be used to store an instruction, a program, code, a set of codes, or a set of instructions. The memory 1005 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 1005 may optionally be at least one memory device located remotely from the processor 1001. As shown in fig. 5, the memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an application program.

In the apparatus 1000 shown in fig. 5, the user interface 1003 is mainly used as an interface for providing input for a user, and acquiring data input by the user; and the processor 1001 may be configured to invoke an application program stored in the memory 1005 that configures an application program interface and to perform the following steps, as shown in fig. 2, in particular.

The concept of this embodiment is the same as that of the embodiment of the method in fig. 2, and the technical effects brought by the embodiment are also the same, and the specific process can refer to the description of the embodiment in fig. 2, and will not be described again here.

It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory or a random access memory.

The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:应用程序处理方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!