Power module test system, accessory identification method and device thereof and upper computer
By adopting encryption authentication and verification methods in the power module testing system, the problem of low recognition accuracy of RFID recognition technology in high electromagnetic wave environments is solved, and the reliability of the system and the accuracy of accessories recognition are improved.
Patent Information
- Application Number
- CN202411397511.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-02-28
AI Technical Summary
In the existing power module test systems, RFID recognition technology has weak anti-electromagnetic wave interference ability, resulting in low accuracy in accessory recognition, easy to be damaged by pirated accessories, and low system reliability.
Through communication between the upper computer and the lower computer host, authentication is performed based on the encrypted generated data, the accessory information of the lower computer slave is read and verified, and the test process is started if the verification is passed.
Improve the accuracy of accessories identification and system reliability, avoid identification failure caused by environmental interference, and prevent the use of illegal accessories to cause damage to the system.
Smart Images

Figure CN119537873A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power module testing, and in particular to a power module testing system and its accessory identification method, device and host computer. Background Art
[0002] The power module test system is used to test the power module, and generally includes a host computer and accessories (slave computer). In the field of power module testing, in order to prevent the use of pirated accessories to damage the power module test system, it is necessary to identify the accessories before testing.
[0003] At present, RFID technology is mostly used to identify accessories. Labels are attached to accessories, and the corresponding accessory information is written in the labels. The labels are identified by RFID readers. RFID technology achieves identification through contactless data communication. This identification technology has very weak ability to resist electromagnetic interference. The power module test system is often used for testing high voltage and high current, which will generate very large electromagnetic interference. This makes the application effect of RFID identification in the power module test system very poor, and there are often problems of failure to identify or missing identification of labels. In addition, there are multiple stations in the power module test system, and RFID relies on the area covered by the fan-shaped radio wave emission to identify. It is easy to identify the nearby stations and cause the identification of the stations in series, and it is impossible to accurately determine the accessories used in this station. Therefore, the current accuracy of accessory identification is low, which makes the power module test system easily damaged by pirated accessories and has low reliability. Summary of the invention
[0004] Based on this, it is necessary to provide a power module testing system and its accessory identification method, device and host computer that can improve the accuracy of accessory identification and thus improve system reliability in order to address the above technical problems.
[0005] A method for identifying accessories of a power module test system, used in a host computer of the power module test system, comprising:
[0006] Obtain the data to be encrypted;
[0007] Encrypting the data to be encrypted to obtain first encrypted data;
[0008] Sending an upper computer authentication instruction to a lower computer host communicating with the upper computer based on the data to be encrypted, and receiving second encrypted data returned by the lower computer host according to the upper computer authentication instruction;
[0009] Authenticating the lower host computer based on the first encrypted data and the second encrypted data;
[0010] When the authentication of the lower-machine host is passed, reading the accessory information of the lower-machine slave sent by the lower-machine host, the accessory information is fed back by the lower-machine slave authenticated and passed by the lower-machine host;
[0011] Verify the read accessory information and start the test process when the verification passes.
[0012] A component identification device for a power module test system, comprising:
[0013] A data acquisition module, used to acquire data to be encrypted;
[0014] A data encryption module, used for encrypting the data to be encrypted to obtain first encrypted data;
[0015] A data communication module, used for sending an upper computer authentication instruction to a lower computer host communicating with the upper computer based on the data to be encrypted, and receiving second encrypted data returned by the lower computer host according to the upper computer authentication instruction;
[0016] An authentication module, used for authenticating the lower host computer based on the first encrypted data and the second encrypted data;
[0017] An information reading module, used for reading accessory information of a lower-machine slave sent by the lower-machine master when the lower-machine master passes authentication, the accessory information being fed back by the lower-machine slave that has been authenticated and passed by the lower-machine master;
[0018] The information verification module is used to verify the read accessory information and start the test process when the verification passes.
[0019] A host computer includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the accessory identification method of the power module test system when executing the computer program.
[0020] A power module test system, comprising: a lower-machine host, a plurality of lower-machine slaves and the upper-machine, wherein the lower-machine host is respectively connected to the upper-machine and each lower-machine slave;
[0021] The lower-machine host authenticates the lower-machine slave. When the lower-machine slave passes the authentication, the lower-machine host reads the accessory information of the lower-machine slave and sends it to the upper-machine.
[0022] The above-mentioned power module test system and its accessory identification method, device and host computer communicate with the host computer through the host computer. The host computer authenticates the host computer based on the first encrypted data generated by encryption and the second encrypted data generated by encryption by the host computer. When the authentication of the host computer is passed, the accessory information of the slave computer is read from the host computer and verified. If the verification is passed, the test process is started. In this way, the identification and verification of accessory information is realized by means of encrypted authentication through communication to prevent the use of illegal accessories for testing. It has strong anti-electromagnetic wave interference ability and is not affected by the high voltage and high current test environment of the power test system. Compared with RFID identification, it can avoid the problem of failure to identify or missed identification due to environmental influences. Moreover, there is no problem of serial station identification caused by RFID identification, and the accuracy of accessory identification is higher, so that it can more effectively prevent the damage to the power module test system caused by the use of illegal accessories and improve the reliability of the power module test system. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 A schematic diagram of a flow chart of a method for identifying accessories of a power module testing system in one embodiment;
[0025] Figure 2 It is a flowchart of an upper computer authenticating a lower computer host in an embodiment of an embodiment;
[0026] Figure 3 It is a flow chart of an algorithm in which a host computer performs encryption according to a time number and a first random number in one embodiment;
[0027] Figure 4 A flowchart of a lower computer host authenticating a higher computer and performing a reading operation in one embodiment;
[0028] Figure 5 A flowchart of a lower computer host authenticating an upper computer and performing a write operation in one embodiment;
[0029] Figure 6 A structural block diagram of an accessory identification device of a power module testing system in one embodiment;
[0030] Figure 7 A structural diagram of a power module testing system in one embodiment;
[0031] Figure 8A flowchart of a lower computer master authenticating a lower computer slave in one embodiment;
[0032] Fig. 9 It is a flow chart of an algorithm in which a lower host computer performs encryption according to a second random number and a third random number in one embodiment;
[0033] Fig.10 A flowchart of a lower machine slave authenticating a lower machine master and reading information in an embodiment;
[0034] Fig.11 A flowchart of a lower-machine slave authenticating a lower-machine master and writing data in an embodiment;
[0035] Fig.12 The figure is a schematic diagram of a test flow of a power module test system in one embodiment. DETAILED DESCRIPTION
[0036] In order to facilitate understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. Embodiments of the present application are provided in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.
[0037] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0038] The present application provides a method for identifying accessories of a power module test system, which is used in a host computer of the power module test system; in the power module test system, the host computer is connected to a host computer of a lower computer for communication, and the host computer of the lower computer is connected to multiple slave computers of the lower computer for communication. Figure 1 The accessory identification method of the power module testing system includes the following steps S110 to S160.
[0039] S110: Obtain data to be encrypted.
[0040] The data to be encrypted may include data generated in real time by the host computer, such as time or random numbers, and may also include data sent by a host computer that communicates with the host computer.
[0041] S120: Encrypt the data to be encrypted to obtain first encrypted data.
[0042] S130: Sending an upper computer authentication instruction to a lower computer host communicating with the upper computer based on the data to be encrypted, and receiving second encrypted data returned by the lower computer host according to the upper computer authentication instruction.
[0043] Specifically, part of the data to be encrypted or the whole data may be sent to the lower host, and an upper authentication instruction may be sent to the lower host. The lower host responds to the upper authentication instruction, encrypts the data to be encrypted to obtain second encrypted data, and returns the second encrypted data to the upper host.
[0044] S140: Authenticate the lower host computer based on the first encrypted data and the second encrypted data.
[0045] Specifically, the first encrypted data generated by the upper computer based on the data to be encrypted and the second encrypted data generated by the lower computer based on the data to be encrypted are compared to authenticate the lower computer. If the comparison is consistent, the authentication of the lower computer is passed, indicating that the authentication of the lower computer is genuine, otherwise, the authentication of the lower computer is not passed.
[0046] S150: When the authentication of the lower-machine host is passed, the accessory information of the lower-machine slave sent by the lower-machine host is read, and the accessory information is fed back by the lower-machine slave that is authenticated and passed by the lower-machine host.
[0047] Among them, the accessory information includes the accessory life, type, version number, etc. Among them, the accessory information sent by the lower-machine host to the upper-machine is obtained by the lower-machine host after authenticating and passing the lower-machine slave by reading the accessory information of the lower-machine slave. Specifically, if there is a lower-machine slave that has not been authenticated, it means that the lower-machine slave is an illegal accessory, and the lower-machine host fails to read the accessory information, and the information that there is an illegal accessory can be fed back to the upper-machine. Furthermore, if the upper-machine reads the information that there is an illegal accessory, it can output an illegal accessory prompt message, such as a pop-up window reminder, and then control the lower-machine host and the lower-machine slave to power off.
[0048] Specifically, the operation of the lower computer host reading the accessory information of the lower computer slave can be executed before the operation of the upper computer reading the accessory information and storing the accessory information, and sending it to the upper computer when the upper computer reads it. It can be understood that the operation of the lower computer host reading the accessory information of the lower computer slave can also be triggered by the operation of the upper computer reading the accessory information.
[0049] S160: Verify the read accessory information and start the test process when the verification passes.
[0050] Specifically, the accessory information is verified based on the set conditions. For example, the host computer can store the test accessory information of each slave machine under the test condition set by the user, and the host computer compares the read accessory information with the test accessory information set by the user. If they are consistent, the verification is passed, and if they are inconsistent, the verification fails.
[0051] Specifically, if the accessory information is verified, it means that the accessory information is accurate, the corresponding lower machine slave meets the test conditions, and the test can be performed. At this time, the test process of the power module test system is started. If the verification fails, the test process is not started. Furthermore, the upper machine can output a message that the accessory information authentication fails, such as a pop-up window reminder, and then control the lower machine host and the lower machine slave to power off.
[0052] The above-mentioned accessory identification method for the power module test system of the upper computer, through the communication between the upper computer and the lower computer host, the upper computer authenticates the lower computer host based on the first encrypted data generated by encryption and the second encrypted data generated by encryption of the lower computer host, and when the authentication of the lower computer host is passed, the accessory information of the lower computer slave is read from the lower computer host and verified, and the test process is started if the verification is passed. In this way, the identification and verification of the accessory information is realized by means of encrypted authentication through communication to prevent the use of illegal accessories for testing, and the ability to resist electromagnetic interference is strong, and it is not affected by the high voltage and high current test environment of the power test system. Compared with RFID identification, it can avoid the problem of being unable to identify or missing identification due to environmental influences. Moreover, there is no problem of serial station identification caused by RFID identification, and the accuracy of accessory identification is higher, so that it can more effectively prevent the damage to the power module test system caused by the use of illegal accessories and improve the reliability of the power module test system.
[0053] In one embodiment, before step S110, the process also includes: controlling the lower computer host and the lower computer slave to power on, and waiting for a preset delay time; when the delay time is reached, executing step S110.
[0054] The preset delay time can be determined according to the time required for the lower-machine host to authenticate the lower-machine slave and read the accessory information of the lower-machine slave. After the user triggers the test start, the upper computer controls the lower-machine host and the lower-machine slave to power on and delay waiting, and then performs step S110 to authenticate the lower-machine host after the preset delay time is reached, ensuring that the lower-machine host and the lower-machine slave work normally.
[0055] In one embodiment, the data to be encrypted includes the currently generated time number and the current first random number sent by the lower host. The time number is generated by the upper host according to the current time; the time number and the first random number have the same number of digits. For example, the time number and the first random number can be 8 digits, 6 digits or other digits.
[0056] Specifically, step S120 includes step (a1) and step (a2).
[0057] Step (a1): Generate host computer MAC data according to the time number and the first random number.
[0058] Step (a2): using an encryption algorithm to encrypt based on the MAC data of the host computer and the key stored in the host computer to generate first encrypted data.
[0059] The encryption algorithm may be one of the known encryption algorithms, for example, a PRGA (pseudo-random sub-cipher generation algorithm). The commonly used encryption method is generally to directly use the encryption algorithm to encrypt the data. The encrypted variable has only one factor, which is easy to be cracked. In this embodiment, the host computer MAC data is first generated according to the time number generated by the host computer and the first random number sent by the slave computer for preliminary encryption, and then the encryption algorithm is used to encrypt the final first encrypted data. Through double encryption, the difficulty of cracking can be increased.
[0060] Correspondingly, in step S130, sending an upper computer authentication instruction to a lower computer host communicating with the upper computer based on the data to be encrypted includes: sending a time number and an upper computer authentication instruction to the lower computer host, so that the lower computer host generates second encrypted data according to the time number and the first random number.
[0061] The lower host and the upper host use the same method to encrypt the same data. Specifically, after the lower host receives the time number sent by the upper host, it can generate host MAC data according to the received time number and the generated first random number, encrypt it based on the host MAC data and the same key as the upper host using an encryption algorithm, generate second encrypted data and return it to the upper host, so that the upper host can authenticate the lower host.
[0062] For example Figure 2 The flowchart of the upper computer authenticating the lower computer host in one embodiment, the upper computer sends a read random number command to the lower computer host, and the lower computer host replies to the upper computer with an 8-byte random number as the first random number; the upper computer obtains the current time, and generates an 8-byte time number (month month day day hour hour minute minute) according to the month, day, hour, and minute. The upper computer transmits the time number to the lower computer host, sends the upper computer authentication instruction to the lower computer host, and allows the lower computer host to start authentication, so that the lower computer host performs algorithm encryption according to the 8-byte random number and the 8-byte time number. The upper computer performs algorithm encryption according to the 8-byte random number and the 8-byte time number, and after the encryption is completed, waits for the lower computer host to send the encryption status of the completed encryption to the upper computer. The upper computer reads the second encrypted data generated by the encryption of the lower computer host, and compares it with the first encrypted data generated by the upper computer. If the data is consistent, the authentication is successful, and if the data is inconsistent, the authentication fails.
[0063] In one embodiment, step (a1) includes: performing XOR on the time number, the byte located at the same odd position in the first random number, and the first preset byte data to obtain the byte corresponding to the odd position of the host computer MAC data; performing XOR on the time number, the byte located at the same even position in the first random number, and the second preset byte data to obtain the byte corresponding to the even position of the host computer MAC data.
[0064] Specifically, the first byte of the time number, the first byte of the first random number, and the first preset byte data are XORed to obtain the first byte of the host computer MAC data, the second byte of the time number, the second byte of the first random number, and the second preset byte data are XORed to obtain the second byte of the host computer MAC data; the third byte of the time number, the third byte of the first random number, and the first preset byte data are XORed to obtain the third byte of the host computer MAC data, the fourth byte of the time number, the fourth byte of the first random number, and the second preset byte data are XORed to obtain the fourth byte of the host computer MAC data; and so on, the host computer MAC data is obtained.
[0065] For example, the first preset byte data is 0xAA, and the second preset byte data is 0x55; the algorithm for generating the host computer MAC data is as follows:
[0066] ① The first byte of the 8-byte time number of the upper computer is XORed with the first byte of the 8-byte first random number of the lower computer or 0xAA;
[0067] ② The second byte of the 8-byte time number of the upper computer is XORed with the second byte of the 8-byte first random number of the lower computer or 0x55;
[0068] ③ The third byte of the 8-byte time number of the upper computer is XORed with the third byte of the 8-byte first random number of the lower computer and XORed with 0xAA;
[0069] ④ The fourth byte of the 8-byte time number of the upper computer is XORed with the fourth byte of the 8-byte first random number of the lower computer or 0x55;
[0070] ⑤ The fifth byte of the 8-byte time number of the upper computer is XORed with the fifth byte of the 8-byte first random number of the lower computer and XORed with 0xAA;
[0071] ⑥ The sixth byte of the 8-byte time number of the upper computer is XORed with the sixth byte of the 8-byte first random number of the lower computer or 0x55;
[0072] ⑦ The seventh byte of the 8-byte time number of the upper computer is XORed with the seventh byte of the 8-byte first random number of the lower computer and XORed with 0xAA;
[0073] ⑧ The 8th byte of the 8-byte time number of the upper computer is XORed with the 8th byte of the 8-byte first random number of the lower computer and XORed with 0x55;
[0074] The data obtained from ① to ⑧ are arranged in sequence to obtain 8 bytes of upper computer MAC data.
[0075] In one of the embodiments, step (a2) includes: performing an initialization algorithm on a key stored in a host computer to obtain an initialization array, and generating first encrypted data using a PRGA algorithm for the host computer MAC data and the initialization array.
[0076] The initialization algorithm may be KSA (Key Scheduling Algorithm). Figure 3 As shown in the figure, both the upper computer and the lower computer host have an identical 16-byte key (KEY). After the 16-byte KEY passes through the initialization algorithm (KSA), an initialization array is obtained. After the initialization array and the 8-byte upper computer MAC data pass through the PRGA algorithm, 8-byte encrypted MAC data can be obtained. This encrypted MAC data is the encrypted data used by the upper computer to authenticate the lower computer host.
[0077] It can be understood that after the upper computer sends the time number and the upper computer authentication instruction to the lower computer host, the lower computer host generates the host MAC according to the time number and the first random number and then encrypts it to generate the second encrypted data. The processing method is the same as step (a1) and step (a2), and will not be repeated here.
[0078] In one embodiment, step S150 of reading the accessory information of the lower-machine slave sent by the lower-machine master includes steps (b1) to (b3).
[0079] Step (b1): Send the lower-machine host authentication information to the lower-machine host so that the lower-machine host can authenticate the upper-machine host.
[0080] Step (b2): receiving the upper computer authentication result sent by the lower computer host, and when the upper computer authentication result is authentication passed, sending the upper computer read instruction to the lower computer host.
[0081] Step (b3): receiving the accessory information of the lower machine slave returned by the lower machine host according to the upper machine read instruction.
[0082] After the lower host computer authenticates the upper host computer, the upper host computer sends a read command to the lower host computer, so that the lower host computer authenticates first and then returns the accessory information, thereby improving the reading security of the accessory information.
[0083] In one embodiment, the lower host authentication information includes the current time and the corresponding first encrypted data. Specifically, step (b1) includes steps (b11) to (b14).
[0084] Step (b11): Generate the current time number and obtain the current first random number generated by the lower host computer.
[0085] Step (b12): Generate the current host computer MAC data according to the current time and the current first random number.
[0086] Step (b13): using an encryption algorithm to encrypt based on the current host computer MAC data and the key stored in the host computer to generate the current first encrypted data.
[0087] Step (b14): Send the current first encrypted data, the current time and the lower host authentication instruction to the lower host, so that the lower host generates the second encrypted data according to the time and the first random number, and authenticates the upper host based on the second encrypted data and the first encrypted data.
[0088] Among them, the specific operation of step (b12) can be the same as the above-mentioned step (a1), and the specific operation of step (b13) can be the same as the above-mentioned step (a2), which will not be repeated here.
[0089] The process of the lower host authenticating the upper computer is the same as the way the upper computer authenticates the lower host. Specifically, after the lower host receives the current time number sent by the upper computer, it can generate the current host MAC data according to the received time number and the generated first random number, and encrypt it based on the current host MAC data and the same key as the upper computer using an encryption algorithm to generate the second encrypted data. Specifically, the lower host compares the second encrypted data with the first encrypted data of the upper computer to authenticate the upper computer. If the comparison is consistent, the authentication of the upper computer is passed, that is, the authentication result of the upper computer is authentication passed, otherwise, the authentication of the upper computer fails.
[0090] For example, in one embodiment, Figure 4 , the lower computer authenticates the upper computer and performs a read operation. The upper computer sends a read random number command to the lower computer, and the lower computer replies with an 8-byte random number as the current first random number. The upper computer obtains the current time, generates an 8-byte time number based on the month, day, hour, and minute, and performs algorithm encryption based on the 8-byte random number and the time number to generate the current first encrypted data ( Figure 4The upper computer sends the lower computer host authentication instruction to the lower computer host. The lower computer host also performs algorithm encryption based on the time number and the same 8-byte random number to obtain the current second encrypted data, and compares it with the first encrypted data. If the comparison is consistent, the authentication is successful, and if the comparison is inconsistent, the authentication fails; the lower computer host sends the upper computer authentication result back to the upper computer. The upper computer waits for the upper computer authentication result sent by the lower computer host after the authentication is completed. The upper computer determines whether the authentication is successful. If the authentication fails, the process ends and the accessory information reading fails; if the authentication is successful, the upper computer read instruction is sent to the lower computer host. After the lower computer host receives the upper computer read instruction, when the authentication of the upper computer is successful, the reading operation of the lower computer host is started, that is, the lower computer host reads the accessory information of the lower machine slave and sends it to the upper computer; if the authentication of the upper computer fails, it will not be read, and the reading result will be directly returned to the upper computer. The lower computer host clears the authentication information of the lower computer host and waits for the next authentication. After the upper computer sends the upper computer read command to the lower computer host, it waits for the lower computer host to return the read result and data.
[0091] It can be understood that in other embodiments, the lower host authentication information includes the first encrypted data generated by the upper computer; step (b1) may include: sending the first encrypted data and the lower host authentication instruction to the lower host, so that the lower host authenticates the upper computer according to the first encrypted data and the second encrypted data. Specifically, step (b1) can be performed after step S130 or simultaneously, so as to complete the mutual authentication between the upper computer and the lower host through the time number and the first random number generated once. Specifically, step (b2) is performed after step S140.
[0092] In one of the embodiments, after step S160, the method further includes: generating data to be written based on the test result; and writing the data to be written into the slave of the lower computer through the master of the lower computer.
[0093] After the test is completed, the upper computer will generate the data to be written to the lower computer slave according to the test results. For example, the data to be written can be the life span obtained by the test. The data to be written is written to the lower computer slave through the lower computer host, which is convenient for the lower computer slave to store. Specifically, the lower computer host can also reply the written results to the upper computer, and the upper computer controls the lower computer host and the lower computer slave to power off.
[0094] In one embodiment, the step of writing the data to be written into the slave of the lower computer by the master of the lower computer includes steps (c1) to (c2).
[0095] Step (c1): Send the lower-machine host authentication information to the lower-machine host so that the lower-machine host authenticates the upper-machine host.
[0096] Specifically, the implementation method of step (c1) is the same as that of the aforementioned step (b1), which will not be described in detail here.
[0097] Step (c2): receiving the upper computer authentication result sent by the lower computer host, and when the upper computer authentication result is authentication passed, sending the data to be written and the upper computer write instruction to the lower computer host, so that the lower computer host writes the data to be written into the lower computer slave.
[0098] After the lower host computer authenticates the upper host computer, the data to be written and the upper host computer write command are sent to the lower host computer, so that the lower host computer authenticates first and then writes data, thereby improving the security of data writing.
[0099] For example, in one embodiment, Figure 5 , the lower computer authenticates the upper computer and performs a write operation. The upper computer sends a read random number command to the lower computer, and the lower computer replies with an 8-byte random number as the current first random number. The upper computer obtains the current time, generates an 8-byte time number based on the month, day, hour, and minute, and performs algorithm encryption based on the 8-byte random number and the time number to generate the current first encrypted data ( Figure 5 MAC value in), and then send the time number and the first encrypted data together to the lower host. The upper computer sends the lower host authentication instruction to the lower host. The lower host performs an encryption algorithm based on the same time number and 8-byte random number to obtain the second encrypted data, and compares it with the first encrypted data. If the comparison is consistent, the authentication is successful, and if the comparison is inconsistent, the authentication fails; the lower host sends the upper authentication result back to the upper computer. The upper computer waits for the upper authentication result sent by the lower host after the authentication is completed. The upper computer determines whether the authentication is successful. If the authentication fails, the process ends and the writing fails; if the authentication is successful, the upper computer write instruction and the data to be written are sent to the lower host. After the lower host receives the upper computer write instruction, when the authentication of the upper computer is successful, the write operation of the lower host is started, that is, the lower slave authenticates the lower host and writes data; the lower host returns the write result to the upper computer; if the authentication of the upper computer fails, it does not write, and directly returns the write result to the upper computer. The lower host clears the authentication information of the lower host and waits for the next authentication. After the upper host sends the upper host write instruction and the data to be written to the lower host, it waits for the lower host to return the write result.
[0100] In one embodiment, Figure 6 As shown, a component identification device for a power module testing system is provided, including a data acquisition module 610 , a data encryption module 620 , a data communication module 630 , an authentication module 640 , an information reading module 650 and an information verification module 660 .
[0101] The data acquisition module 610 is used to obtain the data to be encrypted. The data encryption module 620 is used to encrypt the data to be encrypted to obtain the first encrypted data. The data communication module 630 is used to send the upper computer authentication instruction to the lower computer host communicating with the upper computer based on the data to be encrypted, and receive the second encrypted data returned by the lower computer host according to the upper computer authentication instruction. The authentication module 640 is used to authenticate the lower computer host based on the first encrypted data and the second encrypted data. The information reading module 650 is used to read the accessory information of the lower computer slave sent by the lower computer host when the authentication of the lower computer host is passed, and the accessory information is fed back by the lower computer slave authenticated and passed by the lower computer host. The information verification module 660 is used to verify the read accessory information and start the test process when the verification is passed.
[0102] For the specific definition of the accessory identification device of the power module testing system, please refer to the definition of the accessory identification method of the power module testing system mentioned above, which will not be repeated here. Each module in the accessory identification device of the above-mentioned power module testing system can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the host computer in the form of hardware, or can be stored in the memory of the host computer in the form of software, so that the processor can call and execute the operations corresponding to the above modules. It should be noted that the division of modules in the embodiment of the present application is schematic, which is only a logical function division, and there may be other division methods in actual implementation.
[0103] In one embodiment, a host computer is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0104] In one embodiment, a power module test system is provided, comprising: a lower computer host, a plurality of lower computer slaves and the upper computer in the aforementioned embodiment, wherein the lower computer host is communicatively connected with the upper computer and each of the lower computer slaves.
[0105] The lower computer host authenticates the lower computer slave. When the lower computer slave passes the authentication, the lower computer host reads the accessory information of the lower computer slave and sends it to the upper computer.
[0106] The slave machine can be set according to actual needs. For example, Figure 7 As shown in the figure, an industrial computer PC is used as the upper computer, and the control board PCBA is used as the lower computer host. The lower computer slaves include the driver board PCBA, gate board PCBA, probe board PCBA, waterway board PCBA, and carrier board PCBA. The upper computer uses the lower computer host as a bridge to form information interaction with the lower computer slaves, thereby realizing the management and encrypted identification of the whole machine accessories.
[0107] In one embodiment, the authentication of the lower-level slave by the lower-level master includes steps (d1) to (d4).
[0108] Step (d1): The lower computer host generates a second random number and obtains a third random number generated by the lower computer slave.
[0109] The second random number and the third random number have the same number of digits.
[0110] Step (d2): The lower-machine host generates lower-machine host MAC data according to the second random number and the third random number, encrypts the lower-machine host MAC data using an encryption algorithm to obtain third encrypted data, and sends the second random number and the lower-machine host authentication instruction to the lower-machine slave.
[0111] Step (d3): The lower computer slave generates fourth encrypted data according to the second random number and the third random number, and returns the fourth encrypted data to the lower computer host.
[0112] Specifically, the method for the lower computer slave to encrypt and generate the fourth encrypted data may be the same as the method for the lower computer host to encrypt and generate the third encrypted data.
[0113] Step (d4): The lower computer host authenticates the lower computer slave based on the third encrypted data and the fourth encrypted data.
[0114] In this embodiment, the lower host computer first generates the lower host computer MAC data according to the second random number and the third random number for preliminary encryption, and then uses the encryption algorithm to encrypt to obtain the final third encrypted data. Through double encryption, the difficulty of cracking can be increased, thereby improving the security of the lower host computer's authentication of the lower slave computer.
[0115] For example, in one embodiment, the process of the lower machine host authenticating the lower machine slave is as follows: Figure 8 . The lower-machine host sends a read random number command to the lower-machine slave, and the lower-machine slave replies to the lower-machine host with a 4-byte random number; the lower-machine host also generates a 4-byte random number and transmits it to the lower-machine slave. The lower-machine host sends a lower-machine host authentication command to the lower-machine slave to start authentication. Both the lower-machine host and the lower-machine slave perform algorithm encryption based on two 4-byte random numbers. After the lower-machine host performs algorithm encryption based on the two 4-byte random numbers, it will wait for the lower-machine slave to return the encryption status of encryption completion. The lower-machine host reads the fourth encrypted data generated by the encryption of the lower-machine slave and compares it with the third encrypted data generated by the authentication of the lower-machine host. If they are consistent, the authentication is successful, and if they are inconsistent, the authentication fails.
[0116] In one of the embodiments, the number of bits of the lower-machine host MAC data is equal to twice the number of bits of the second random number / third random number. Specifically, the lower-machine host generates the lower-machine host MAC data according to the second random number and the third random number, including: performing XOR on each byte of the second random number and the third preset byte data, respectively, to sequentially obtain the bytes of each odd-numbered bit of the lower-machine host MAC data; performing XOR on each byte of the third random number and the fourth preset byte data, respectively, to sequentially obtain the bytes of each even-numbered bit of the lower-machine host MAC data.
[0117] Specifically, the first byte of the second random number is XORed with the third preset byte data to obtain the first byte of the lower machine host MAC data, the first byte of the third random number is XORed with the fourth preset byte data to obtain the second byte of the lower machine host MAC data; the second byte of the second random number is XORed with the third preset byte data to obtain the third byte of the lower machine host MAC data, the second byte of the third random number is XORed with the fourth preset byte data to obtain the fourth byte of the lower machine host MAC data; and so on, to obtain the lower machine host MAC data.
[0118] The third preset byte data and the fourth preset byte data can be set as needed. For example, the third preset byte data is 0x5A, and the fourth preset byte data is 0xA5. In one embodiment, the algorithm for the lower host to generate the lower host MAC data is as follows:
[0119] ① The first byte of the 4-byte random number of the lower host is XORed with 0x5A;
[0120] ② The first byte of the 4-byte random number of the slave of the lower machine is XORed with 0xA5;
[0121] ③ The second byte of the 4-byte random number of the lower host is XORed with 0x5A;
[0122] ④ The second byte of the 4-byte random number of the slave of the lower computer is XORed with 0xA5;
[0123] ⑤ The third byte of the 4-byte random number of the lower host is XORed with 0x5A;
[0124] ⑥ The third byte of the 4-byte random number of the slave of the lower computer is XORed with 0xA5;
[0125] ⑦ The fourth byte of the 4-byte random number of the lower host is XORed with 0x5A;
[0126] ⑧ The fourth byte of the 4-byte random number of the slave of the lower computer is XORed with 0xA5;
[0127] The data obtained from ① to ⑧ are arranged in sequence to obtain 8 bytes of MAC data of the lower computer host.
[0128] like Fig. 9As shown in the figure, the host and slave have the same 16-byte KEY stored inside. After the 16-byte KEY is initialized by the algorithm, an initialization array is obtained. An 8-byte host MAC data is generated based on the 4-byte random number of the host and the 4-byte random number of the slave. After the initialization array and the 8-byte host MAC data are passed through the PRGA algorithm, an 8-byte encrypted MAC data can be obtained. This encrypted MAC data is the encrypted data used for authentication between the host and the slave.
[0129] In one embodiment, the lower computer host reads the accessory information of the lower computer slave and sends it to the upper computer, including the following steps (e1) to (e4).
[0130] Step (e1): The lower computer host sends the slave authentication information to the lower computer slave.
[0131] Step (e2): The lower-machine slave authenticates the lower-machine master based on the slave authentication information, and sends the lower-machine master authentication result to the lower-machine master.
[0132] Step (e3): the lower-machine host receives the lower-machine host authentication result, and when the lower-machine host authentication result is authentication passed, sends the lower-machine host read instruction to the corresponding lower-machine slave.
[0133] It can be understood that the specific implementation methods of step (e1) and step (e2) can be the same as step (b1), and the specific implementation method of step (e3) can be the same as step (b2), which will not be repeated here.
[0134] Step (e4): The lower-computer slave responds to the lower-computer master's read instruction and feeds back the corresponding accessory information to the lower-computer master. The lower-computer master receives the accessory information of the lower-computer slave and sends it to the upper computer.
[0135] After the lower-machine slave authenticates the lower-machine master, the lower-machine master sends a read command to the lower-machine slave, so that the lower-machine slave authenticates first and then returns the accessory information, thereby improving the reading security of the accessory information.
[0136] For example, in one embodiment, Fig.10 , the lower machine slave authenticates the lower machine master and reads the information. The lower machine master sends a random number read command to the lower machine slave, and the lower machine slave replies with a 4-byte random number to the lower machine master. The lower machine master also generates a 4-byte random number and encrypts it with the 4-byte random number sent by the lower machine slave to generate the current third encrypted data ( Fig.10The lower machine host sends the generated 4-byte random number together with the third encrypted data to the lower machine slave, and sends the lower machine slave authentication instruction to the lower machine slave. The lower machine slave encrypts according to the two 4-byte random numbers to obtain the fourth encrypted data, and compares it with the third encrypted data. If the comparison is consistent, the authentication is successful, and if the comparison is inconsistent, the authentication fails; the lower machine slave sends the lower machine host authentication result back to the lower machine host. The lower machine host waits for the lower machine host authentication result sent by the lower machine slave after the authentication is completed. If the authentication of the lower machine host is successful, the lower machine host read instruction is sent to the lower machine slave. If the authentication fails, the process ends and the reading fails. After the lower machine slave receives the lower machine host read instruction, when the lower machine host authentication is successful, the read operation is started, and the read result and data are returned to the lower machine host; if the lower machine host authentication fails, it will not be read, and the read result is directly returned to the lower machine host. The lower machine slave clears the authentication information and waits for the next authentication. After the lower computer host sends the lower computer host read command to the lower computer slave, it waits for the lower computer slave to return the read result.
[0137] In one of the embodiments, the lower-machine host also receives the data to be written sent by the upper-machine; the lower-machine host sends the slave authentication information to the lower-machine slave; the lower-machine slave authenticates the lower-machine host based on the slave authentication information, and sends the lower-machine host authentication result to the lower-machine host; the lower-machine host receives the lower-machine host authentication result, and when the lower-machine host authentication result is authentication passed, sends the data to be written and the lower-machine host write instruction to the corresponding lower-machine slave; the lower-machine slave responds to the lower-machine host write instruction and writes the data to be written.
[0138] For example, in one embodiment, Fig.11 , the lower machine slave authenticates the lower machine master and writes data. The lower machine master sends a read random number command to the lower machine slave, and the lower machine slave replies with a 4-byte random number to the lower machine master. The lower machine master also generates a 4-byte random number and encrypts it with the 4-byte random number sent by the lower machine slave to generate the third encrypted data ( Fig.11The MAC value in the lower host), and then sends the 4-byte random number generated by the lower host together with the third encrypted data to the lower slave. The lower host sends the lower slave authentication instruction to the lower slave. The lower slave obtains the fourth encrypted data according to the two 4-byte random numbers, and compares it with the third encrypted data. If the comparison is consistent, the authentication is successful, and if the comparison is inconsistent, the authentication fails; the lower slave sends the lower host authentication result back to the lower host. The lower host waits for the lower slave authentication to end. If the lower host is authenticated, the data to be written and the lower host write instruction are sent to the lower slave. If the authentication fails, the process ends and the writing fails. After the lower slave receives the lower host write instruction, when the lower host is authenticated, the data to be brought in is written and the writing result is returned to the lower host; if the authentication fails, it is not written, and the writing result is directly returned to the lower host. The lower slave clears the authentication information and waits for the next authentication. After the lower computer host sends the lower computer host write instruction and the data to be written to the lower computer slave, it waits for the lower computer slave to return the write result.
[0139] refer to Fig.12 In a detailed embodiment, after the user starts the test, the upper computer controls the lower computer system (lower computer host and lower computer slave) to power on, and the upper computer delays waiting. After the lower computer system is powered on, Figure 8 The process of the lower machine host authenticating the lower machine slave shown in the figure determines whether there are illegal accessories. Specifically, if all the lower machine slaves are authenticated, there are no illegal accessories, otherwise there are illegal accessories; then the lower machine host starts the reading operation to perform Fig.10 The process shown is that the lower machine slave authenticates the lower machine master and reads the information. The regular accessory information is read from the authenticated lower machine slave, and the lower machine slave replies to the lower machine master with the accessory information. After the delay time of the upper machine is reached, Figure 2 The process of the upper computer authenticating the lower computer host is shown, and then Figure 4 The process shown is that the lower host authenticates the upper host and performs a read operation to read the accessory information reading result replied by the lower host. After the upper host receives the accessory information reading result replied by the lower host, it determines whether there are illegal accessories. If there are illegal accessories, a pop-up window will be displayed to remind the lower host system to power off and end the test process. If there are no illegal accessories, the accessory information will be compared with the test accessory information set by the user. If they are inconsistent, a pop-up window will be displayed to remind the lower host system to power off and end the test process. If they are consistent, the test process will be carried out. After waiting for the test to end, the upper host generates the data to be written and performs Figure 5 The process shown in the figure is that the host computer authenticates the upper computer and performs a write operation. The host computer writes the data to be written into the slave computer. The host computer starts the write operation. Fig.11The process shown is that the lower machine slave authenticates the lower machine master and writes data. The lower machine master replies the writing result to the upper machine, and the upper machine controls the lower machine system to power off, and the process ends.
[0140] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0141] In the description of this specification, the description with reference to the terms "some embodiments", "other embodiments", "ideal embodiments", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic descriptions of the above terms do not necessarily refer to the same embodiment or example.
[0142] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0143] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for identifying accessories of a power module test system, used in a host computer of the power module test system, characterized in that: include: Obtain the data to be encrypted; Encrypting the data to be encrypted to obtain first encrypted data; Sending an upper computer authentication instruction to a lower computer host communicating with the upper computer based on the data to be encrypted, and receiving second encrypted data returned by the lower computer host according to the upper computer authentication instruction; Authenticating the lower host computer based on the first encrypted data and the second encrypted data; When the authentication of the lower-machine host is passed, reading the accessory information of the lower-machine slave sent by the lower-machine host, the accessory information is fed back by the lower-machine slave authenticated and passed by the lower-machine host; Verify the read accessory information and start the test process when the verification passes.
2. The method according to claim 1, characterized in that The data to be encrypted includes the currently generated time number and the current first random number sent by the lower host; The step of encrypting the data to be encrypted to obtain first encrypted data includes: Generate host computer MAC data according to the time number and the first random number; Encrypting the data using an encryption algorithm based on the MAC data of the host computer and a key stored in the host computer to generate first encrypted data; The method of sending an upper computer authentication instruction to a lower computer host communicating with the upper computer based on the data to be encrypted includes: The time number and the upper computer authentication instruction are sent to the lower computer host, so that the lower computer host generates the second encrypted data according to the time number and the first random number.
3. The method according to claim 2, characterized in that The generating the host computer MAC data according to the time number and the first random number includes: XOR the time number, the byte located at the same odd position in the first random number, and the first preset byte data to obtain the byte corresponding to the odd position of the host computer MAC data; The time number, the byte located at the same even-numbered position in the first random number, and the second preset byte data are XORed to obtain the byte of the corresponding even-numbered position of the host computer MAC data.
4. The method according to claim 1, characterized in that: The reading of the accessory information of the lower-level slave machine sent by the lower-level master machine includes: Sending the lower host authentication information to the lower host so that the lower host can authenticate the upper host; Receive the upper computer authentication result sent by the lower computer host, and when the upper computer authentication result is authentication passed, send the upper computer read instruction to the lower computer host; Receive the accessory information of the lower machine slave returned by the lower machine host according to the upper machine read instruction.
5. The method according to claim 4, characterized in that The host authentication information of the lower computer includes the current time and the first encrypted data generated accordingly; The sending of the lower host authentication information to the lower host so that the lower host authenticates the upper host includes: Generate the current time number, and obtain the current first random number generated by the lower host; Generate the current host computer MAC data according to the current time and the current first random number; Using an encryption algorithm to encrypt based on the current host computer MAC data and the key stored in the host computer to generate current first encrypted data; Send the current first encrypted data, the current time number and the lower host authentication instruction to the lower host, so that the lower host generates the second encrypted data according to the time number and the first random number, and authenticates the upper host based on the second encrypted data and the first encrypted data.
6. The method according to any one of claims 1 to 5, characterized in that: After the test process is started when the verification is passed, the following steps are also included: Generate data to be written based on the test results; The data to be written is written into the lower-level slave machine through the lower-level master machine.
7. The method according to claim 6, characterized in that The step of writing the data to be written into the slave machine through the master machine includes: Sending the lower host authentication information to the lower host so that the lower host can authenticate the upper host; Receive the upper computer authentication result sent by the lower computer host, and when the upper computer authentication result is authentication passed, send the data to be written and the upper computer write instruction to the lower computer host, so that the lower computer host writes the data to be written into the lower computer slave.
8. An accessory identification device for a power module test system, characterized in that: include: A data acquisition module, used to acquire data to be encrypted; A data encryption module, used for encrypting the data to be encrypted to obtain first encrypted data; A data communication module, used for sending an upper computer authentication instruction to a lower computer host communicating with the upper computer based on the data to be encrypted, and receiving second encrypted data returned by the lower computer host according to the upper computer authentication instruction; An authentication module, used for authenticating the lower host computer based on the first encrypted data and the second encrypted data; An information reading module, used for reading accessory information of a lower-machine slave sent by the lower-machine master when the lower-machine master passes authentication, the accessory information being fed back by the lower-machine slave that has been authenticated and passed by the lower-machine master; The information verification module is used to verify the read accessory information and start the test process when the verification passes.
9. A host computer, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A power module testing system, characterized in that: include: A lower-machine host, a plurality of lower-machine slaves, and the upper machine according to claim 9, wherein the lower-machine host is respectively connected to the upper machine and each lower-machine slave; The lower-machine host authenticates the lower-machine slave. When the lower-machine slave passes the authentication, the lower-machine host reads the accessory information of the lower-machine slave and sends it to the upper-machine.
11. The system according to claim 10, characterized in that The lower computer host authenticates the lower computer slave, including: The lower computer host generates a second random number, and obtains a third random number generated by the lower computer slave; The lower host generates lower host MAC data according to the second random number and the third random number, encrypts the lower host MAC data using an encryption algorithm to obtain third encrypted data, and sends the second random number and the lower host authentication instruction to the lower slave; The lower computer slave generates the fourth encrypted data according to the second random number and the third random number, and returns the fourth encrypted data to the lower computer host; The lower-machine host authenticates the lower-machine slave based on the third encrypted data and the fourth encrypted data.
12. The system according to claim 11, characterized in that The number of bits of the lower host MAC data is equal to twice the number of bits of the second random number / the third random number; The lower host generates lower host MAC data according to the second random number and the third random number, including: Performing XOR on each byte of the second random number and the third preset byte data respectively, and obtaining the bytes of each odd-numbered digit of the host MAC data of the lower machine in sequence; Each byte of the third random number is XORed with the fourth preset byte data respectively, and bytes of even-numbered bits of the host MAC data of the lower machine are obtained in sequence.
13. The system according to claim 10, characterized in that The lower computer host reads the accessory information of the lower computer slave and sends it to the upper computer, including: The lower computer host sends slave authentication information to the lower computer slave; The lower-machine slave authenticates the lower-machine host based on the slave authentication information, and sends the lower-machine host authentication result to the lower-machine host; The lower host receives the lower host authentication result, and when the lower host authentication result is authentication passed, sends the lower host read instruction to the corresponding lower slave; The lower-machine slave responds to the lower-machine master's read instruction and feeds back corresponding accessory information to the lower-machine master. The lower-machine master receives the accessory information of the lower-machine slave and sends it to the upper-machine.
14. The system according to claim 10, characterized in that The lower computer host receives the data to be written sent by the upper computer; The lower computer host sends slave authentication information to the lower computer slave; The lower-machine slave authenticates the lower-machine host based on the slave authentication information, and sends the lower-machine host authentication result to the lower-machine host; The lower-machine host receives the lower-machine host authentication result, and when the lower-machine host authentication result is authentication passed, sends the data to be written and the lower-machine host write instruction to the corresponding lower-machine slave; The lower-machine slave responds to the write instruction of the lower-machine master to write the data to be written.