Device configuration method, device, electronic device and storage medium

By dynamically encrypting the device using the current configuration time and preset default values ​​during the device configuration process, the problem of fixed encrypted data being easily intercepted is solved, thus improving the security of device configuration.

CN117424808BActive Publication Date: 2024-11-19GUANGZHOU BAOLUN ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311464085.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-06
Publication Date
2024-11-19
Estimated Expiration
2043-11-06

AI Technical Summary

Technical Problem

In existing technologies, the use of fixed encrypted data by the client during device configuration is easily intercepted, leading to security issues.

Method used

By determining the time of the current configuration operation and combining it with preset default values, the configuration protocol is dynamically encrypted to generate encrypted protocol data, which is then sent to the device to be configured for decryption and configuration.

Benefits of technology

Dynamic encryption of the configuration protocol is implemented to prevent data leakage and improve the security of the configuration process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117424808B_ABST
    Figure CN117424808B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention disclose a device configuration method, apparatus, electronic device and storage medium. The method includes: determining the current configuration time corresponding to the current configuration operation to be executed; encrypting the pre-generated configuration protocol based on the current configuration time and the preset default value to obtain the encrypted protocol data corresponding to the current configuration operation; wherein the preset default value is pre-stored in each device to be configured and used to decrypt the encrypted protocol data; the encrypted protocol data is sent to each device to be configured so that the device to be configured performs device configuration based on the received encrypted protocol data. The technical solution of the embodiment of the present invention can realize dynamic encryption of the configuration protocol, effectively prevent the encrypted protocol data from being leaked, and improve the security of the configuration process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of computer technology, and in particular, to a device configuration method, apparatus, electronic device, and storage medium. Background Art

[0002] With the development of computer technology and network technology, it has become a common means of unified control of devices to establish a communication connection between a client and each device to be configured to complete the configuration operation of each device.

[0003] In the prior art, when the client performs configuration operations on each device, it sends the configuration protocol encrypted by the fixed encrypted data to the network, and each device to be configured performs the configuration operation after receiving the configuration protocol. However, in the process of implementing the present invention, it is found that the prior art has at least the following technical problems: since the client sends the fixed encrypted data to the device to be configured each time during the operation, it is easy to be intercepted by other risky devices, and the operation is interfered based on the intercepted fixed encrypted data, causing security problems. Summary of the invention

[0004] The embodiments of the present invention provide a device configuration method, apparatus, electronic device and storage medium to achieve the purpose of preventing data leakage and improving the security of configuration operations.

[0005] According to one aspect of the present invention, there is provided a device configuration method, comprising:

[0006] Determine the current configuration time corresponding to the current configuration operation to be executed;

[0007] Based on the current configuration time and the preset default value, encrypt the pre-generated configuration protocol to obtain encrypted protocol data corresponding to the current configuration operation;

[0008] Wherein, the preset default value is pre-stored in each device to be configured and is used to decrypt the encrypted protocol data;

[0009] The encrypted protocol data is sent to each device to be configured, so that the device to be configured performs device configuration based on the received encrypted protocol data.

[0010] According to another aspect of the present invention, there is provided a device configuration apparatus, the apparatus comprising:

[0011] A current configuration time determination module is used to determine the current configuration time corresponding to the current configuration operation to be executed;

[0012] A configuration protocol encryption module, used to encrypt a pre-generated configuration protocol based on the current configuration time and a preset default value to obtain encrypted protocol data corresponding to the current configuration operation;

[0013] Wherein, the preset default value is pre-stored in each device to be configured and is used to decrypt the encrypted protocol data;

[0014] The encrypted protocol data sending module is used to send the encrypted protocol data to each device to be configured, so that the device to be configured performs device configuration based on the received encrypted protocol data.

[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0016] at least one processor; and

[0017] a memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the device configuration method described in any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the device configuration method described in any embodiment of the present invention when executed.

[0020] The technical solution of the embodiment of the present invention determines the current configuration time corresponding to the current configuration operation to be executed, encrypts the pre-generated configuration protocol based on the current configuration time and the preset default value, and obtains the encrypted protocol data corresponding to the current configuration operation. Since the current configuration time is different each time the encryption is performed, the dynamic encryption of the configuration protocol is realized, and the encrypted protocol data is effectively prevented from being leaked at will; the encrypted protocol data is sent to each device to be configured, so that the device to be configured performs device configuration based on the received encrypted protocol data, thereby improving the security of the configuration process.

[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] 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.

[0023] Figure 1 is a flow chart of a device configuration method provided according to an embodiment of the present invention;

[0024] Figure 2 is a flow chart of another device configuration method provided according to an embodiment of the present invention;

[0025] Figure 3 is a structural schematic diagram of a device configuration apparatus provided according to an embodiment of the present invention;

[0026] Figure 4 It is a structural schematic diagram of an electronic device for implementing the device configuration method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in 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 creative work should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "etc." and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] Figure 1 This is a flow chart of a device configuration method provided according to an embodiment of the present invention. This embodiment is applicable to the case of configuring at least one device, and the method can be executed by a device configuration device, which can be implemented in the form of hardware and / or software.

[0030] like Figure 1 As shown, the method of this embodiment may specifically include:

[0031] S110: Determine the current configuration time corresponding to the current configuration operation to be executed.

[0032] It should be noted that this embodiment can be applied to a client connected to a device to be configured, and the configuration operation of the device to be configured is completed through the interaction between the client and the device to be configured.

[0033] Among them, the current configuration operation may include software installation operation, software uninstallation operation, data deletion operation, etc.

[0034] In a specific implementation, before each device to be configured needs to be configured, the current configuration time may be determined first. The current configuration time may be the time when the encryption protocol data is generated, or the time when the current configuration operation is determined to be performed. For example, after receiving a configuration request instruction, it is determined to perform the current configuration operation, and the time when the configuration request instruction is received may be determined as the current configuration time.

[0035] Exemplarily, the current configuration time includes the year, month, day, hour, minute and second corresponding to the current configuration operation; for example, the current configuration time is 15:08:09 on September 20, 2023. It should be noted that the accuracy of the current configuration time can be determined according to the operation frequency of the configuration operation. If the configuration operation is performed once every few hours, the current configuration time can be determined to the minute; if the configuration operation is performed once every few days, the current configuration time can be determined to the hour. Those skilled in the art can determine the accuracy of determining the current configuration time according to actual application conditions, and this embodiment is not limited to this.

[0036] S120: Encrypt the pre-generated configuration protocol based on the current configuration time and the preset default value to obtain encrypted protocol data corresponding to the current configuration operation.

[0037] The preset default value is pre-stored in each device to be configured and is used to decrypt the encrypted protocol data.

[0038] In a specific implementation, before configuring each device to be configured, a preset default value may be stored in the device to be configured. For example, the preset default value may be 23041, which is converted into hexadecimal 5A01.

[0039] Specifically, the configuration protocol may be encrypted by generating an encrypted value using the current configuration time and a preset default value, and encrypting the configuration protocol using the encrypted value to obtain encrypted protocol data.

[0040] In this embodiment, the pre-generated configuration protocol is encrypted based on the current configuration time and the preset default value, including: calculating the current configuration time according to the preset calculation method to obtain a time value; adding the time value to the preset default value to obtain an encrypted value; adding the encrypted value to the preset encryption byte of the configuration protocol to encrypt the configuration protocol.

[0041] Specifically, the number of years, months, days, hours, minutes and seconds corresponding to the current configuration time may be determined, and at least two of the values ​​corresponding to the current configuration time may be calculated according to a preset calculation method to obtain a time value. The preset calculation method is a calculation method consisting of at least one method of addition, subtraction, multiplication and division.

[0042] In a specific implementation, the time value and the preset default value are added, and the sum of the two is used as the encrypted value. It should be noted that the encrypted value can also be obtained by subtracting the time value from the preset default value and taking the absolute value of the difference; or, the time value and the preset default value are multiplied, and the product is used as the encrypted value; or, the time value and the preset default value are divided, and the quotient is used as the encrypted value.

[0043] To complete the encryption operation of the configuration protocol, a preset encryption byte can be reserved in the configuration protocol; the encryption of the configuration protocol is achieved by adding the encryption value to the preset encryption byte. Exemplarily, any two bytes in the configuration protocol can be used as the preset encryption bytes, the encryption value is added to the preset encryption bytes, and the configuration protocol after the encryption value is added is used as the encrypted protocol data.

[0044] This embodiment determines a time value based on the current configuration time, and then adds the time value and a preset default value to obtain an encrypted value, so that the current configuration time is combined in the encrypted value, thereby improving the security of the encrypted value.

[0045] In a specific implementation, the time value can be obtained based on the current configuration time by adding the years, months, days, hours, minutes, and seconds corresponding to the current configuration time, and using the sum as the time value; or, the years, months, days, hours, minutes, and seconds can be multiplied, and the product can be used as the time value.

[0046] In order to improve the security of the determined time value and encrypted value, the current configuration time is calculated according to a preset calculation method, and the implementation method for obtaining the time value can be: determine the year, month, day information and hour, minute, and second information of the current configuration time; add the year, month, and day in the year, month, and day information to obtain the time and value; multiply the hours, minutes, and seconds in the hour, minute, and second information to obtain the time product; add the time value and the time product to determine the time value.

[0047] Specifically, since the years are thousands of years and the values ​​are relatively large, in order to facilitate encryption processing, the years, months and days can be added to obtain the time and value. In order to improve the security of the time value, the value corresponding to the hour, minute and second information can be calculated in a different calculation method from the year, month and day information. In this embodiment, the time product is obtained by multiplying the hours, minutes and seconds in the hour, minute and second information, and then the time and value are added to the time product to obtain the time value.

[0048] For example, the current configuration time may be "2023-7-15 23:59:59", and the year, month, and day of the date are added together: 2023+7+15=2045, and the hours, minutes, and seconds are multiplied together to obtain: 23×59×59=80063, and then the time and value and the time product are added together, that is, 2045+80063=82108, and 82108 is the time value.

[0049] This embodiment obtains a time value by adding the values ​​corresponding to the year-month-day information and multiplying the hours-minute-second information, and adding the obtained sum and product. By using different calculation methods for the year-month-day information and the hours-minute-second information, the complexity of determining the time value is increased, thereby making the time value safer.

[0050] In actual applications, in order to avoid the correctness of the process of encrypting the configuration protocol, it is necessary to ensure that the encrypted value is not greater than the maximum value that the preset encryption byte can write. For example, when the preset encryption byte is two bytes, the maximum value corresponding to the preset encryption byte is FFFF, which is converted to decimal 65535, so the encrypted value needs to be no greater than 65535.

[0051] To ensure that the encrypted value is not greater than the maximum value that can be written by the preset encryption byte, the time value must be less than or equal to the difference between the maximum value corresponding to the preset encryption byte and the preset default value. If the time value is greater than the difference between the maximum value corresponding to the preset encryption byte and the preset default value, the value obtained by subtracting the time value from the maximum value can be used as the new time value; if the new time value is a positive number, the sum of the new time value and the preset default value is used as the encrypted value; if the new time value is a negative number, the new time value is negated, and the sum of the negated value and the preset default value is used as the encrypted value.

[0052] For example, taking the preset encryption byte as two bytes and the preset default value as 23041 as an example, the maximum value corresponding to the preset encryption byte should be 65535, and the time value should not be greater than: 65535-23041=42494.

[0053] If the current configuration time is "2023-7-1513:24:22", add the date to get: 2023+7+15=2045, multiply the hours, minutes and seconds to get: 13×24×22=6864, add the time and value to the time product to get: 2045+6864=8909. Since 8909 is less than 42494, 8909 can be used as the time and value to add to the preset default value to get the encrypted value.

[0054] If the current configuration time is "2023-7-15 23:59:59", add the dates to get: 2023+7+15=2045, multiply the hours, minutes and seconds to get: 23×59×59=80063, add the time and the product of the value and the time to get: 2045+80063=82108. Since 82108 is greater than 42494, subtract 82108 from the maximum value 65535 to get -16573, and invert it to get 16573. Add 16573 to the preset default value to get the encrypted value.

[0055] S130: Send the encrypted protocol data to each device to be configured, so that the device to be configured performs device configuration based on the received encrypted protocol data.

[0056] In a specific implementation, the number of devices to be configured may be one or more, and the encrypted protocol data may be sent to each device to be configured in a broadcasting manner. After receiving the encrypted protocol data, the device to be configured may perform a decryption operation to perform subsequent device configuration operations.

[0057] Exemplarily, the decryption process of the device to be configured includes extracting the encrypted value corresponding to the preset encryption field in the encryption protocol data, determining the decryption value based on the pre-stored preset default value, and providing feedback information consisting of the determined decryption value and the identification, name and other information of the device to be configured to complete the decryption process, and completing the configuration operation of the device to be configured based on the subsequent interaction between the client and the device to be configured.

[0058] The technical solution of the embodiment of the present invention determines the current configuration time corresponding to the current configuration operation to be executed, encrypts the pre-generated configuration protocol based on the current configuration time and the preset default value, and obtains the encrypted protocol data corresponding to the current configuration operation. Since the current configuration time is different each time the encryption is performed, the dynamic encryption of the configuration protocol is realized, and the encrypted protocol data is effectively prevented from being leaked at will; the encrypted protocol data is sent to each device to be configured, so that the device to be configured performs device configuration based on the received encrypted protocol data, thereby improving the security of the configuration process.

[0059] In this embodiment, after sending the encrypted protocol data to the device to be configured, it also includes: receiving feedback information sent by the device to be configured, parsing the feedback information, and obtaining a decrypted value corresponding to the feedback information; based on a predetermined time value and a decrypted value corresponding to the encrypted protocol data, determining whether the feedback information is risk information.

[0060] The decrypted value is a value obtained after the device to be configured decrypts the encrypted protocol data. Exemplarily, after receiving the encrypted protocol data, the device to be configured can decrypt the time value according to a pre-stored decryption method, and use the time value as the decrypted value. The decryption method can be determined according to the encryption method when the client generates the encrypted value. For example, the encryption method is to add the time value to the preset default value to obtain the encrypted value; then the corresponding decryption method can be to parse the encrypted protocol data to obtain the encrypted value, and use the value obtained by subtracting the preset default value from the encrypted value as the decrypted value.

[0061] The feedback information includes device information and decrypted values. The device information includes at least one of the name, identification, MAC (Media Access Control Address) and IP (Internet Protocol) address of the device to be configured that sends the feedback information.

[0062] In a specific implementation, the device information and the decrypted value can be determined by parsing the feedback information. If the decrypted value is the time value decrypted by the device to be configured, the decrypted value can be compared with the time value determined when the encrypted protocol data is generated, and the comparison result is used to determine whether the feedback information is risk information. This embodiment determines whether the feedback information is risk information by decrypting the value and the time value, thereby avoiding the interception of the encrypted protocol data when it is sent, causing other devices to interfere with the client, and improving the security during the operation.

[0063] In a specific implementation, based on the predetermined time value and decryption value corresponding to the encryption protocol data, the method of determining whether the feedback information is risk information can be: if the difference between the decryption value and the time value is not within a preset range, the feedback information is determined to be risk information.

[0064] Exemplarily, the preset range may be (-1, 1).

[0065] It should be noted that if the device to be configured is a security device that is pre-connected to the client, the correct time value can be extracted as the decryption value according to the preset decryption method. If the difference between the decryption value and the time value is not within the preset range, it means that there is an error in the decryption of the device to be configured, or the device that sends the feedback information is an interception device that intercepts the encrypted protocol data. In order to improve the security during the operation, when the difference between the decryption value and the time value is not within the preset range, the feedback information can be determined as risk information, and the device corresponding to the feedback information is stopped from continuing to operate. If the difference between the decryption value and the time value is within the preset range, the feedback information can be determined as normal information, and the next step can be performed normally to complete the configuration of the device to be configured.

[0066] This embodiment can quickly determine whether the feedback information is risk information by setting a preset range, and the operation is simple and convenient with high accuracy.

[0067] Furthermore, this embodiment also includes: determining the number of times the device to be configured sends risk information; if the number of times is greater than a preset number, determining that the device to be configured is a risky device.

[0068] In a specific implementation, based on the feedback information, the device information of the device to be configured that sends the feedback information can be determined, and based on the device information and the historical reception information, the number of times the device to be configured sends risk information of the device information can be determined; if the number is greater than the preset number, it means that the device to be configured has a risk, and the device to be configured is treated as a risky device, and feedback information sent by the device to be configured is no longer received. If the number is less than or equal to the preset number, the feedback information sent by the device to be configured is received normally in the future. After each subsequent feedback information is received, it is determined whether there is a risk. If the number of risk information is not greater than the preset number, and feedback information sent by the device to be configured indicating that there is no risk is received, the number of times the risk information is sent in the historical reception information corresponding to the device to be configured can be reset to zero, and the number of times the risk information is sent can be re-counted.

[0069] This embodiment determines whether the device to be configured is a risky device by determining whether the number of times the device to be configured sends risk information is greater than a preset number. In this way, risky devices can be discovered quickly and timely to avoid data leakage.

[0070] Figure 2is a flowchart of another device configuration method provided according to an embodiment of the present invention. Optionally, before determining the current configuration time corresponding to the current configuration operation to be executed, it also includes: sending a search instruction to each device to be configured by broadcasting; receiving response data corresponding to the search instruction fed back by each device to be configured, and storing each response data in a pre-established queue; and rendering each response data to the interface in sequence according to the arrangement order in the queue. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. Figure 2 As shown, the method includes:

[0071] S210, sending a search instruction to each device to be configured by broadcasting, receiving response data corresponding to the search instruction fed back by each device to be configured, storing each response data in a pre-established queue, and rendering each response data to the interface in sequence according to the arrangement order in the queue.

[0072] Since there may be multiple devices to be configured, each device to be configured needs to be searched before configuring it. Specifically, the client can send a search instruction by broadcasting, and the devices to be configured in the LAN segment or the same switch respond after receiving the search instruction, and feed back the generated response data to the client.

[0073] It should be noted that the search operation can be regarded as an access configuration operation on the device to be configured. Based on the current search time corresponding to the search, the encrypted protocol data is generated according to the above encryption method, and the search instruction is generated from the encrypted protocol data and sent. After receiving the search instruction, the device to be configured responds and feeds back the response data; wherein the response data may include the device information and decrypted value of the device to be configured.

[0074] In order to avoid multiple devices to be configured feeding back response data corresponding to the search instruction at the same time, thereby causing the loss of response data, the process of receiving response data can be processed asynchronously. Specifically, after receiving the response data, the response data is stored in a pre-established queue in the order of the time of receipt, and each response data is rendered to the interface in the order of arrangement in the queue, thereby completing the search operation for the device to be configured.

[0075] Furthermore, in order to reduce the time consumption of searching for the devices to be configured, a timeout mechanism can be specified. Before rendering each response data to the interface in sequence according to the arrangement order in the queue, determine whether the response data is received again within the preset time length. If received, add the received response data to the queue and continue waiting; if not received, render the response data in the queue to the interface in sequence to complete the search operation for each device to be configured. Exemplarily, the preset time length can be 200 milliseconds.

[0076] S220: Determine the current configuration time corresponding to the current configuration operation to be executed.

[0077] S230: Encrypt the pre-generated configuration protocol based on the current configuration time and the preset default value to obtain encrypted protocol data corresponding to the current configuration operation.

[0078] The preset default value is pre-stored in each device to be configured and is used to decrypt the encrypted protocol data.

[0079] S240: Send the encrypted protocol data to each device to be configured, so that the device to be configured performs device configuration based on the received encrypted protocol data.

[0080] In this embodiment, concurrent asynchronous processing of response data is set, which does not occupy main line resources. By adding the response data to the queue, a large amount of response data is received at the same time, which causes data loss; and by setting a timeout mechanism, it is not necessary to wait until all data responses are received, which prompts the user's usability. During the configuration process, the configuration protocol is encrypted based on the current configuration time and the preset default value. Since the current configuration time corresponding to each configuration operation is different, dynamic encryption of the configuration protocol is formed, which effectively prevents data from being maliciously obtained and data leakage. It can also effectively prevent the situation where malicious access data is received after data leakage, causing the client or the device to be configured to continuously process.

[0081] Figure 3 1 is a schematic diagram of the structure of a device configuration apparatus provided according to an embodiment of the present invention, and the device is used to execute the device configuration method provided in any of the above embodiments. The device and the device configuration method of the above embodiments belong to the same inventive concept, and the details not described in detail in the embodiment of the device configuration apparatus can refer to the embodiment of the above device configuration method. Figure 3 As shown, the device comprises:

[0082] The current configuration time determination module 10 is used to determine the current configuration time corresponding to the current configuration operation to be executed;

[0083] A configuration protocol encryption module 11 is used to encrypt a pre-generated configuration protocol based on a current configuration time and a preset default value to obtain encrypted protocol data corresponding to a current configuration operation;

[0084] Wherein, the preset default value is pre-stored in each device to be configured and is used to decrypt the encrypted protocol data;

[0085] The encrypted protocol data sending module 12 is used to send the encrypted protocol data to each device to be configured, so that the device to be configured performs device configuration based on the received encrypted protocol data.

[0086] Based on any optional technical solution in the embodiment of the present invention, optionally, the configuration protocol encryption module 11 includes:

[0087] The time value obtaining unit is used to calculate the current configuration time according to a preset calculation method to obtain the time value;

[0088] The encrypted value obtaining unit is used to add the time value to a preset default value to obtain an encrypted value;

[0089] The data encryption unit is used to add the encryption value to the preset encryption byte of the configuration protocol to encrypt the configuration protocol.

[0090] Based on any optional technical solution in the embodiments of the present invention, optionally, the time value obtaining unit includes:

[0091] An information determination subunit, used to determine the year, month, day, hour, minute, and second information of the current configuration time;

[0092] A time and value obtaining subunit is used to add the years, months and days in the year-month-day information to obtain the time and value;

[0093] A time product obtaining subunit is used to multiply the hours, minutes and seconds in the hour, minute and second information to obtain the time product;

[0094] The time value determination subunit is used to determine the time value by adding the time and the value and the time product.

[0095] Based on any optional technical solution in the embodiments of the present invention, optionally, the following further includes:

[0096] The feedback information receiving subunit is used to receive the feedback information sent by the device to be configured, parse the feedback information, and obtain the decrypted value corresponding to the feedback information; wherein the decrypted value is the value obtained after the device to be configured decrypts the encrypted protocol data;

[0097] The risk information determination subunit is used to determine whether the feedback information is risk information based on a predetermined time value and a decryption value corresponding to the encryption protocol data.

[0098] Based on any optional technical solution in the embodiments of the present invention, optionally, the risk information determination subunit is specifically used to: if the difference between the decrypted value and the time value is not within a preset range, determine that the feedback information is risk information.

[0099] Based on any optional technical solution in the embodiments of the present invention, optionally, the following further includes:

[0100] A times determination module, used to determine the times that the device to be configured sends risk information;

[0101] The risk device determination module is used to determine that the device to be configured is a risk device if the number of times is greater than a preset number of times.

[0102] Based on any optional technical solution in the embodiments of the present invention, optionally, the following further includes:

[0103] A search instruction sending module, used for sending a search instruction to each device to be configured by broadcasting before determining the current configuration time corresponding to the current configuration operation to be executed;

[0104] A response data receiving module is used to receive response data corresponding to the search instruction fed back by each device to be configured, and store each response data in a pre-established queue;

[0105] The data rendering module is used to render each response data to the interface in sequence according to the arrangement order in the queue.

[0106] The technical solution of the embodiment of the present invention determines the current configuration time corresponding to the current configuration operation to be executed, encrypts the pre-generated configuration protocol based on the current configuration time and the preset default value, and obtains the encrypted protocol data corresponding to the current configuration operation. Since the current configuration time is different each time the encryption is performed, the dynamic encryption of the configuration protocol is realized, and the encrypted protocol data is effectively prevented from being leaked at will; the encrypted protocol data is sent to each device to be configured, so that the device to be configured performs device configuration based on the received encrypted protocol data, thereby improving the security of the configuration process.

[0107] It is worth noting that in the embodiment of the above-mentioned device configuration apparatus, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0108] Figure 4 Schematic diagram of the structure of an electronic device that implements the device configuration method of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0109] like Figure 4 As shown, the electronic device 20 includes at least one processor 21, and a memory connected to the at least one processor 21, such as a read-only memory (ROM) 22, a random access memory (RAM) 23, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 21 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 22 or the computer program loaded from the storage unit 28 to the random access memory (RAM) 23. In RAM23, various programs and data required for the operation of the electronic device 20 can also be stored. The processor 21, ROM22 and RAM23 are connected to each other through a bus 24. An input / output (I / O) interface 25 is also connected to the bus 24.

[0110] A number of components in the electronic device 20 are connected to the I / O interface 25, including: an input unit 26, such as a keyboard, a mouse, etc.; an output unit 27, such as various types of displays, speakers, etc.; a storage unit 28, such as a disk, an optical disk, etc.; and a communication unit 29, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 29 allows the electronic device 20 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0111] The processor 21 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 21 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 21 executes the various methods and processes described above, such as a device configuration method.

[0112] In some embodiments, the device configuration method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 28. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 20 via the ROM 22 and / or the communication unit 29. When the computer program is loaded into the RAM 23 and executed by the processor 21, one or more steps of the device configuration method described above may be performed. Alternatively, in other embodiments, the processor 21 may be configured to execute the device configuration method in any other appropriate manner (e.g., by means of firmware).

[0113] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0114] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0115] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0116] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0117] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0118] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0119] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0120] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A device configuration method, It is characterized in that include: Determine the current configuration time corresponding to the current configuration operation to be executed; Based on the current configuration time and the preset default value, encrypt the pre-generated configuration protocol to obtain encrypted protocol data corresponding to the current configuration operation; Wherein, the preset default value is pre-stored in each device to be configured and is used to decrypt the encrypted protocol data; Sending the encrypted protocol data to each device to be configured, so that the device to be configured performs device configuration based on the received encrypted protocol data; The encrypting of the pre-generated configuration protocol based on the current configuration time and the preset default value includes: Calculate the current configuration time according to a preset calculation method to obtain a time value; Adding the time value to the preset default value to obtain an encrypted value; Adding the encrypted value to a preset encryption byte of the configuration protocol to encrypt the configuration protocol; Receiving feedback information sent by the device to be configured, parsing the feedback information, and obtaining a decrypted value corresponding to the feedback information; wherein the decrypted value is a value obtained after the device to be configured decrypts the encrypted protocol data; Based on the predetermined time value and the decryption value corresponding to the encrypted protocol data, it is determined whether the feedback information is risk information.

2. The method according to claim 1, It is characterized in that The calculating the current configuration time according to a preset calculation method to obtain a time value includes: Determine the year, month, day, hour, minute, and second information of the current configuration time; Add the year, month and day in the year-month-day information to obtain the time and value; Multiply the hours, minutes and seconds in the hour, minute and second information to obtain a time product; The time value is determined by adding the time and value and the time product.

3. The method according to claim 1, It is characterized in that The determining whether the feedback information is risk information based on the predetermined time value and the decryption value corresponding to the encryption protocol data includes: If the difference between the decrypted value and the time value is not within a preset range, the feedback information is determined to be risk information.

4. The method according to claim 3, It is characterized in that Also includes: Determine the number of times the device to be configured sends risk information; If the number is greater than a preset number, the device to be configured is determined to be a risky device.

5. The method according to claim 1, It is characterized in that Before determining the current configuration time corresponding to the current configuration operation to be executed, the method further includes: Sending a search command to each device to be configured by broadcasting; Receiving response data corresponding to the search instruction fed back by each of the to-be-configured devices, and storing each of the response data in a pre-established queue; According to the arrangement order in the queue, each of the response data is rendered to the interface in sequence.

6. A device configuration apparatus, It is characterized in that include: A current configuration time determination module is used to determine the current configuration time corresponding to the current configuration operation to be executed; A configuration protocol encryption module, used to encrypt a pre-generated configuration protocol based on the current configuration time and a preset default value to obtain encrypted protocol data corresponding to the current configuration operation; Wherein, the preset default value is pre-stored in each device to be configured and is used to decrypt the encrypted protocol data; An encrypted protocol data sending module, used to send the encrypted protocol data to each device to be configured, so that the device to be configured performs device configuration based on the received encrypted protocol data; Wherein, the configuration protocol encryption module includes: A time value obtaining unit, used to calculate the current configuration time according to a preset calculation method to obtain the time value; An encrypted value obtaining unit, used for adding the time value to the preset default value to obtain the encrypted value; a data encryption unit, configured to add the encrypted value to a preset encryption byte of the configuration protocol to encrypt the configuration protocol; A feedback information receiving subunit, configured to receive feedback information sent by the device to be configured, parse the feedback information, and obtain a decrypted value corresponding to the feedback information; wherein the decrypted value is a value obtained after the device to be configured decrypts the encrypted protocol data; The risk information determination subunit is used to determine whether the feedback information is risk information based on the predetermined time value and the decryption value corresponding to the encryption protocol data.

7. An electronic device, It is characterized in that The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the device configuration method according to any one of claims 1 to 5.

8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the device configuration method according to any one of claims 1 to 5 when executed.