Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Referring to fig. 1, fig. 1 is a flow chart of a flexible configuration method of electric compressor driver software provided in an embodiment of the present application, where the flexible configuration method of electric compressor driver software is applied to an MES system, and the MES system includes a server, an industrial camera, and an electric compressor initialized by software to be driven, where the industrial camera and the electric compressor initialized by software to be driven are both in communication connection with the server.
As shown in FIG. 1, the method includes steps S110 to S150.
S110, acquiring external feature information of the electric compressor based on a plurality of two-dimensional codes of the electric compressor, so as to determine an external feature vector according to the external feature information.
In the present embodiment, the motor-driven compressor is used to acquire the external characteristic information thereof from the start of the assembly process. For example, the electric compressor comprises a power device of the electric compressor driver, a motor of the electric compressor, a shell of the electric compressor driver and other structures, and two-dimensional codes can be adhered or inscribed on the structures of the electric compressor. The two-dimensional code stuck on each structure in the structures included in the electric compressor can be scanned by a code scanning device (such as an industrial camera) to obtain external information corresponding to the corresponding structure.
For example, in the assembling process of the electric compressor, step 1 is to fix the electric compressor motor, and when the electric compressor motor is fixedly placed on the electric compressor installation production line and moves to the lower side of the industrial camera along with the electric compressor installation production line, the two-dimensional code pasted on the electric compressor motor is collected by the industrial camera, and then the two-dimensional code is identified and the first sub external characteristic information corresponding to the electric compressor motor is obtained. If the step 2 of the assembly process of the electric compressor is to fix the power device of the electric compressor, and the electric compressor motor moves to the lower part of the industrial camera along with the installation production line of the electric compressor, the two-dimensional code pasted on the power device of the electric compressor is collected by the industrial camera, and then the two-dimensional code is identified and second sub-external characteristic information corresponding to the power device of the electric compressor is acquired. And by analogy, when the installation process of the electric compressor is completed, sub external characteristic information of a plurality of component parts is acquired. If it is determined that the version of the external characteristic information of the electric compressor collected at this time is the V1.0 version (or the V2.0 version, the V3.0 version, or the like), the version of the external characteristic information may also be used as one piece of sub external characteristic information.
Of course, finally, a two-dimensional code can be adhered or inscribed on the shell of the electric compressor driver, and the two-dimensional code is collected by the industrial camera, so that the comprehensive external characteristic information comprising all the sub external characteristic information can be obtained after the two-dimensional code is identified. The external characteristic information may be understood as one total directory information in which a plurality of sub-directory information, each corresponding to one sub-external characteristic information of the electric compressor, are included. After the external feature information of the electric compressor is obtained, the external feature information is sequenced based on a preset sequencing strategy and then combined to obtain an external feature vector.
In one embodiment, as shown in fig. 2, step S110 includes:
s111, acquiring a plurality of two-dimensional codes of the electric compressor through an industrial camera in an MES system;
s112, identifying the two-dimensional codes to obtain external feature version numbers, compressor displacement data, voltage platform data, host factory communication matrix data, customer information data and permanent magnet synchronous motor model data corresponding to the two-dimensional codes, and forming external feature information;
S113, the external feature vector is formed by sequentially concatenating the external feature version number, the compressor displacement data, the voltage platform data, the host factory communication matrix data, the client information data and the permanent magnet synchronous motor model data in the external feature information.
In this embodiment, taking a complete assembly process of the electric compressor as an example, after a plurality of two-dimensional codes on each component of the electric compressor are acquired and identified by an industrial camera in an MES system (MES is fully called Manufacturing Execution System and represents a manufacturing execution system) in the complete assembly process of the electric compressor, external feature version numbers (such as V1.0, V2.0, V3.0, etc.), compressor displacement data (such as 27cc, 34cc, 45cc, etc.), voltage platform data (such as 96V, 320V, 500V, 800V, etc.), host factory communication matrix data (such as A1, A2, A3, etc.), customer information data (such as B1, B2, B3, etc.), permanent magnet synchronous motor model number data (such as C1, C2, C3, etc.) corresponding to the plurality of two-dimensional codes respectively can be obtained.
More specifically, the external feature version number and the compressor displacement data can be obtained by two-dimension code identification arranged on the shell of the electric compressor driver, the voltage platform data is obtained by two-dimension code identification arranged on the power device of the electric compressor driver, and the host factory communication matrix data, the client information data and the permanent magnet synchronous motor model data are obtained by two-dimension code identification arranged on the motor of the electric compressor. After the above-mentioned all sub external characteristic information is obtained, according to the external characteristic version number, compressor displacement data, voltage platform data, main machine factory communication matrix data, customer information data and permanent magnet synchronous motor model data correspondent to the sorting strategy, all sub external characteristic information of electric compressor can be orderly series-connected to form the described external characteristic vector. For example, the external feature version number of the motor-driven compressor is V1.0, the compressor displacement data is 27cc (X1 may be used for compressor displacement data, X1=27 cc may be used for compressor displacement data is 27 cc), the voltage platform data is 96V (X2 may be used for voltage platform data, X2=96V may be used for voltage platform data is 96V), the host factory communication matrix data is A1 (X3 may be used for host factory communication matrix data, X3=a1 may be used for host factory communication matrix data is A1), the customer information data is B1 (X4 may be used for customer information data, X4=b1 may be used for customer information data is B1), and the permanent magnet synchronous motor model data is C1 (X5 may be used for permanent magnet synchronous motor model data, and X5=c1 may be used for permanent magnet synchronous motor model data). The external feature version number V1.0 of the electric compressor, the compressor displacement data 27cc, the voltage platform data 96V, the host factory communication matrix data A1, the client information data B1 and the permanent magnet synchronous motor model data C1 are sequentially connected in series to form an external feature vector. If the external feature vector is represented by X, x= [ V1.0, X1, X2, X3, X4, X5]. It can be seen that based on the scanning and recognition of the two-dimensional codes of each component of the electric compressor in the assembly process, the obtained sub-external feature information can be finally composed into external feature information and converted into external feature vectors.
S120, carrying out external feature configuration on the electric compressor according to the external feature vector.
In this embodiment, after the server in the MES system scans the two-dimensional codes of the electric compressor based on the industrial camera to obtain the external feature information of the electric compressor and finally converts the external feature information into the external feature vector, the server in the MES system needs to perform external feature configuration locally, so that the external feature vector is configured and stored in the server in the MES system.
In one embodiment, as shown in fig. 3, step S120 includes:
s121, establishing communication connection between a server in the MES system and the electric compressor;
s122, the server in the MES system sends seed data to the electric compressor;
s123, the MES system sends a first encryption result obtained by encrypting the seed data and the local encryption key to the electric compressor;
s124, the electric compressor encrypts based on the seed data and another encryption key stored locally to obtain a second encryption result;
and S125, if the electric compressor determines that the first encryption result is the same as the second encryption result, determining that the encryption key and the other encryption key pass verification, and writing the external feature vector into an external memory connected with a controller in the electric compressor so as to perform external feature configuration on the electric compressor.
In this embodiment, in order to implement configuration of external features of the electric compressor by the server in the MES system (which may also be understood as an upper computer, an upper PC terminal, etc., communication connection between the MES system and the electric compressor is first established, more specifically, communication connection between the server in the MES system and the controller in the electric compressor is established, in which LIN (which is a serial communication network based on a LIN bus, which is generally called Local Interconnect Network, and represents a local interconnect network) and CANFD (which may also be simply called CAN-FD, which may be understood as an upgraded version of the CAN protocol, only the protocol is upgraded, the physical layer is unchanged, and the CAN is generally called Controller Area Network and represents a local bus of the controller) and ethernet are used to establish communication connection between the server in the MES system and the controller in the electric compressor.
Then, a server in the MES system transmits pre-stored seed data to a controller of the electric compressor. Since the seed data is also included in the server of the MES system, encryption operations can be performed in the server of the MES system and the controller of the electric compressor based on the seed data and the encryption key, respectively, to obtain a first encryption result and a second encryption result. The first encryption result is obtained by carrying out encryption operation on seed data in a server of the MES system based on an encryption algorithm (comprising an encryption key) stored in the server; the second encryption result is obtained by performing encryption operation on seed data in the controller of the electric compressor based on an encryption algorithm (including another encryption key) stored in the controller.
Finally, the electric compressor sends a second encryption result obtained by encrypting the seed data to the server and compares the second encryption result with the first encryption result in the server; or the electric compressor directly obtains the first encryption result from the server and compares the first encryption result with the second encryption result in a controller of the electric compressor. If the first encryption result is the same as the second encryption result, the encryption algorithm stored in the electric compressor is identical to the encryption algorithm stored in the server, and the encryption results obtained by carrying out encryption operation on the two encryption algorithms based on the seed data are the same, namely the electric compressor can establish communication connection with the server on the premise of ensuring the data safety. At this time, the external feature vector may be written into an external memory connected to a controller in the electric compressor to perform external feature configuration for the electric compressor. And the external feature vector is written into an external memory connected to a controller in the motor-driven compressor in order to ensure a quick configuration.
And S130, acquiring internal characteristic information of the electric compressor based on the hardware circuit information of the electric compressor so as to determine an internal characteristic vector from the internal characteristic information.
In this embodiment, when the electric compressor completes the external feature configuration, the internal feature information of the electric compressor may also be acquired based on the hardware circuit information of the electric compressor at this time. The method specifically adopts a plurality of voltage dividing circuits to collect the resistance voltage dividing ratio of each sampling port of the controller of the electric compressor so as to determine the internal characteristic information of the electric compressor.
In one embodiment, as shown in fig. 4, step S130 includes:
s131, acquiring a first resistance voltage division value of a first analog sampling port of a controller in the electric compressor based on a first detection branch in the resistance voltage division circuit, and determining the hardware version data based on a first voltage division ratio value determined by the first resistance voltage division value and a preset hardware version-voltage division ratio mapping relation;
s132, acquiring a second resistance voltage division value of a second analog sampling port of the controller in the electric compressor based on a second detection branch in the resistance voltage division circuit, and determining logic data of the driving circuit based on a second voltage division ratio value determined by the second resistance voltage division value and a preset logic-voltage division ratio mapping relation of the driving circuit;
s133, acquiring a third resistance voltage division value of a third analog sampling port of the controller in the electric compressor based on a third detection branch in the resistance voltage division circuit, and determining the voltage sampling reference data based on a third voltage division ratio value determined by the third resistance voltage division value and a preset voltage sampling reference-voltage division ratio mapping relation;
S134, acquiring a fourth resistor voltage division value of a fourth analog sampling port of the controller in the electric compressor based on a fourth detection branch in the resistor voltage division circuit, and determining the current sampling reference data based on a fourth voltage division ratio value determined by the fourth resistor voltage division value and a preset current sampling reference-voltage division ratio mapping relation;
s135, the internal characteristic information is composed of the hardware version data, the driving circuit logic data, the voltage sampling reference data and the current sampling reference data.
In this embodiment, referring to fig. 5, a first detection branch in the resistor divider circuit is connected to a first analog sampling port of the controller in the electric compressor, a second detection branch in the resistor divider circuit is connected to a second analog sampling port of the controller in the electric compressor, a third detection branch in the resistor divider circuit is connected to a third analog sampling port of the controller in the electric compressor, and a fourth detection branch in the resistor divider circuit is connected to a fourth analog sampling port of the controller in the electric compressor. After the electric connection relation between the resistor divider circuit and each analog sampling port of the controller in the electric compressor is completed, the hardware version data, the driving circuit logic data, the voltage sampling reference data and the current sampling reference data can be further obtained.
The process of acquiring hardware version data is described as an example. For example, two resistors included in the first detection branch are respectively denoted as a first resistor R1 and a second resistor R2, wherein one end of the first resistor R1 is connected to a 3.3V power supply, the other end of the first resistor R1 is connected to one end of the second resistor R2, the other end of the first resistor R1 is further connected to a first analog sampling port of a controller in the electric compressor, and the other end of the second resistor R2 is grounded. After the first resistor voltage division value of the first analog sampling port of the controller in the electric compressor is obtained based on the first detection branch in the resistor voltage division circuit, if the first resistor voltage division value is 0.33V, the resistance value of the first resistor R1 is 1/9 of the resistance value of the second resistor R2, and the first resistor voltage division value is 0.33V/3.3v=0.1. For example, in the preset mapping relationship of hardware version-voltage division ratio, a corresponding hardware version V1.0 of 0.1 (±10%) is set, a corresponding hardware version V2.0 of 0.2 (±10%) is set, … …, a corresponding hardware version V10.0 of 1.0 (±10%) is set, etc., and then after the first voltage division ratio value is obtained, the hardware version data can be determined by combining the mapping relationship of hardware version-voltage division ratio.
The process of obtaining the logic data of the driving circuit is described later, and more specifically, two resistors included in the second detection branch are respectively denoted as a third resistor R3 and a fourth resistor R4, wherein one end of the third resistor R3 is connected to a 3.3V power supply, the other end of the third resistor R3 is connected to one end of the fourth resistor R4, the other end of the third resistor R3 is further connected to a second analog sampling port of the controller in the electric compressor, and the other end of the fourth resistor R4 is grounded. After the second resistance voltage division value of the second analog sampling port of the controller in the electric compressor is obtained based on the second detection branch in the resistance voltage division circuit, if the second resistance voltage division value is 0.66V, the resistance value of the third resistor R3 is 1/4 of the resistance value of the fourth resistor R4, and the second resistance voltage division value is 0.66V/3.3v=0.2. For example, a preset driving circuit logic-voltage division ratio mapping relationship is set that second voltage division ratio values of 0.5 and below 0.5 are valid corresponding to low level and second voltage division ratio values of 0.5 and above are valid corresponding to high level, and after the second voltage division ratio value is obtained, the driving circuit logic data can be determined by combining the driving circuit logic-voltage division ratio mapping relationship.
Then, the process of acquiring the voltage sampling reference data will be described, for example, more specifically, two resistors included in the third detection branch are respectively denoted as a fifth resistor R5 and a sixth resistor R6, where one end of the fifth resistor R5 is connected to a 3.3V power supply, the other end of the fifth resistor R5 is connected to one end of the sixth resistor R6, the other end of the fifth resistor R5 is further connected to a third analog sampling port of the controller in the electric compressor, and the other end of the sixth resistor R6 is grounded. After the third resistance voltage division value of the third analog sampling port of the controller in the electric compressor is obtained based on the third detection branch in the resistance voltage division circuit, if the third resistance voltage division value is 1.65V, the resistance value of the fifth resistor R5 is 1/1 of the resistance value of the sixth resistor R6, and the third resistance voltage division value is 1.65V/3.3v=0.5. For example, in the preset mapping relationship of voltage sampling reference and voltage division ratio, a voltage sampling reference 200V corresponding to 0.1 (±10%) is set, a voltage sampling reference 400V corresponding to 0.2 (±10%) is set, a voltage sampling reference 2000V corresponding to 1.0 is set, and the like, and after the third voltage division ratio value is obtained, the voltage sampling reference data can be determined by combining the mapping relationship of voltage sampling reference and voltage division ratio.
Finally, the process of obtaining the current sampling reference data is described, for example, more specifically, two resistors included in the fourth detection branch are respectively denoted as a seventh resistor R7 and an eighth resistor R8, wherein one end of the seventh resistor R7 is connected to a 3.3V power supply, the other end of the seventh resistor R7 is connected to one end of the eighth resistor R8, the other end of the seventh resistor R7 is further connected to a fourth analog sampling port of the controller in the electric compressor, and the other end of the eighth resistor R8 is grounded. After the fourth resistance voltage division value of the fourth analog sampling port of the controller in the electric compressor is obtained based on the fourth detection branch in the resistance voltage division circuit, if the fourth resistance voltage division value is 1.65V, the resistance value of the seventh resistor R7 is 1/1 of the resistance value of the eighth resistor R8, and the fourth resistance voltage division value is 1.65V/3.3v=0.5. For example, in the preset mapping relationship of current sampling reference-voltage division ratio, a corresponding current sampling reference 30A of 0.1 (±10%) is set, a corresponding current sampling reference 40A of 0.2 (±10%) is set, … …, a corresponding current sampling reference 120A of 1.0 is set, etc., and after the fourth voltage division ratio value is obtained, the current sampling reference data can be determined by combining the mapping relationship of current sampling reference-voltage division ratio.
In an embodiment, step S135 further includes:
and if the controller in the electric compressor is detected to be electrified for the first time, writing the internal characteristic vector into a memory of the controller in the electric compressor.
In this embodiment, when the resistor voltage division ratio of each sampling port of the controller of the electric compressor is collected based on the plurality of voltage division circuits to determine the internal feature information of the electric compressor and determine the internal feature vector, it may also be determined whether the controller of the electric compressor is powered on for the first time. If the controller in the electric compressor is powered on for the first time, that is, the resistor divider circuit is connected to a plurality of analog sampling ports of the controller, the internal feature vector is written into a memory of the controller in the electric compressor after the internal feature vector is obtained. After the resistor divider circuit is disconnected with the controller, the internal feature vector is directly obtained from a memory of the controller in the electric compressor after the electric compressor is not electrified for the first time, and a plurality of analog sampling ports of the controller are not needed to be taken for obtaining each resistor divider value, so that the efficiency of subsequently obtaining the internal feature vector is improved.
And S140, calculating the external feature vector and the internal feature vector based on a preset vector calculation strategy to obtain a final feature vector.
In this embodiment, after the external feature vector and the internal feature vector are obtained by the controller of the electric compressor, a locally stored vector operation policy of the electric compressor may be obtained, and then the external feature vector and the internal feature vector are operated based on the vector operation policy, so as to obtain a final feature vector that may characterize the electric compressor.
In one embodiment, step S140 includes:
and taking the aggregation of the external feature vector and the internal feature vector as a final feature vector.
In this embodiment, the predetermined vector operation strategy is a vector aggregation budget, and the vector aggregation operation in this application can be understood as concatenating two feature vectors into one vector, for example, the external feature vector is denoted as X and x= [ V1.0, X1, X2, X3, X4, X5], that is, X is a row vector of 1*6. As another example, the internal eigenvector is denoted as Y and y= [ V1.0, Y1, Y2, Y3], i.e. Y is a row vector of 1*4. When the final feature vector obtained after the connection processing of the two feature vectors of X and Y according to the preceding Y of X is denoted by Z, then z= [ V1.0, X1, X2, X3, X4, X5, V1.0, Y1, Y2, Y3], i.e. Z is a row vector of 1X 10. Based on the vector operation, the internal characteristics and the external characteristics of the electric compressor are effectively integrated, and the integrated characteristics with more information dimensions are obtained.
And S150, if a software initialization instruction of the electric compressor is detected, determining target electric compressor driver software in the electric compressor driver software set based on the final feature vector, and performing software initialization configuration of the electric compressor according to the target electric compressor driver software.
In this embodiment, since the integrated feature vector is stored in the controller of the electric compressor, when it is detected that the electric compressor needs to be configured for software initialization, a software initialization instruction is detected. After a software initialization instruction is detected, a final feature vector of the electric compressor is obtained, then target electric compressor driver software is determined in a server-stored electric compressor driver software set comprising a plurality of versions of electric compressor driver software (wherein each electric compressor driver software set corresponds to a final feature vector of an electric compressor), and after the target electric compressor driver software matched with the final feature vector is determined in the server, software initialization configuration of the electric compressor is carried out according to the target electric compressor driver software, so that automatic configuration of the adaptive software based on the electric compressor feature vector is realized, a user does not need to manually find a proper version and manually adapt, and the adaptive efficiency is improved.
Therefore, in the method, the final feature vector containing the multidimensional information of the electric compressor is automatically and rapidly obtained in the process of adapting the driving software of the electric compressor, the target electric compressor driver software which is adapted to be finally loaded is automatically determined in the electric compressor driver software set based on the final feature vector, a large amount of electric compressor controller software is manually removed after the parameters of the electric compressor are not required to be manually obtained, the corresponding download adapted software version is determined, and the adapting efficiency of the electric compressor controller software is improved.
The embodiment of the application also provides an electric compressor driver software flexible configuration device which is used for executing any embodiment of the electric compressor driver software flexible configuration method. Specifically, referring to fig. 6, fig. 6 is a schematic block diagram of an electric compressor driver software flexible configuration device 100 provided in an embodiment of the present application, where the electric compressor driver software flexible configuration device 100 is configured in an MES system, and the MES system includes a server, an industrial camera, and an electric compressor initialized by software to be driven, where the industrial camera and the electric compressor initialized by software to be driven are both communicatively connected to the server.
As shown in fig. 6, the electric compressor driver software flexible configuration apparatus 100 includes an external feature vector acquisition unit 110, an external feature vector configuration unit 120, an internal feature vector acquisition unit 130, a final feature vector acquisition unit 140, and a software initialization configuration unit 150.
An external feature vector obtaining unit 110 for obtaining external feature information of the electric compressor based on a plurality of two-dimensional codes of the electric compressor to determine an external feature vector from the external feature information.
In the present embodiment, the motor-driven compressor is used to acquire the external characteristic information thereof from the start of the assembly process. For example, the electric compressor comprises a power device of the electric compressor driver, a motor of the electric compressor, a shell of the electric compressor driver and other structures, and two-dimensional codes can be adhered or inscribed on the structures of the electric compressor. The two-dimensional code stuck on each structure in the structures included in the electric compressor can be scanned by a code scanning device (such as an industrial camera) to obtain external information corresponding to the corresponding structure.
For example, in the assembling process of the electric compressor, step 1 is to fix the electric compressor motor, and when the electric compressor motor is fixedly placed on the electric compressor installation production line and moves to the lower side of the industrial camera along with the electric compressor installation production line, the two-dimensional code pasted on the electric compressor motor is collected by the industrial camera, and then the two-dimensional code is identified and the first sub external characteristic information corresponding to the electric compressor motor is obtained. If the step 2 of the assembly process of the electric compressor is to fix the power device of the electric compressor, and the electric compressor motor moves to the lower part of the industrial camera along with the installation production line of the electric compressor, the two-dimensional code pasted on the power device of the electric compressor is collected by the industrial camera, and then the two-dimensional code is identified and second sub-external characteristic information corresponding to the power device of the electric compressor is acquired. And by analogy, when the installation process of the electric compressor is completed, sub external characteristic information of a plurality of component parts is acquired. If it is determined that the version of the external characteristic information of the electric compressor collected at this time is the V1.0 version (or the V2.0 version, the V3.0 version, or the like), the version of the external characteristic information may also be used as one piece of sub external characteristic information.
Of course, finally, a two-dimensional code can be adhered or inscribed on the shell of the electric compressor driver, and the two-dimensional code is collected by the industrial camera, so that the comprehensive external characteristic information comprising all the sub external characteristic information can be obtained after the two-dimensional code is identified. The external characteristic information may be understood as one total directory information in which a plurality of sub-directory information, each corresponding to one sub-external characteristic information of the electric compressor, are included. After the external feature information of the electric compressor is obtained, the external feature information is sequenced based on a preset sequencing strategy and then combined to obtain an external feature vector.
In one embodiment, the external feature vector obtaining unit 110 is specifically configured to:
acquiring a plurality of two-dimensional codes of the electric compressor through an industrial camera in an MES system;
the external feature version numbers, the compressor displacement data, the voltage platform data, the host factory communication matrix data, the client information data and the permanent magnet synchronous motor model data corresponding to the two-dimension codes are obtained by identifying the two-dimension codes, and the external feature information is formed;
And the external feature vector is formed by sequentially concatenating the external feature version number, the compressor displacement data, the voltage platform data, the host factory communication matrix data, the client information data and the permanent magnet synchronous motor model data in the external feature information.
In this embodiment, taking a complete assembly process of the electric compressor as an example, after a plurality of two-dimensional codes on each component of the electric compressor are acquired and identified by an industrial camera in an MES system (MES is fully called Manufacturing Execution System and represents a manufacturing execution system) in the complete assembly process of the electric compressor, external feature version numbers (such as V1.0, V2.0, V3.0, etc.), compressor displacement data (such as 27cc, 34cc, 45cc, etc.), voltage platform data (such as 96V, 320V, 500V, 800V, etc.), host factory communication matrix data (such as A1, A2, A3, etc.), customer information data (such as B1, B2, B3, etc.), permanent magnet synchronous motor model number data (such as C1, C2, C3, etc.) corresponding to the plurality of two-dimensional codes respectively can be obtained.
More specifically, the external feature version number and the compressor displacement data can be obtained by two-dimension code identification arranged on the shell of the electric compressor driver, the voltage platform data is obtained by two-dimension code identification arranged on the power device of the electric compressor driver, and the host factory communication matrix data, the client information data and the permanent magnet synchronous motor model data are obtained by two-dimension code identification arranged on the motor of the electric compressor. After the above-mentioned all sub external characteristic information is obtained, according to the external characteristic version number, compressor displacement data, voltage platform data, main machine factory communication matrix data, customer information data and permanent magnet synchronous motor model data correspondent to the sorting strategy, all sub external characteristic information of electric compressor can be orderly series-connected to form the described external characteristic vector. For example, the external feature version number of the motor-driven compressor is V1.0, the compressor displacement data is 27cc (X1 may be used for compressor displacement data, X1=27 cc may be used for compressor displacement data is 27 cc), the voltage platform data is 96V (X2 may be used for voltage platform data, X2=96V may be used for voltage platform data is 96V), the host factory communication matrix data is A1 (X3 may be used for host factory communication matrix data, X3=a1 may be used for host factory communication matrix data is A1), the customer information data is B1 (X4 may be used for customer information data, X4=b1 may be used for customer information data is B1), and the permanent magnet synchronous motor model data is C1 (X5 may be used for permanent magnet synchronous motor model data, and X5=c1 may be used for permanent magnet synchronous motor model data). The external feature version number V1.0 of the electric compressor, the compressor displacement data 27cc, the voltage platform data 96V, the host factory communication matrix data A1, the client information data B1 and the permanent magnet synchronous motor model data C1 are sequentially connected in series to form an external feature vector. If the external feature vector is represented by X, x= [ V1.0, X1, X2, X3, X4, X5]. It can be seen that based on the scanning and recognition of the two-dimensional codes of each component of the electric compressor in the assembly process, the obtained sub-external feature information can be finally composed into external feature information and converted into external feature vectors.
An external feature vector configuration unit 120, configured to perform external feature configuration on the electric compressor according to the external feature vector.
In this embodiment, after the server in the MES system scans the two-dimensional codes of the electric compressor based on the industrial camera to obtain the external feature information of the electric compressor and finally converts the external feature information into the external feature vector, the server in the MES system needs to perform external feature configuration locally, so that the external feature vector is configured and stored in the server in the MES system.
In one embodiment, the external feature vector configuration unit 120 is specifically configured to:
establishing communication connection between a server in the MES system and the electric compressor;
the server in the MES system sends seed data to the electric compressor;
the MES system sends a first encryption result obtained by encrypting the seed data and the local encryption key to the electric compressor;
the electric compressor encrypts based on the seed data and another encryption key stored locally to obtain a second encryption result;
and if the electric compressor determines that the first encryption result is the same as the second encryption result, determining that the encryption key and the other encryption key pass verification, and writing the external feature vector into an external memory connected with a controller in the electric compressor so as to perform external feature configuration on the electric compressor.
In this embodiment, in order to implement configuration of external features of the electric compressor by the server in the MES system (which may also be understood as an upper computer, an upper PC terminal, etc., communication connection between the MES system and the electric compressor is first established, more specifically, communication connection between the server in the MES system and the controller in the electric compressor is established, in which LIN (which is a serial communication network based on a LIN bus, which is generally called Local Interconnect Network, and represents a local interconnect network) and CANFD (which may also be simply called CAN-FD, which may be understood as an upgraded version of the CAN protocol, only the protocol is upgraded, the physical layer is unchanged, and the CAN is generally called Controller Area Network and represents a local bus of the controller) and ethernet are used to establish communication connection between the server in the MES system and the controller in the electric compressor.
Then, a server in the MES system transmits pre-stored seed data to a controller of the electric compressor. Since the seed data is also included in the server of the MES system, encryption operations can be performed in the server of the MES system and the controller of the electric compressor based on the seed data and the encryption key, respectively, to obtain a first encryption result and a second encryption result. The first encryption result is obtained by carrying out encryption operation on seed data in a server of the MES system based on an encryption algorithm (comprising an encryption key) stored in the server; the second encryption result is obtained by performing encryption operation on seed data in the controller of the electric compressor based on an encryption algorithm (including another encryption key) stored in the controller.
Finally, the electric compressor sends a second encryption result obtained by encrypting the seed data to the server and compares the second encryption result with the first encryption result in the server; or the electric compressor directly obtains the first encryption result from the server and compares the first encryption result with the second encryption result in a controller of the electric compressor. If the first encryption result is the same as the second encryption result, the encryption algorithm stored in the electric compressor is identical to the encryption algorithm stored in the server, and the encryption results obtained by carrying out encryption operation on the two encryption algorithms based on the seed data are the same, namely the electric compressor can establish communication connection with the server on the premise of ensuring the data safety. At this time, the external feature vector may be written into an external memory connected to a controller in the electric compressor to perform external feature configuration for the electric compressor. And the external feature vector is written into an external memory connected to a controller in the motor-driven compressor in order to ensure a quick configuration.
An internal feature vector acquisition unit 130 for acquiring internal feature information of the electric compressor based on hardware circuit information of the electric compressor to determine an internal feature vector from the internal feature information.
In this embodiment, when the electric compressor completes the external feature configuration, the internal feature information of the electric compressor may also be acquired based on the hardware circuit information of the electric compressor at this time. The method specifically adopts a plurality of voltage dividing circuits to collect the resistance voltage dividing ratio of each sampling port of the controller of the electric compressor so as to determine the internal characteristic information of the electric compressor.
In one embodiment, the internal feature vector obtaining unit 130 is specifically configured to:
acquiring a first resistance voltage division value of a first analog sampling port of a controller in the electric compressor based on a first detection branch in the resistance voltage division circuit, and determining the hardware version data based on a first voltage division ratio value determined by the first resistance voltage division value and a preset hardware version-voltage division ratio mapping relation;
acquiring a second resistance voltage division value of a second analog sampling port of the controller in the electric compressor based on a second detection branch in the resistance voltage division circuit, and determining logic data of the driving circuit based on a second voltage division ratio value determined by the second resistance voltage division value and a preset logic-voltage division ratio mapping relation of the driving circuit;
acquiring a third resistance voltage division value of a third analog sampling port of the controller in the electric compressor based on a third detection branch in the resistance voltage division circuit, and determining the voltage sampling reference data based on a third voltage division ratio value determined by the third resistance voltage division value and a preset voltage sampling reference-voltage division ratio mapping relation;
Acquiring a fourth resistance voltage division value of a fourth analog sampling port of the controller in the electric compressor based on a fourth detection branch in the resistance voltage division circuit, and determining the current sampling reference data based on a fourth voltage division ratio value determined by the fourth resistance voltage division value and a preset current sampling reference-voltage division ratio mapping relation;
and the internal characteristic information is composed of the hardware version data, the driving circuit logic data, the voltage sampling reference data and the current sampling reference data.
In this embodiment, referring to fig. 5, a first detection branch in the resistor divider circuit is connected to a first analog sampling port of the controller in the electric compressor, a second detection branch in the resistor divider circuit is connected to a second analog sampling port of the controller in the electric compressor, a third detection branch in the resistor divider circuit is connected to a third analog sampling port of the controller in the electric compressor, and a fourth detection branch in the resistor divider circuit is connected to a fourth analog sampling port of the controller in the electric compressor. After the electric connection relation between the resistor divider circuit and each analog sampling port of the controller in the electric compressor is completed, the hardware version data, the driving circuit logic data, the voltage sampling reference data and the current sampling reference data can be further obtained.
The process of acquiring hardware version data is described as an example. For example, two resistors included in the first detection branch are respectively denoted as a first resistor R1 and a second resistor R2, wherein one end of the first resistor R1 is connected to a 3.3V power supply, the other end of the first resistor R1 is connected to one end of the second resistor R2, the other end of the first resistor R1 is further connected to a first analog sampling port of a controller in the electric compressor, and the other end of the second resistor R2 is grounded. After the first resistor voltage division value of the first analog sampling port of the controller in the electric compressor is obtained based on the first detection branch in the resistor voltage division circuit, if the first resistor voltage division value is 0.33V, the resistance value of the first resistor R1 is 1/9 of the resistance value of the second resistor R2, and the first resistor voltage division value is 0.33V/3.3v=0.1. For example, in the preset mapping relationship of hardware version-voltage division ratio, a corresponding hardware version V1.0 of 0.1 (±10%) is set, a corresponding hardware version V2.0 of 0.2 (±10%) is set, … …, a corresponding hardware version V10.0 of 1.0 (±10%) is set, etc., and then after the first voltage division ratio value is obtained, the hardware version data can be determined by combining the mapping relationship of hardware version-voltage division ratio.
The process of obtaining the logic data of the driving circuit is described later, and more specifically, two resistors included in the second detection branch are respectively denoted as a third resistor R3 and a fourth resistor R4, wherein one end of the third resistor R3 is connected to a 3.3V power supply, the other end of the third resistor R3 is connected to one end of the fourth resistor R4, the other end of the third resistor R3 is further connected to a second analog sampling port of the controller in the electric compressor, and the other end of the fourth resistor R4 is grounded. After the second resistance voltage division value of the second analog sampling port of the controller in the electric compressor is obtained based on the second detection branch in the resistance voltage division circuit, if the second resistance voltage division value is 0.66V, the resistance value of the third resistor R3 is 1/4 of the resistance value of the fourth resistor R4, and the second resistance voltage division value is 0.66V/3.3v=0.2. For example, a preset driving circuit logic-voltage division ratio mapping relationship is set that second voltage division ratio values of 0.5 and below 0.5 are valid corresponding to low level and second voltage division ratio values of 0.5 and above are valid corresponding to high level, and after the second voltage division ratio value is obtained, the driving circuit logic data can be determined by combining the driving circuit logic-voltage division ratio mapping relationship.
Then, the process of acquiring the voltage sampling reference data will be described, for example, more specifically, two resistors included in the third detection branch are respectively denoted as a fifth resistor R5 and a sixth resistor R6, where one end of the fifth resistor R5 is connected to a 3.3V power supply, the other end of the fifth resistor R5 is connected to one end of the sixth resistor R6, the other end of the fifth resistor R5 is further connected to a third analog sampling port of the controller in the electric compressor, and the other end of the sixth resistor R6 is grounded. After the third resistance voltage division value of the third analog sampling port of the controller in the electric compressor is obtained based on the third detection branch in the resistance voltage division circuit, if the third resistance voltage division value is 1.65V, the resistance value of the fifth resistor R5 is 1/1 of the resistance value of the sixth resistor R6, and the third resistance voltage division value is 1.65V/3.3v=0.5. For example, in the preset mapping relationship of voltage sampling reference and voltage division ratio, a voltage sampling reference 200V corresponding to 0.1 (±10%) is set, a voltage sampling reference 400V corresponding to 0.2 (±10%) is set, a voltage sampling reference 2000V corresponding to 1.0 is set, and the like, and after the third voltage division ratio value is obtained, the voltage sampling reference data can be determined by combining the mapping relationship of voltage sampling reference and voltage division ratio.
Finally, the process of obtaining the current sampling reference data is described, for example, more specifically, two resistors included in the fourth detection branch are respectively denoted as a seventh resistor R7 and an eighth resistor R8, wherein one end of the seventh resistor R7 is connected to a 3.3V power supply, the other end of the seventh resistor R7 is connected to one end of the eighth resistor R8, the other end of the seventh resistor R7 is further connected to a fourth analog sampling port of the controller in the electric compressor, and the other end of the eighth resistor R8 is grounded. After the fourth resistance voltage division value of the fourth analog sampling port of the controller in the electric compressor is obtained based on the fourth detection branch in the resistance voltage division circuit, if the fourth resistance voltage division value is 1.65V, the resistance value of the seventh resistor R7 is 1/1 of the resistance value of the eighth resistor R8, and the fourth resistance voltage division value is 1.65V/3.3v=0.5. For example, in the preset mapping relationship of current sampling reference-voltage division ratio, a corresponding current sampling reference 30A of 0.1 (±10%) is set, a corresponding current sampling reference 40A of 0.2 (±10%) is set, … …, a corresponding current sampling reference 120A of 1.0 is set, etc., and after the fourth voltage division ratio value is obtained, the current sampling reference data can be determined by combining the mapping relationship of current sampling reference-voltage division ratio.
In an embodiment, the internal feature vector acquisition unit 130 is further configured to:
and if the controller in the electric compressor is detected to be electrified for the first time, writing the internal characteristic vector into a memory of the controller in the electric compressor.
In this embodiment, when the resistor voltage division ratio of each sampling port of the controller of the electric compressor is collected based on the plurality of voltage division circuits to determine the internal feature information of the electric compressor and determine the internal feature vector, it may also be determined whether the controller of the electric compressor is powered on for the first time. If the controller in the electric compressor is powered on for the first time, that is, the resistor divider circuit is connected to a plurality of analog sampling ports of the controller, the internal feature vector is written into a memory of the controller in the electric compressor after the internal feature vector is obtained. After the resistor divider circuit is disconnected with the controller, the internal feature vector is directly obtained from a memory of the controller in the electric compressor after the electric compressor is not electrified for the first time, and a plurality of analog sampling ports of the controller are not needed to be taken for obtaining each resistor divider value, so that the efficiency of subsequently obtaining the internal feature vector is improved.
And a final feature vector obtaining unit 140, configured to calculate the external feature vector and the internal feature vector based on a preset vector calculation policy, so as to obtain a final feature vector.
In this embodiment, after the external feature vector and the internal feature vector are obtained by the controller of the electric compressor, a locally stored vector operation policy of the electric compressor may be obtained, and then the external feature vector and the internal feature vector are operated based on the vector operation policy, so as to obtain a final feature vector that may characterize the electric compressor.
In one embodiment, the final feature vector obtaining unit 140 is specifically configured to:
and taking the aggregation of the external feature vector and the internal feature vector as a final feature vector.
In this embodiment, the predetermined vector operation strategy is a vector aggregation budget, and the vector aggregation operation in this application can be understood as concatenating two feature vectors into one vector, for example, the external feature vector is denoted as X and x= [ V1.0, X1, X2, X3, X4, X5], that is, X is a row vector of 1*6. As another example, the internal eigenvector is denoted as Y and y= [ V1.0, Y1, Y2, Y3], i.e. Y is a row vector of 1*4. When the final feature vector obtained after the connection processing of the two feature vectors of X and Y according to the preceding Y of X is denoted by Z, then z= [ V1.0, X1, X2, X3, X4, X5, V1.0, Y1, Y2, Y3], i.e. Z is a row vector of 1X 10. Based on the vector operation, the internal characteristics and the external characteristics of the electric compressor are effectively integrated, and the integrated characteristics with more information dimensions are obtained.
And the software initialization configuration unit 150 is configured to determine, if a software initialization instruction of the electric compressor is detected, a target electric compressor driver software in the electric compressor driver software set based on the final feature vector, and perform software initialization configuration of the electric compressor according to the target electric compressor driver software.
In this embodiment, since the integrated feature vector is stored in the controller of the electric compressor, when it is detected that the electric compressor needs to be configured for software initialization, a software initialization instruction is detected. After a software initialization instruction is detected, a final feature vector of the electric compressor is obtained, then target electric compressor driver software is determined in a server-stored electric compressor driver software set comprising a plurality of versions of electric compressor driver software (wherein each electric compressor driver software set corresponds to a final feature vector of an electric compressor), and after the target electric compressor driver software matched with the final feature vector is determined in the server, software initialization configuration of the electric compressor is carried out according to the target electric compressor driver software, so that automatic configuration of the adaptive software based on the electric compressor feature vector is realized, a user does not need to manually find a proper version and manually adapt, and the adaptive efficiency is improved.
Therefore, in the embodiment of the device, the final feature vector containing the multidimensional information of the electric compressor is automatically and rapidly acquired in the process of adapting the driving software of the electric compressor, the target electric compressor driver software which is adapted to be finally loaded is automatically determined in the electric compressor driver software set based on the final feature vector, a large number of electric compressor controller software is manually removed after the parameters of the electric compressor are not required to be manually acquired, the corresponding software version for downloading and adapting is determined, and the adapting efficiency of the electric compressor controller software is improved.
The above-described motorized compressor driver software flexible configuration means may be implemented in the form of a computer program that can be run on a computer device as shown in fig. 7.
Referring to fig. 7, fig. 7 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 500 is an MES system in which a server, an industrial camera, and an electric compressor to be initialized by the driving software are included, wherein the industrial camera and the electric compressor to be initialized by the driving software are all in communication with the server.
With reference to fig. 7, the computer device 500 includes a processor 502, a memory, and a network interface 505, which are connected by a device bus 501, where the memory may include a storage medium 503 and an internal memory 504.
The storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032, when executed, may cause the processor 502 to perform an electric compressor driver software flexible configuration method.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the execution of a computer program 5032 in the storage medium 503, which computer program 5032, when executed by the processor 502, causes the processor 502 to perform the motor compressor driver software flexible configuration method.
The network interface 505 is used for network communication, such as providing for transmission of data information, etc. Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of a portion of the architecture in connection with the present application and is not intended to limit the computer device 500 to which the present application is applied, and that a particular computer device 500 may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
The processor 502 is configured to execute a computer program 5032 stored in a memory, so as to implement the method for flexibly configuring the software of the motor-driven compressor driver disclosed in the embodiment of the application.
Those skilled in the art will appreciate that the embodiment of the computer device shown in fig. 7 is not limiting of the specific construction of the computer device, and in other embodiments, the computer device may include more or less components than those shown, or certain components may be combined, or a different arrangement of components. For example, in some embodiments, the computer device may include only a memory and a processor, and in such embodiments, the structure and function of the memory and the processor are consistent with the embodiment shown in fig. 7, and will not be described again.
It should be appreciated that in embodiments of the present application, the processor 502 may be a central processing unit (Central Processing Unit, CPU), the processor 502 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSPs), application specific integrated circuits (Application Specific Integrated Circuit, ASICs), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In another embodiment of the present application, a computer-readable storage medium is provided. The computer readable storage medium may be a nonvolatile computer readable storage medium or a volatile computer readable storage medium. The computer readable storage medium stores a computer program, wherein the computer program when executed by a processor implements the method for flexibly configuring the motor-driven compressor driver software disclosed in the embodiments of the present application.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus, device and unit described above may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein. Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus, device, and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, for example, the division of the units is merely a logical function division, there may be another division manner in actual implementation, or units having the same function may be integrated into one unit, for example, multiple units or components may be combined or may be integrated into another apparatus, or some features may be omitted, or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices, or elements, or may be an electrical, mechanical, or other form of connection.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purposes of the embodiments of the present application.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units may be stored in a storage medium if implemented in the form of software functional units and sold or used as stand-alone products. Based on such understanding, the technical solution of the present application is essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a background server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.