A data processing method and device for OPC authorization of mechanical equipment
By encoding and verifying the authorization requests for mechanical equipment, the security and flexibility issues of traditional OPC authorization methods are resolved, achieving higher security and flexibility of the authorization system.
Patent Information
- Application Number
- CN202111627550.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2041-12-28
AI Technical Summary
Traditional OPC authorization methods have security issues and lack flexibility, and are easily cracked.
By detecting the authorization request of mechanical equipment, encoding processing is performed to generate authorization code information, and verification is performed after data transmission to ensure the integrity and consistency of the authorization information.
Improves the security and flexibility of OPC authorization and prevents the authorization system from being cracked.
Smart Images

Figure CN114417265B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a data processing method and device for OPC authorization of mechanical equipment. Background Art
[0002] The rapid development of computer technology has provided strong support for the development of numerical control systems. The traditional OPC authorization method is that the manufacturer directly develops a registration machine software and distributes it to the user. The user enters the serial number in the authorization system to obtain the registration code, and then enters the registration code into the OPC authorization interface for verification, finally completing the registration of the mechanical equipment. Traditional OPC authorization is prone to security issues and is not very flexible because it uses an offline authorization method. Therefore, it is particularly important to provide a data processing method and device for OPC authorization of mechanical equipment to prevent the OPC authorization system from being cracked, thereby improving the security and flexibility of OPC authorization for mechanical equipment. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a data processing method and device for OPC authorization of mechanical equipment, which can detect the authorization request of mechanical equipment, perform encoding processing and data information transmission processing on it, and then verify the first authorization code information to obtain verification result information for OPC authorization of mechanical equipment, which is beneficial to prevent the OPC authorization system from being cracked, thereby improving the security and flexibility of OPC authorization of mechanical equipment.
[0004] In order to solve the above technical problems, a first aspect of an embodiment of the present invention discloses a data processing method for OPC authorization of mechanical equipment, the method comprising:
[0005] Detecting whether a mechanical device authorization request is received to obtain a first detection result; the mechanical device authorization request includes mechanical device number information;
[0006] When the first detection result is yes, the mechanical device authorization request is encoded to obtain first authorization code information; the first authorization code information includes authorization period information, and / or authorized device number information, and / or first encryption key information;
[0007] Transmitting data of the first authorization code information and determining whether the data has been transmitted completely to obtain a transmission determination result;
[0008] When the transmission judgment result is yes, the transmitted first authorization code information is verified to obtain verification result information; the verification result information is used to indicate the OPC authorization of the mechanical equipment.
[0009] As an optional implementation manner, in the first aspect of the embodiment of the present invention, encoding the mechanical device authorization request to obtain the first authorization code information includes:
[0010] Obtaining usage period information corresponding to the mechanical device authorization request; the usage period information is associated with the sending object of the mechanical device authorization request;
[0011] The usage period information and the mechanical equipment number information are processed to obtain first authorization code information.
[0012] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the processing of the usage period information and the mechanical equipment number information to obtain the first authorization code information includes:
[0013] Determining a target key from a preset set of standby keys; the target key is associated with the first encryption key information;
[0014] The target key, the usage period information and the authorization device number information are encoded according to a preset encoding format to obtain first authorization code information.
[0015] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the verifying the transmitted first authorization code information to obtain verification result information includes:
[0016] Parsing the transmitted first authorization code information to obtain decoding information;
[0017] Encoding the decoded information to obtain second authorization code information;
[0018] The first authorization code information and the second authorization code information are compared and analyzed to obtain verification result information.
[0019] As an optional implementation manner, in the first aspect of the embodiment of the present invention, encoding the decoded information to obtain the second authorization code information includes:
[0020] Retrieve a device key; the device key is associated with the target key; the device key stored in any mechanical device is unique;
[0021] The device key and the decoding information are encoded to obtain second authorization code information.
[0022] As an optional implementation manner, in the first aspect of the embodiment of the present invention, when the first detection result is yes, before encoding the mechanical device authorization request to obtain the first authorization code information, the method further includes:
[0023] detecting whether a key change request is received, and obtaining a second detection result;
[0024] When the second detection result is yes, compile and generate a waiting key corresponding to the key change request;
[0025] Updating the standby key corresponding to the key change request using the standby key;
[0026] The device key corresponding to the key change request is updated using the key to be activated.
[0027] As an optional implementation manner, in the first aspect of the embodiment of the present invention, before transmitting the first authorization code information and determining whether the data is transmitted completely, and obtaining the transmission determination result, the method further includes:
[0028] Detect whether there is historical authorization code information and obtain the detection result;
[0029] When the detection result is yes, determining whether the mechanical device is in an authorized state and obtaining a state determination result;
[0030] When the status judgment result is no, triggering the execution of the data transmission of the first authorization code information, and judging whether the data transmission is complete, obtaining a transmission judgment result;
[0031] When the detection result is no, the data transmission of the first authorization code information is triggered, and it is determined whether the data is transmitted completely to obtain a transmission determination result.
[0032] A second aspect of an embodiment of the present invention discloses a data processing device for OPC authorization of mechanical equipment, the device comprising:
[0033] A first detection module is configured to detect whether a mechanical device authorization request is received and obtain a first detection result; the mechanical device authorization request includes mechanical device number information;
[0034] a first processing module configured to, when the first detection result is yes, encode the mechanical device authorization request to obtain first authorization code information; the first authorization code information includes authorization period information, and / or authorized device number information, and / or first encryption key information;
[0035] a transmission module, configured to transmit the first authorization code information and determine whether the data has been transmitted completely, thereby obtaining a transmission determination result;
[0036] The verification module is used to verify the first authorization code information after transmission when the transmission judgment result is yes, and obtain verification result information; the verification result information is used to indicate the OPC authorization of the mechanical equipment.
[0037] As an optional implementation manner, in the second aspect of the embodiment of the present invention, the first processing module includes an acquisition submodule and a processing submodule, wherein:
[0038] The acquisition submodule is configured to acquire usage period information corresponding to the mechanical device authorization request; the usage period information is associated with the sending object of the mechanical device authorization request;
[0039] The processing submodule is used to process the usage period information and the mechanical equipment number information to obtain first authorization code information.
[0040] As an optional implementation, in the second aspect of the embodiment of the present invention, the processing submodule processes the usage period information and the mechanical equipment number information to obtain the first authorization code information in the following specific manner:
[0041] Determining a target key from a preset set of standby keys; the target key is associated with the first encryption key information;
[0042] The target key, the usage period information and the authorization device number information are encoded according to a preset encoding format to obtain first authorization code information.
[0043] As an optional implementation, in the second aspect of the embodiment of the present invention, the verification module verifies the transmitted first authorization code information, and obtains the verification result information in the following specific manner:
[0044] Parsing the transmitted first authorization code information to obtain decoding information;
[0045] Encoding the decoded information to obtain second authorization code information;
[0046] The first authorization code information and the second authorization code information are compared and analyzed to obtain verification result information.
[0047] As an optional implementation, in the second aspect of the embodiment of the present invention, the verification module encodes the decoded information to obtain the second authorization code information in the following manner:
[0048] Retrieve a device key; the device key is associated with the target key; the device key stored in any mechanical device is unique;
[0049] The device key and the decoding information are encoded to obtain second authorization code information.
[0050] As such an optional implementation, in the second aspect of the embodiments of the present invention, before the first processing module is configured to encode the mechanical device authorization request to obtain the first authorization code information when the first detection result is yes, the apparatus further includes:
[0051] A second detection module is used to detect whether a key replacement request is received and obtain a second detection result;
[0052] a compiling module, configured to compile and generate a waiting key corresponding to the key replacement request when the second detection result is yes;
[0053] A first updating module, configured to update the standby key corresponding to the key replacement request using the standby key;
[0054] The second updating module is configured to update the device key corresponding to the key replacement request by using the key to be activated.
[0055] As an optional implementation, in the second aspect of the embodiment of the present invention, before the transmission module transmits data on the first authorization code information and determines whether the data is completely transmitted and obtains a transmission judgment result, the transmission module is further used to detect whether there is historical authorization code information and obtain a detection result;
[0056] When the detection result is yes, determining whether the mechanical device is in an authorized state and obtaining a state determination result;
[0057] When the status judgment result is no, triggering the execution of the data transmission of the first authorization code information, and judging whether the data transmission is complete, obtaining a transmission judgment result;
[0058] When the detection result is no, the data transmission of the first authorization code information is triggered, and it is determined whether the data is transmitted completely to obtain a transmission determination result.
[0059] A third aspect of the present invention discloses another data processing device for OPC authorization of mechanical equipment, the device comprising:
[0060] a memory storing executable program code;
[0061] a processor coupled to the memory;
[0062] The processor calls the executable program code stored in the memory to execute part or all of the steps in the data processing method for OPC authorization of mechanical equipment disclosed in the first aspect of the embodiment of the present invention.
[0063] The fourth aspect of the present invention discloses a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute some or all steps in the data processing method for OPC authorization of mechanical equipment disclosed in the first aspect of the embodiment of the present invention.
[0064] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0065] In an embodiment of the present invention, it is detected whether a mechanical device authorization request is received to obtain a first detection result; the mechanical device authorization request includes mechanical device number information; when the first detection result is yes, the mechanical device authorization request is encoded to obtain first authorization code information; the first authorization code information includes authorization period information, and / or, authorization device number information, and / or, first encryption key information; data is transmitted to the first authorization code information, and it is determined whether the data is transmitted completely to obtain a transmission judgment result; when the transmission judgment result is yes, the transmitted first authorization code information is verified to obtain verification result information; the verification result information is used to indicate OPC authorization for the mechanical device. It can be seen that the present invention can detect the mechanical device authorization request, perform encoding processing and data information transmission processing on it, and then verify the first authorization code information to obtain verification result information for OPC authorization of the mechanical device, which is beneficial to prevent the OPC authorization system from being cracked, thereby improving the security and flexibility of OPC authorization for the mechanical device. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0067] Figure 1 This is a flow chart of a data processing method for OPC authorization of mechanical equipment disclosed in an embodiment of the present invention;
[0068] Figure 2 This is a flow chart of another data processing method for OPC authorization of mechanical equipment disclosed in an embodiment of the present invention;
[0069] Figure 3 This is a structural diagram of a data processing device for OPC authorization of mechanical equipment disclosed in an embodiment of the present invention;
[0070] Figure 4This is a schematic structural diagram of another data processing device for OPC authorization of mechanical equipment disclosed in an embodiment of the present invention;
[0071] Figure 5 A schematic structural diagram of another data processing device for OPC authorization of mechanical equipment disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0072] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0073] The terms "first," "second," and so on, in the description and claims of the present invention and the accompanying drawings are used to distinguish between different objects, not to describe a specific order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or device.
[0074] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute a separate or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0075] The present invention discloses a data processing method and device for OPC authorization of mechanical equipment. The method and device can detect mechanical equipment authorization requests, perform encoding processing and data information transmission processing on them, and then verify the first authorization code information to obtain verification result information for OPC authorization of the mechanical equipment. This method helps prevent the OPC authorization system from being cracked, thereby improving the security and flexibility of OPC authorization for mechanical equipment. Details are described below.
[0076] Example 1
[0077] See also Figure 1 , Figure 1 This is a flow chart of a data processing method for OPC authorization of mechanical equipment disclosed in an embodiment of the present invention. Figure 1 The data processing method for mechanical equipment OPC authorization described is applied to a data processing system, such as a local server or cloud server for data processing management of mechanical equipment OPC authorization, and the embodiment of the present invention does not limit it. Figure 1 As shown, the data processing method for mechanical equipment OPC authorization may include the following operations:
[0078] 101. Detect whether a mechanical device authorization request is received and obtain a first detection result.
[0079] In the embodiment of the present invention, the mechanical device authorization request includes mechanical device number information.
[0080] 102. When the first detection result is yes, encode the mechanical device authorization request to obtain first authorization code information.
[0081] In the embodiment of the present invention, the first authorization code information includes authorization period information, and / or authorization device number information, and / or first encryption key information.
[0082] 103. Transmit the first authorization code information, determine whether the data has been transmitted completely, and obtain a transmission determination result.
[0083] 104. When the transmission judgment result is yes, verify the transmitted first authorization code information to obtain verification result information.
[0084] In the embodiment of the present invention, the verification result information is used to indicate OPC authorization for the mechanical equipment.
[0085] Optionally, the mechanical equipment authorization request is triggered when an activation operation needs to be performed on a numerically controlled machine tool (CNC).
[0086] Optionally, the above activation operation is performed on a CNC system with OPC function.
[0087] Optionally, the installation environment package of the above CNC system is provided by the supplier.
[0088] Optionally, the above-mentioned mechanical equipment number information includes machine tool coding information and / or machine tool MAC address information, which is not limited in this embodiment of the present invention.
[0089] Optionally, the above-mentioned mechanical equipment number information includes L character information.
[0090] Optionally, the above L is a positive integer greater than or equal to 17.
[0091] Optionally, the above character information includes digital information and / or special character information, which is not limited in this embodiment of the present invention.
[0092] Optionally, the digital information includes M digital characters.
[0093] Optionally, the above M is a positive integer greater than or equal to 12.
[0094] Optionally, the above digital information includes at least 6 different digital characters.
[0095] Optionally, the structure of the first authorization code information is authorization period information-authorization device number information-first encryption key information.
[0096] It can be seen that the data processing method for OPC authorization of mechanical equipment described in the embodiment of the present invention can detect the mechanical equipment authorization request, encode it and transmit data information to it, and then verify the first authorization code information to obtain the verification result information for OPC authorization of the mechanical equipment, which is beneficial to prevent the OPC authorization system from being cracked, thereby improving the security and flexibility of OPC authorization of mechanical equipment.
[0097] In an optional embodiment, the mechanical device authorization request is encoded in step 102 to obtain the first authorization code information, including:
[0098] Obtaining the usage period information corresponding to the mechanical device authorization request; the usage period information is associated with the sending object of the mechanical device authorization request;
[0099] The usage period information and the mechanical equipment number information are processed to obtain the first authorization code information.
[0100] Optionally, the above-mentioned usage period information includes year information, and / or month information, and / or day information, and / or hour information, and / or minute information, and / or special character information, which is not limited in the embodiment of the present invention.
[0101] Optionally, the above-mentioned usage period information includes N digital information.
[0102] Optionally, the above N is a positive integer greater than or equal to 6.
[0103] Optionally, the above-mentioned usage period information is updated dynamically.
[0104] It can be seen that the data processing method for OPC authorization of mechanical equipment described in the embodiment of the present invention can obtain the usage period information and process it and the mechanical equipment number information to obtain the first authorization code information, which is beneficial to prevent the OPC authorization system from being cracked, thereby improving the security and flexibility of OPC authorization of mechanical equipment.
[0105] In another optional embodiment, the above processing of the usage period information and the mechanical equipment number information to obtain the first authorization code information includes:
[0106] Determining a target key from a preset set of standby keys; the target key is associated with the first encryption key information;
[0107] The target secret key, the usage period information and the authorized device number information are encoded according to a preset encoding format to obtain the first authorization code information.
[0108] Optionally, the target key is unique.
[0109] Optionally, the above standby key can be updated.
[0110] Optionally, the standby key includes K characters.
[0111] Optionally, the target key and the authorized device number information are in one-to-one correspondence.
[0112] Optionally, the above K is a positive integer greater than or equal to 36.
[0113] Optionally, the number of types of the above character information is greater than or equal to 3.
[0114] Optionally, the above different types of character information are arranged in an interlaced manner.
[0115] Optionally, each of the above standby keys does not match any other standby keys.
[0116] Optionally, the data information corresponding to each of the above-mentioned standby keys is unique.
[0117] Optionally, the first encryption key information includes P character information.
[0118] Optionally, the above P is a positive integer less than or equal to K.
[0119] Optionally, the above P is a positive integer greater than or equal to 32.
[0120] Optionally, the encoding operation is performed using the MD5 function.
[0121] It can be seen that the data processing method for OPC authorization of mechanical equipment described in the embodiment of the present invention can determine the target key from the set of standby keys, and use the encoding format to process the target key, usage period information and mechanical equipment number information to obtain the first authorization code information, which is beneficial to prevent the OPC authorization system from being cracked, thereby improving the security and flexibility of OPC authorization of mechanical equipment.
[0122] Example 2
[0123] See also Figure 2 , Figure 2 This is a flow chart of another data processing method for OPC authorization of mechanical equipment disclosed in an embodiment of the present invention. Figure 2 The data processing method for mechanical equipment OPC authorization described is applied to a data processing system, such as a local server or cloud server for data processing management of mechanical equipment OPC authorization, and the embodiment of the present invention does not limit it. Figure 2 As shown, the data processing method for mechanical equipment OPC authorization may include the following operations:
[0124] 201. Detect whether a mechanical device authorization request is received and obtain a first detection result.
[0125] 202. When the first detection result is yes, encode the mechanical device authorization request to obtain first authorization code information.
[0126] 203. Transmit the first authorization code information, determine whether the data has been transmitted completely, and obtain a transmission determination result.
[0127] 204. Parse the transmitted first authorization code information to obtain decoding information.
[0128] 205. Encode the decoded information to obtain second authorization code information.
[0129] 206. Compare and analyze the first authorization code information and the second authorization code information to obtain verification result information.
[0130] In the embodiment of the present invention, for the specific technical details and technical terminology of steps 201 to 203, reference can be made to the detailed description of steps 101 to 103 in the first embodiment, which will not be repeated in detail in the embodiment of the present invention.
[0131] Optionally, the above decoding information includes decoding deadline information and / or decoding number information, which is not limited in the embodiment of the present invention.
[0132] Optionally, the above decoding period information is associated with the above authorization period information.
[0133] Optionally, the above decoding number information is associated with the above authorized device number information.
[0134] Optionally, the second authorization code information includes re-encoded usage period information, and / or re-encoded device number information, and / or second encryption key information, which is not limited in this embodiment of the present invention.
[0135] Optionally, the structure of the second authorization code information is re-encoded usage period information-re-encoded device number information-second encryption key information.
[0136] Optionally, the above comparative analysis includes analyzing whether the authorization period information matches the re-encoding usage period information, and / or analyzing whether the authorization device number information matches the re-encoding device number information, and / or analyzing whether the first encryption key information matches the second encryption key information, which is not limited in the embodiment of the present invention.
[0137] Optionally, the verification result information includes that the authorization codes are consistent and / or that the authorization codes are inconsistent, which is not limited in this embodiment of the present invention.
[0138] Optionally, the comparison analysis results of the above-mentioned authorization codes being consistent include that the authorization period information matches the re-encoding usage period information, the authorization device number information matches the re-encoding device number information, and the first encryption key information matches the second encryption key information, or the first encryption key information matches the second encryption key information, which is not limited in the embodiment of the present invention.
[0139] It can be seen that the data processing method for OPC authorization of mechanical equipment described in the embodiment of the present invention can detect the mechanical equipment authorization request, encode it and transmit data information to it, and then parse, encode and compare the first authorization code information to obtain the verification result information for OPC authorization of the mechanical equipment, which is beneficial to prevent the OPC authorization system from being cracked, thereby improving the security and flexibility of OPC authorization of mechanical equipment.
[0140] In an optional embodiment, the above encoding process of the decoded information to obtain the second authorization code information includes:
[0141] Retrieve the device key; the device key is associated with the target key; the device key stored in any mechanical device is unique;
[0142] The device key and the decoding information are encoded to obtain second authorization code information.
[0143] Optionally, the device key is pre-set in the CNC system.
[0144] Optionally, the device key includes Q characters of information.
[0145] Optionally, the above Q is a positive integer greater than or equal to 36.
[0146] It can be seen that the data processing method for OPC authorization of mechanical equipment described in the embodiment of the present invention can obtain the second authorization code information by re-encoding the retrieved device key and decoding information, which is more conducive to preventing the OPC authorization system from being cracked, thereby improving the security and flexibility of OPC authorization for mechanical equipment.
[0147] In yet another optional embodiment, when the first detection result is yes, before encoding the mechanical device authorization request to obtain the first authorization code information, the method further includes:
[0148] detecting whether a key change request is received, and obtaining a second detection result;
[0149] When the second detection result is yes, compile and generate a waiting key corresponding to the key change request;
[0150] Using the standby key to update the standby key corresponding to the key change request;
[0151] Use the key to be activated to update the device key corresponding to the key change request.
[0152] Optionally, the updated standby key will be removed.
[0153] Optionally, the updated device key will be removed.
[0154] Optionally, one CNC system only stores one of the above-mentioned device keys.
[0155] Optionally, the secret key to be activated does not match any of the secret keys to be used.
[0156] Optionally, the secret key to be activated does not match the device key.
[0157] It can be seen that the data processing method for OPC authorization of mechanical equipment described in the embodiment of the present invention can update the key through a key replacement request, which is more conducive to preventing the OPC authorization system from being cracked, thereby improving the security and flexibility of OPC authorization for mechanical equipment.
[0158] In yet another optional embodiment, before transmitting the first authorization code information and determining whether the data is completely transmitted and obtaining the transmission determination result, the method further includes:
[0159] Detect whether there is historical authorization code information and obtain the detection result;
[0160] When the detection result is yes, it is determined whether the mechanical equipment is in an authorized state and a state determination result is obtained;
[0161] When the status judgment result is no, triggering execution of data transmission of the first authorization code information, and judging whether the data transmission is complete, obtaining a transmission judgment result;
[0162] When the detection result is no, the data transmission of the first authorization code information is triggered, and it is determined whether the data is transmitted completely to obtain a transmission determination result.
[0163] Optionally, when the above status judgment result is yes, status feedback information is generated.
[0164] Furthermore, the above-mentioned status feedback information is used to indicate the verification of the authorization status of the mechanical equipment.
[0165] It can be seen that the data processing method for OPC authorization of mechanical equipment described in the embodiment of the present invention can process authorization information by detecting historical authorization code information, which is more conducive to preventing the OPC authorization system from being cracked, thereby improving the security and flexibility of OPC authorization of mechanical equipment.
[0166] Example 3
[0167] See also Figure 3 , Figure 3 This is a structural diagram of a data processing device for OPC authorization of mechanical equipment disclosed in an embodiment of the present invention. Figure 3 The described device can be applied to a data processing system, such as a local server or cloud server for data processing and management of OPC authorization for mechanical equipment, and the embodiment of the present invention does not limit this. Figure 3 As shown, the device may include:
[0168] The first detection module 301 is used to detect whether a mechanical device authorization request is received and obtain a first detection result; the mechanical device authorization request includes mechanical device number information;
[0169] A first processing module 302 is configured to, when the first detection result is yes, encode the mechanical device authorization request to obtain first authorization code information; the first authorization code information includes authorization period information, and / or authorized device number information, and / or first encryption key information;
[0170] The transmission module 303 is used to transmit the first authorization code information and determine whether the data is transmitted completely to obtain a transmission determination result;
[0171] The verification module 304 is used to verify the transmitted first authorization code information when the transmission judgment result is yes, and obtain verification result information; the verification result information is used to indicate the OPC authorization of the mechanical equipment.
[0172] It can be seen that implementation Figure 3The described data processing device for OPC authorization of mechanical equipment can detect the mechanical equipment authorization request, perform encoding processing and data information transmission processing on it, and then verify the first authorization code information to obtain verification result information for OPC authorization of the mechanical equipment. This is beneficial to prevent the OPC authorization system from being cracked, thereby improving the security and flexibility of OPC authorization of mechanical equipment.
[0173] In another optional embodiment, as Figure 4 As shown, the first processing module 302 includes an acquisition submodule 3021 and a processing submodule 3022, wherein:
[0174] The acquisition submodule 3021 is used to obtain the usage period information corresponding to the mechanical device authorization request; the usage period information is associated with the sending object of the mechanical device authorization request;
[0175] The processing submodule 3022 is used to process the usage period information and the mechanical equipment number information to obtain the first authorization code information.
[0176] It can be seen that implementation Figure 4 The described data processing device for OPC authorization of mechanical equipment can obtain the first authorization code information by obtaining the usage period information and processing it and the mechanical equipment number information, which is helpful to prevent the OPC authorization system from being cracked, thereby improving the security and flexibility of OPC authorization of mechanical equipment.
[0177] In another optional embodiment, Figure 4 As shown, the processing submodule 3022 processes the usage period information and the mechanical equipment number information to obtain the first authorization code information in the following manner:
[0178] Determining a target key from a preset set of standby keys; the target key is associated with the first encryption key information;
[0179] The target secret key, the usage period information and the authorized device number information are encoded according to a preset encoding format to obtain the first authorization code information.
[0180] It can be seen that implementation Figure 4 The described data processing device for OPC authorization of mechanical equipment can determine the target key from the set of standby keys, and use the encoding format to process the target key, usage period information and mechanical equipment number information to obtain the first authorization code information, which is beneficial to prevent the OPC authorization system from being cracked, thereby improving the security and flexibility of OPC authorization of mechanical equipment.
[0181] In another optional embodiment, Figure 4As shown, the verification module 304 verifies the transmitted first authorization code information and obtains the verification result information in the following manner:
[0182] Parsing the transmitted first authorization code information to obtain decoding information;
[0183] Encoding the decoded information to obtain second authorization code information;
[0184] Compare and analyze the first authorization code information and the second authorization code information to obtain verification result information.
[0185] It can be seen that implementation Figure 4 The described data processing device for OPC authorization of mechanical equipment can detect the mechanical equipment authorization request, perform encoding processing and data information transmission processing on it, and then obtain the verification result information for OPC authorization of the mechanical equipment by parsing, encoding and comparing the first authorization code information. This is beneficial to prevent the OPC authorization system from being cracked, thereby improving the security and flexibility of OPC authorization of mechanical equipment.
[0186] In another optional embodiment, Figure 4 As shown, the verification module 304 encodes the decoded information to obtain the second authorization code information in the following manner:
[0187] Retrieve the device key; the device key is associated with the target key; the device key stored in any mechanical device is unique;
[0188] The device key and the decoding information are encoded to obtain second authorization code information.
[0189] It can be seen that implementation Figure 4 The described data processing device for OPC authorization of mechanical equipment can obtain second authorization code information by re-encoding the retrieved device key and decoding information, which is more conducive to preventing the OPC authorization system from being cracked, thereby improving the security and flexibility of OPC authorization of mechanical equipment.
[0190] In another optional embodiment, Figure 4 As shown, before the first processing module 302 is used to encode the mechanical device authorization request and obtain the first authorization code information when the first detection result is yes, the above-mentioned device further includes:
[0191] A second detection module 305 is configured to detect whether a key change request has been received and obtain a second detection result;
[0192] A compiling module 306 is configured to compile and generate a waiting key corresponding to the key replacement request when the second detection result is yes;
[0193] A first updating module 307 is configured to update the standby key corresponding to the key replacement request using the standby key;
[0194] The second updating module 308 is configured to update the device key corresponding to the key replacement request using the key to be activated.
[0195] It can be seen that implementation Figure 4 The described data processing device for OPC authorization of mechanical equipment can update the key through a key replacement request, which is more conducive to preventing the OPC authorization system from being cracked, thereby improving the security and flexibility of OPC authorization of mechanical equipment.
[0196] In another optional embodiment, Figure 4 As shown, before the transmission module 303 transmits the first authorization code information and determines whether the data is transmitted completely and obtains the transmission judgment result, the transmission module 303 is also used to detect whether there is historical authorization code information and obtain the detection result;
[0197] When the detection result is yes, it is determined whether the mechanical equipment is in an authorized state and a state determination result is obtained;
[0198] When the status judgment result is no, triggering execution of data transmission of the first authorization code information, and judging whether the data transmission is complete, obtaining a transmission judgment result;
[0199] When the detection result is no, the data transmission of the first authorization code information is triggered, and it is determined whether the data is transmitted completely to obtain a transmission determination result.
[0200] It can be seen that implementation Figure 4 The described data processing device for OPC authorization of mechanical equipment can process authorization information by detecting historical authorization code information, which is more conducive to preventing the OPC authorization system from being cracked, thereby improving the security and flexibility of OPC authorization of mechanical equipment.
[0201] Example 4
[0202] See also Figure 5 , Figure 5 This is a structural diagram of another data processing device for OPC authorization of mechanical equipment disclosed in an embodiment of the present invention. Figure 5 The described device can be applied to a data processing system, such as a local server or cloud server for data processing and management of OPC authorization for mechanical equipment, and the embodiment of the present invention does not limit this. Figure 5 As shown, the device may include:
[0203] A memory 401 storing executable program code;
[0204] a processor 402 coupled to the memory 401;
[0205] The processor 402 calls the executable program code stored in the memory 401 to execute the steps of the data processing method for OPC authorization of mechanical equipment described in the first or second embodiment.
[0206] Example 5
[0207] An embodiment of the present invention discloses a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program enables a computer to execute the steps of the data processing method for mechanical equipment OPC authorization described in the first or second embodiment.
[0208] Example 6
[0209] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute the steps of the data processing method for OPC authorization of mechanical equipment described in Example 1 or Example 2.
[0210] The device embodiments described above are merely illustrative. Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., they may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0211] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus the necessary general hardware platform, or of course, by means of hardware. Based on this understanding, the above technical solution, in essence, or the portion that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, including a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.
[0212] Finally, it should be noted that the data processing method and device for OPC authorization of mechanical equipment disclosed in the embodiment of the present invention are only preferred embodiments of the present invention, and are only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that it is still possible to modify the technical solutions recorded in the aforementioned embodiments, or to replace some of the technical features therein with equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A data processing method for OPC authorization of mechanical equipment, characterized in that: The method comprises: Detecting whether a mechanical device authorization request is received to obtain a first detection result; the mechanical device authorization request includes mechanical device number information; When the first detection result is yes, the mechanical device authorization request is encoded to obtain first authorization code information; the first authorization code information includes authorization period information, and / or authorized device number information, and / or first encryption key information; Transmitting data of the first authorization code information and determining whether the data has been transmitted completely to obtain a transmission determination result; When the transmission judgment result is yes, the transmitted first authorization code information is verified to obtain verification result information; the verification result information is used to indicate the OPC authorization of the mechanical equipment; Furthermore, the verification of the transmitted first authorization code information to obtain verification result information includes: Parsing the transmitted first authorization code information to obtain decoding information; Encoding the decoded information to obtain second authorization code information; performing a comparative analysis on the first authorization code information and the second authorization code information to obtain verification result information; the comparative analysis includes analyzing whether the authorization period information and the re-encoded usage period information match, and / or analyzing whether the authorization device number information and the re-encoded device number information match, and / or analyzing whether the first encryption key information and the second encryption key information match; And, encoding the decoded information to obtain the second authorization code information includes: Retrieve a device key; the device key is associated with the target key; the device key stored in any mechanical device is unique; Encoding the device key and the decoding information to obtain second authorization code information; the second authorization code information includes re-encoded usage period information and / or re-encoded device number information and / or second encryption key information; Furthermore, before encoding the mechanical device authorization request to obtain first authorization code information when the first detection result is yes, the method further includes: detecting whether a key change request is received, and obtaining a second detection result; When the second detection result is yes, compile and generate a waiting key corresponding to the key change request; Updating the standby key corresponding to the key change request using the standby key; Updating the device key corresponding to the key change request using the waiting key; Furthermore, before transmitting the first authorization code information and determining whether the data is completely transmitted to obtain a transmission determination result, the method further includes: Detect whether there is historical authorization code information and obtain the detection result; When the detection result is yes, determining whether the mechanical device is in an authorized state and obtaining a state determination result; When the status judgment result is yes, generating status feedback information, the status feedback information is used to indicate the verification of the authorization status of the mechanical device; When the status judgment result is no, triggering the execution of the data transmission of the first authorization code information, and judging whether the data transmission is complete, obtaining a transmission judgment result; When the detection result is no, the data transmission of the first authorization code information is triggered, and it is determined whether the data is transmitted completely to obtain a transmission determination result.
2. The data processing method for mechanical equipment OPC authorization according to claim 1, characterized in that: The encoding process of the mechanical device authorization request to obtain first authorization code information includes: Obtaining usage period information corresponding to the mechanical device authorization request; the usage period information is associated with the sending object of the mechanical device authorization request; The usage period information and the mechanical equipment number information are processed to obtain first authorization code information.
3. The data processing method for OPC authorization of mechanical equipment according to claim 2, characterized in that: The processing of the usage period information and the mechanical equipment number information to obtain the first authorization code information includes: Determining a target key from a preset set of standby keys; the target key is associated with the first encryption key information; The target key, the usage period information and the authorization device number information are encoded according to a preset encoding format to obtain first authorization code information.
4. A data processing device for OPC authorization of mechanical equipment, characterized in that: The device comprises: A first detection module is configured to detect whether a mechanical device authorization request is received and obtain a first detection result; the mechanical device authorization request includes mechanical device number information; a first processing module configured to, when the first detection result is yes, encode the mechanical device authorization request to obtain first authorization code information; the first authorization code information includes authorization period information, and / or authorized device number information, and / or first encryption key information; a transmission module, configured to transmit the first authorization code information and determine whether the data has been transmitted completely, thereby obtaining a transmission determination result; a verification module, configured to verify the transmitted first authorization code information when the transmission judgment result is yes, and obtain verification result information; the verification result information is used to indicate OPC authorization for the mechanical equipment; Furthermore, the verification module verifies the transmitted first authorization code information and obtains the verification result information in the following specific manner: Parsing the transmitted first authorization code information to obtain decoding information; Encoding the decoded information to obtain second authorization code information; performing a comparative analysis on the first authorization code information and the second authorization code information to obtain verification result information; the comparative analysis includes analyzing whether the authorization period information and the re-encoded usage period information match, and / or analyzing whether the authorization device number information and the re-encoded device number information match, and / or analyzing whether the first encryption key information and the second encryption key information match; Furthermore, the verification module encodes the decoded information to obtain the second authorization code information in the following manner: Retrieve a device key; the device key is associated with the target key; the device key stored in any mechanical device is unique; Encoding the device key and the decoding information to obtain second authorization code information, wherein the second authorization code information includes re-encoded usage period information and / or re-encoded device number information and / or second encryption key information; Furthermore, before the first processing module is used to encode the mechanical device authorization request to obtain first authorization code information when the first detection result is yes, the apparatus further includes: A second detection module is used to detect whether a key replacement request is received and obtain a second detection result; a compiling module, configured to compile and generate a waiting key corresponding to the key replacement request when the second detection result is yes; A first updating module, configured to update the standby key corresponding to the key replacement request using the standby key; A second updating module is configured to update the device key corresponding to the key replacement request using the waiting key; In addition, the transmission module is also used to perform data transmission on the first authorization code information in the transmission module, and determine whether the data transmission is complete, and before obtaining the transmission judgment result, detect whether there is historical authorization code information to obtain a detection result; when the detection result is yes, determine whether the mechanical equipment is in an authorized state, and obtain a state judgment result; when the state judgment result is yes, generate state feedback information, and the state feedback information is used to indicate the verification of the authorization state of the mechanical equipment; when the state judgment result is no, trigger the execution of the data transmission of the first authorization code information, and determine whether the data transmission is complete, and obtain a transmission judgment result; when the detection result is no, trigger the execution of the data transmission of the first authorization code information, and determine whether the data transmission is complete, and obtain a transmission judgment result.
5. A data processing device for OPC authorization of mechanical equipment, characterized in that: The device comprises: a memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the data processing method for OPC authorization of mechanical equipment according to any one of claims 1 to 3.
6. A computer storage medium, characterized in that The computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the data processing method for OPC authorization of mechanical equipment according to any one of claims 1 to 3.
Citation Information
Patent Citations
Product authorized use method and apparatus, computer device and storage medium
CN108304698A
Software authorization method and device and computer equipment
CN112632484A