Control method and device of security and protection equipment, electronic equipment and storage medium
By generating and storing control instructions and their identifications in the server, the problem of poor operating stability of security equipment in an unstable network environment is solved, and the normal communication of control instructions and rapid resolution of equipment failures is achieved.
Patent Information
- Application Number
- CN202411560582.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-02-14
AI Technical Summary
Security equipment has poor operating stability in an unstable network environment, resulting in the control instructions sent by users being unable to be communicated to the security equipment normally.
The server generates the corresponding identifier for the control command and stores the control command in the server, so that the server can send the control command to the security device at any time. At the same time, the server records the operation log of the security device, and users can query the operation log to understand the operation status of the device and quickly resolve the fault.
It improves the operating stability of security equipment in unstable network environments, ensures that control instructions can be communicated normally, and quickly resolves equipment failures through operation logs.
Smart Images

Figure CN119449865A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of remote control of security equipment, and in particular to a control method, device, electronic equipment and storage medium for security equipment. Background Art
[0002] Security equipment is a device used to ensure the safety of the protected object, including video equipment, security inspection equipment and access control equipment. Users send control instructions to security equipment through remote communication to achieve remote control of security equipment. If the security equipment is in an unstable network environment, such as due to network fluctuations or other reasons, the security equipment is temporarily offline, the control instructions sent by the user cannot be transmitted to the security equipment normally, resulting in poor stability of the security equipment operation. Summary of the invention
[0003] In response to the above problems, the embodiments of the present application provide a control method, device, electronic device and storage medium for security equipment. The solution of the present application is conducive to solving the problem of poor operating stability of security equipment in an unstable network environment.
[0004] In a first aspect, an embodiment of the present application provides a method for controlling a security device, which is applied to a security system. The security system includes a front-end device, a server and a first security device. The front-end device controls the first security device through the server. The method includes: the front-end device sends a control instruction to the server, and the control instruction is used to request control of the first security device; the server receives the control instruction and generates a first identifier corresponding to the control instruction; the server sends the control instruction and the first identifier to the first security device; the first security device receives the control instruction and the first identifier, and executes the control instruction; the first security device generates an execution result record after the control instruction is executed, and sends the execution result record and the first identifier to the server; the server receives the execution result record and the first identifier, and determines a first execution time of the control instruction, the first execution time being the time between the moment when the front-end device sends the control instruction to the server and the current moment; if the first execution time is less than the first preset time, the server generates a corresponding operation log according to the execution result record, and stores the operation log and the first identifier in a database of the server.
[0005] It can be seen that in the embodiment of the present application, the first identifier corresponding to the control instruction is generated by the server, and the control instruction can be stored in the server, so that the server can send the control instruction corresponding to the control instruction to the first security device at any time, solving the problem of unstable operation of the security device in a weak network environment. The server can also record the operation log of the first security device through the first identifier and the second identifier. The user can query the operation log to know whether the first security device is operating normally or investigate the cause of the fault, and then quickly solve the possible fault of the security device, further improving the operational stability of the security device.
[0006] In combination with the first aspect, in a possible embodiment, the method further includes: if the server fails to obtain the execution result record within a first preset time, the server resends the control instruction and the first identifier to the first security device.
[0007] It can be seen that in the embodiment of the present application, by re-sending the control instruction and the first identification to the first security device when it is determined that the first security device has not sent the execution result record within the first preset time, the problem of the first security device not receiving the control instruction and the first identification due to network fluctuations is solved, and the operating stability of the security device is further improved.
[0008] In combination with the first aspect, in a possible embodiment, the front-end device is also connected to the first security device, and the method also includes: if the first security device fails to send the execution result record and the first identification to the server, the first security device generates a corresponding second identification based on the first identification, and sends the execution result record and the second identification to the front-end device; the front-end device receives the execution result record and the second identification, and sends the execution result record and the second identification to the server; the server receives the execution result record and the second identification, and determines a second execution time of the control instruction, the second execution time being the time between the moment when the front-end device sends the control instruction to the server and the current moment; if the second execution time is less than the second preset time, the server generates a corresponding operation log based on the execution result record, and stores the operation log and the second identification in the database of the server, and the second preset time is greater than the first preset time.
[0009] It can be seen that in the embodiment of the present application, the first security device sends the execution result record and the first identification to the server through the front-end device, which solves the problem that the first security device cannot directly send the execution result record and the first identification to the server due to network fluctuations, and further improves the operating stability of the security device.
[0010] In combination with the first aspect, in a possible embodiment, the front-end device and the first security device are connected via a local area network, and an execution result record and a second identifier are sent to the front-end device, including: the first security device broadcasts the execution result record and the second identifier in the local area network; the front-end device monitors the local area network until the execution result record and the second identifier are obtained.
[0011] It can be seen that in the embodiment of the present application, when the first security device is unable to send the execution result record and the second identification to the server, the execution result record and the second identification are forwarded by broadcasting in the local area network and then forwarding the execution result record and the second identification through the front-end device, thereby solving the problem that the first security device is unable to send the execution result record and the second identification to the server due to network fluctuations and other reasons, and further improving the operating stability of the security device.
[0012] In combination with the first aspect, in a possible embodiment, if the execution time is less than a first preset time or the execution time is less than a second preset time, the method also includes: the server sends a first notification to the front-end device, and the first notification is used to indicate that the control instruction is executed successfully; if the execution time is not less than the first preset time or the execution time is not less than the second preset time, the method also includes: the server sends a second notification to the front-end device, and the second notification is used to indicate that the control instruction fails to execute.
[0013] In combination with the first aspect, in a possible embodiment, after the server receives a control instruction and generates a control instruction and a first identifier corresponding to the control instruction, the method also includes: the server sends the first identifier to the front-end device; after the server sends a first notification to the front-end device, the method also includes: the front-end device sends a query request and the first identifier to the server; the server receives the query request and the first identifier, and queries the database for an operation log corresponding to the first identifier; if the server successfully queries the database for an operation log corresponding to the first identifier, the operation log corresponding to the first identifier is sent to the front-end device.
[0014] It can be seen that in the embodiment of the present application, the front-end device queries the operation log of the control instruction recorded by the server through the query request and the first identifier. The user of the front-end device can then determine whether the security device is operating normally according to the operation log, or judge whether the security device has a fault and whether maintenance is required, which further improves the operating stability of the security device.
[0015] In combination with the first aspect, in a possible embodiment, if the security system includes multiple security devices, the first security device is one of the multiple first security devices, before the server sends a control instruction and a first identifier to the first security device, the method also includes: the server determines that the first security device is online; if the server determines that the first security device is offline, the server determines a second security device from the multiple first security devices, and the second security device is one of the multiple security devices that is connected to the first security device; the server sends a control instruction and a first identifier to the second security device; the second security device receives the control instruction and the first identifier, and sends the control instruction and the first identifier to the first security device.
[0016] It can be seen that in the embodiment of the present application, when the first security device is in an offline state, the server forwards the control instruction and the first identifier through the second security device connected to the first security device, thereby solving the problem that the first security device and the server cannot communicate normally due to network fluctuations and other reasons, and further improving the operating stability of the security device.
[0017] In a second aspect, an embodiment of the present application further provides a control device for a security device, the device is used to execute a control method for a security device, the device belongs to a security system, the security system includes a front-end device, a server and a first security device, the front-end device controls the first security device through the server, and the device includes:
[0018] A sending unit: used for sending a control instruction to the server, where the control instruction is used for requesting to control the first security device;
[0019] Receiving unit: used for receiving a control instruction and generating a first identifier corresponding to the control instruction;
[0020] A sending unit: used for sending a control instruction and a first identifier to the first security device;
[0021] Receiving unit: used for receiving the control instruction and the first identifier, and executing the control instruction;
[0022] A generating unit: used for generating an execution result record after the control instruction is executed, and sending the execution result record and the first identifier to the server;
[0023] Receiving unit: used to receive the execution result record and the first identifier, and determine the first execution time of the control instruction, the first execution time being the time between the moment when the front-end device sends the control instruction to the server and the current moment;
[0024] Storage unit: used for generating a corresponding operation log according to the execution result record if the first execution time is less than the first preset time, and storing the operation log and the first identifier in the database of the server.
[0025] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and one or more instructions are suitable for being loaded by the processor and executing part or all of the method of the first aspect.
[0026] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the method of the first aspect.
[0027] In a fifth aspect, the present application provides a computer program product. When a computer reads and executes the computer program product, the computer executes the method in any possible design of the first to second aspects above.
[0028] It can be understood that the beneficial effects of the embodiments of the second to fifth aspects can refer to the beneficial effects of the method of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0030] Figure 1 A schematic diagram of the structure of a security equipment system provided in an embodiment of the present application;
[0031] Figure 2 A schematic diagram of a flow chart of a method for controlling a security device provided in an embodiment of the present application;
[0032] Figure 3 A schematic diagram of a scenario in which a front-end device obtains an execution result record and a second identifier provided in an embodiment of the present application;
[0033] Figure 4 A schematic diagram of sending a control instruction through a second security device provided in an embodiment of the present application;
[0034] Figure 5 A schematic diagram of the structure of a control device for security equipment provided in an embodiment of the present application;
[0035] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0037] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" 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 limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0038] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0039] The embodiments of the present application are described below in conjunction with the accompanying drawings.
[0040] See also Figure 1 , Figure 1 A schematic diagram of the structure of a security equipment system provided in an embodiment of the present application, the security system 100 includes a front-end device 101, a server 102 and a first security device 103. The front-end device 101 here is a user terminal, and the user generates a control instruction through the front-end device 101 to control the first security device 103, specifically a smart phone, a smart tablet, a computer, a vehicle-mounted terminal and other devices. The server 102 here is connected to the front-end device 101 and the first security device 103 respectively; and controls the first security device 103 according to the control instruction sent by the front-end device 101. The first security device 103 here is a device or equipment that can provide prevention or protection, used to protect the safety of the protected object, specifically including a camera device, a door access device, a security inspection device, etc.
[0041] In an embodiment of the present application, the front-end device 101 sends a control instruction to the server 102. The control instruction here is sent by the user through the front-end device 101, and is specifically used to control the first security device 103 to start, shut down, change the operating rules, etc.
[0042] The server 102 generates a first identifier corresponding to the control instruction; the first identifier here is used to distinguish different control instructions. The first identifier here is used to indicate that the control instruction is sent by the front-end device 101.
[0043] Furthermore, there is a database in the server 102, and the database is used to store control instructions, operation logs, and corresponding identifications for different security devices.
[0044] The server 102 sends the control instruction and the first identifier to the first security device 103, and the first security device 103 then performs operations such as starting and stopping the operation according to the control instruction and the first identifier, and generates an execution result record according to the execution result.
[0045] The first security device 103 sends a control instruction and a first identifier to the server 102 .
[0046] The server 102 receives the control instruction and the first identifier, obtains the control time, and if the execution time is less than the first preset time, the server 102 generates a corresponding operation log according to the execution result record; wherein the execution time is the time from the moment when the server 102 receives the control instruction to the current moment. The execution time here is the time limit for the control instruction. If the execution result record sent by the first security device 103 is not received within the first preset time, the server 102 determines that the first security device 103 has not received the control instruction, and resends the control instruction and the first identifier to the first security device 103.
[0047] If the execution time is less than the first preset time, the control instruction server 102 stores the operation log and the first identifier in a database of the server, so as to query the operation log related to the control instruction later.
[0048] It can be seen that in the embodiment of the present application, the first identifier corresponding to the control instruction is generated by the server, and the control instruction can be stored in the server, and the server can send the control instruction corresponding to the control instruction to the first security device at any time, solving the problem of unstable operation of the security device in a weak network environment. The server can also record the operation log of the first security device through the first identifier and the second identifier. The user can query the operation log to know whether the first security device is operating normally or investigate the cause of the fault, and can quickly solve the possible fault of the security device, further improving the operational stability of the security device.
[0049] See also Figure 2 , Figure 2 A flow chart of a control method for a security device provided in an embodiment of the present application can be based on Figure 1 The system implementation shown is Figure 2 As shown, steps S201-S207 are included:
[0050] S201: The front-end device sends a control instruction to the server, where the control instruction is used to request control of the first security device.
[0051] Specifically, the control instruction here is that the user of the front-end device inputs relevant instructions to the front-end device, thereby instructing the front-end device to send it to the server. In the embodiment of the present application, the front-end device is unable to directly connect to the first security device and control the security device due to distance, communication cost, etc., so the front-end device controls the security device through the server.
[0052] S202: The server receives the control instruction and generates a first identifier corresponding to the control instruction.
[0053] Specifically, the server generates a control instruction corresponding to the control instruction to control the first security device, and generates a first identifier to characterize the control instruction and the control instruction from a plurality of control instructions and the control instruction.
[0054] S203: The server sends a control instruction and a first identifier to the first security device.
[0055] Specifically, the server sends the control instruction and the first identifier to the first security device to instruct the first security device to operate according to the control instruction, and notifies the first security device that the control instruction corresponds to the first identifier.
[0056] In a possible embodiment, the method further includes: if the server fails to obtain the execution result record within the first preset time, the server resends the control instruction and the first identifier to the first security device.
[0057] Specifically, the first preset time here is the time limit set by the security device control system that requires the first security device to send an execution result record. If the server receives the execution result record sent by the first security device within the time limit (i.e., the first preset time), it proves that the operating status of the first security device is normal and the subsequent steps can be continued.
[0058] In the embodiment of the present application, the server fails to obtain the execution result record sent by the first security device within the first preset time, and the first security device cannot send the execution result record to the server in time. The reason why the first security device cannot send the execution result record to the server in time may be that the control instruction is not sent to the first security device due to a network connection failure. Therefore, the server attempts to solve the problem by resending the control instruction.
[0059] When the execution result record sent by the first security device is not obtained within the first preset time, the server first queries the database to see whether there is an operation log corresponding to the first identifier. This is because the first security device may have sent the execution result record to the server in other ways (for example, forwarded by a front-end device, forwarded by other security devices, etc.). Therefore, the server first queries the database to see whether there is an operation log corresponding to the first identifier to determine whether the operation instruction for the first security device is completed.
[0060] After determining that the execution result record sent by the first security server has not been received, the server resends the control instruction and the first identifier to the first security device. In a specific embodiment, the above resending step will be repeated multiple times at a preset frequency, for example, 3 times for 3 seconds, etc. If the execution result record sent by the first security server is received in the middle, the repetition will stop.
[0061] Furthermore, if the first security device is offline due to network fluctuations and cannot receive information sent by the server, the first security device will continue to try to reconnect with the server. When the first security device reconnects with the server, the server will monitor the reconnection event of the first security device. After the server monitors the reconnection event of the first security device, the server will perform an additional step of resending the control instruction and the first identifier.
[0062] It can be seen that in the embodiment of the present application, by re-sending the control instruction and the first identification to the first security device when it is determined that the first security device has not sent the execution result record within the first preset time, the problem of the first security device not receiving the control instruction and the first identification due to network fluctuations is solved, and the operating stability of the security device is further improved.
[0063] In a possible embodiment, if the server monitors a reconnection event of the first security device, before the server queries the operation log corresponding to the first identifier in the database according to the first identifier, the method also includes: the server obtains the instruction type of the control instruction; if the instruction type is a non-real-time instruction, executes the above-mentioned steps of querying the operation log corresponding to the first identifier and subsequently resending the control instruction and the first identifier, and the non-real-time instruction is an instruction that will not produce a different control effect if it is not sent to the first security device in time; if the control type is a real-time instruction, then according to the control, the second control instruction and the first identifier are sent to the first security device, and the real-time instruction is an instruction that will produce a different control effect if it is not sent to the first security device in time.
[0064] Specifically, the non-real-time instructions here specifically refer to instructions such as changing the camera area of the camera device, or shutting down the security device, which will not produce different control effects due to not being sent to the first security device in time. Although the security device was not online before and the control instruction was not sent to the first security device in time, resending the control instruction at this time can also satisfy the user's control instruction. At this time, the control instruction is directly sent to the first security device.
[0065] If the control instruction here is a real-time control instruction, for example, requiring the camera device to upload the camera record before the first moment; if the instruction is not sent to the first security device in time, and the first security device is still operating normally, the instruction loses its real-time nature, and the original instruction instructing the first security device to send the camera record before the first moment cannot meet the user's need to obtain all the camera records of the security device. In other words, the real-time instruction is an instruction that will produce different control effects due to not being sent to the first security device in time.
[0066] Therefore, a new control instruction is generated according to the control instruction, for example, the content of the original control instruction is modified to instruct the first security device to upload the video records before the second moment, and also upload the video records obtained during the time when the first security device is in an offline state, thereby satisfying the user's need to obtain all the video records of the security device.
[0067] It can be seen that in the embodiment of the present application, the instruction type of the control instruction is used to determine whether a new control instruction needs to be generated. When the control instruction cannot be delivered to the security device in time, the user's control needs can be met. The user does not need to send more control instructions, which further improves the operating efficiency of the security system.
[0068] In a possible embodiment, the front-end device is also connected to the first security device, and the method also includes: if the first security device fails to send the execution result record and the first identification to the server, the first security device generates a corresponding second identification based on the first identification, and sends the execution result record and the second identification to the front-end device; the front-end device receives the execution result record and the second identification, and sends the execution result record and the second identification to the server; the server receives the execution result record and the second identification, and determines a second execution time of the control instruction, the second execution time being the time between the moment when the front-end device sends the control instruction to the server and the current moment; if the second execution time is less than the second preset time, the server generates a corresponding operation log based on the execution result record, and stores the operation log and the second identification in the database of the server, and the second preset time is greater than the first preset time.
[0069] Specifically, the front-end device is connected to the first security device, which specifically means that the front-end device is connected to the first security device through a short-distance connection method such as Bluetooth, local area network, etc., and does not mean that the front-end device is connected to the first security device through a server. In an embodiment of the present application, if the first security device fails to send the execution result record and the first identifier directly to the server, the first security device can try to send the execution result record and the first identifier to the server through other methods. The second identifier here corresponds one-to-one to the first identifier, and the server and the first security device can generate a unique second identifier based on the first identifier or generate a unique first identifier based on the second identifier.
[0070] The first security device first sends the execution result record and the first identifier to the front-end device through Bluetooth connection, local area network connection, etc. The front-end device then sends the execution result record and the second identifier to the front-end device through a mobile network, etc. The server determines, based on the first identifier, that the execution result record here is the execution result record of the control instruction previously sent to the first security device, thereby generating a corresponding operation log based on the execution result record; the server stores the operation log and the first identifier in a database of the server.
[0071] To prevent generation of duplicate operation logs, the server first determines whether the execution time is less than the first preset time and whether there is a corresponding operation log in the database before generating the operation log corresponding to the first identifier.
[0072] In addition, if the execution time is greater than the third preset time, it is necessary to record the corresponding execution result record feedback timeout in the operation log. If the corresponding operation log already exists in the database, it is necessary to directly discard the execution result record and the second identifier obtained here. The third preset time here is greater than the first preset time.
[0073] It can be seen that in the embodiment of the present application, the first security device sends the execution result record and the first identification to the server through the front-end device, which solves the problem that the first security device cannot directly send the execution result record and the first identification to the server due to network fluctuations, and further improves the operating stability of the security device.
[0074] In a possible embodiment, the front-end device and the first security device are connected via a local area network, and the execution result record and the second identification are sent to the front-end device, including: the first security device broadcasts the execution result record and the second identification in the local area network; the front-end device monitors the local area network until the execution result record and the second identification are obtained.
[0075] Specifically, in the embodiment of the present application, the front-end device and the first security device are connected via a local area network, which means that the front-end device and the first security device are connected in a local area network generated by the same network device or network system. At this time, if the first security device fails to send the execution result record and the second identification to the server, the first security device broadcasts the execution result record and the second identification in the local area network, and the front-end device monitors the local area network to obtain the corresponding execution result record and the second identification.
[0076] For example, see Figure 3 , Figure 3 A schematic diagram of a scenario in which a front-end device obtains an execution result record and a second identifier provided in an embodiment of the present application, in the scenario 300, the front-end device 301 and the first security device 303 are connected in a local area network generated by a network device 304. As shown in the figure, the coverage of the local area network generated by the network device 304 includes the front-end device 301 and the first security device 303. In the actual scenario, there may be more other devices. The first security device 303 is connected to the server 302 through the network device 304 and stores relevant information. However, due to network fluctuations and other reasons, the network device 304 and the server 302 cannot communicate normally. Therefore, the first security device 303 transmits the execution result record and the second identifier to the front-end device 301 by broadcasting the execution result record and the second identifier in the local area network, so that the front-end device 301 forwards the execution result record and the second identifier to the server 302.
[0077] It can be seen that in the embodiment of the present application, when the first security device is unable to send the execution result record and the second identification to the server, the execution result record and the second identification are sent to the front-end device by broadcasting in the local area network, and then the execution result record and the second identification are forwarded by the front-end device, thereby solving the problem that the first security device is unable to send the execution result record and the second identification to the server due to network fluctuations and other reasons, and further improving the operating stability of the security device.
[0078] Furthermore, if the local area network here is a public network, the first security device broadcasts the execution result record and the second identification in the local area network, including: the first security device generates encrypted information according to the execution result record; the first security device broadcasts the encrypted information and the second identification in the local area network; the front-end device obtains the encrypted information and the second identification in the local area network according to the first identification, including: the front-end device obtains the second identification in the local area network; after the front-end device obtains the second identification in the local area network, it obtains the encrypted information corresponding to the second identification; the front-end device decrypts the encrypted information to obtain the execution result record corresponding to the encrypted information.
[0079] Optionally, if the local area network here is a public network, the front-end device here can also be other front-end devices connected to the local area network, and other front-end devices continuously monitor the local area network to obtain the identifier. The identifier here specifically refers to the first identifier and the second identifier. After obtaining the second identifier from the local area network, the execution result record broadcasted together with the second identifier is obtained. After obtaining the first execution result and the second identifier, the execution result record and the second identifier are sent to the server. And the second identifier is recorded so that the execution result record and the second identifier will not be repeatedly sent to the server when the second identifier and the corresponding execution result record are obtained next time.
[0080] Furthermore, to prevent repeated transmission of the execution result record and the second identifier, if the execution time is greater than the fourth execution time, the front-end device sends a query request and the first identifier to the server; if the front-end identifies and receives the operation log corresponding to the first identifier sent by the server in response to the query request, the front-end device stops obtaining the second identifier corresponding to the first identifier in the local area network according to the first identifier. The fourth execution time is less than the third execution time.
[0081] S204: The first security device receives the control instruction and the first identifier, and executes the control instruction.
[0082] S205: After the control instruction is executed, the first security device generates an execution result record, and sends the execution result record and the first identifier to the server.
[0083] Specifically, the execution result record here includes information such as the execution process and execution result of the control instruction. The execution result record is specifically generated during the process of the first security device executing the control instruction.
[0084] S206: The server receives the execution result record and the first identifier, and determines a first execution time of the control instruction, where the first execution time is the time between the moment when the front-end device sends the control instruction to the server and the current moment.
[0085] Specifically, the first execution time here is the time when the server starts recording when receiving the control instruction.
[0086] S207: If the first execution time is less than the first preset time, the server generates a corresponding operation log according to the execution result record, and stores the operation log and the first identifier in a database of the server.
[0087] Specifically, if the execution time is less than the first preset time, it proves that the first security device has sent feedback information for the control instruction within the normal response time limit, proving that the first security device has executed the control instruction or is executing the control instruction. The server then stores the operation log and the first identifier in the database of the server for subsequent reference by the front-end device and other devices.
[0088] In a possible embodiment, if the execution time is less than the first preset time or the execution time is less than the second preset time, the method also includes: the server sends a first notification to the front-end device, and the first notification is used to indicate that the control instruction is executed successfully; if the execution time is not less than the first preset time or the execution time is not less than the second preset time, the method also includes: the server sends a second notification to the front-end device, and the second notification is used to indicate that the control instruction fails to execute.
[0089] Specifically, in an embodiment of the present application, after the server stores the operation log, the first identifier and the second identifier in the server's database, the server sends a first notification to the front-end device to notify the front-end device that the control instruction has been successfully executed, and the user can also query the corresponding operation log.
[0090] If the server fails to receive the execution result record sent by the first security device within the first preset time, or receives other information indicating the failure of the control instruction execution sent by the first security device, the server sends a second notification to the front-end device to notify the execution of the control instruction corresponding to the first identifier.
[0091] In addition, when the server determines that the execution result record is sent directly to the server by the first security device, the server determines whether the control instruction is executed successfully or failed based on whether the execution time is less than the first preset time; when the server determines that the execution result record is not sent directly to the server by the first security device, the server determines whether the control instruction is executed successfully or failed based on whether the execution time is less than the second preset time. If the execution result record is sent to the server together with the first identifier, the server determines that the execution result record is sent directly by the first security device; if the execution result record is sent to the server together with the second identifier, the server determines that the execution result record is not sent directly by the first security device.
[0092] In a possible embodiment, after the server receives the control instruction and generates the control instruction and the first identifier corresponding to the control instruction, the method also includes: the server sends the first identifier to the front-end device; after the server sends the first notification to the front-end device, the method also includes: the front-end device sends a query request and the first identifier to the server; the server receives the query request and the first identifier, and queries the database for the operation log corresponding to the first identifier; if the server successfully queries the database for the operation log corresponding to the first identifier, the operation log corresponding to the first identifier is sent to the front-end device.
[0093] Specifically, in the embodiment of the present application, after the server generates the first identifier corresponding to the control instruction, it also sends the first identifier to the front-end device to notify the front-end device to distinguish different notification requests through different identifiers, so that the front-end device can query the operation log and other operations corresponding to the control instruction according to the first identifier.
[0094] The front-end device sends a query request and a first identifier to the server, requesting the server to send the operation log corresponding to the control instruction. The server queries the operation log corresponding to the first identifier according to the query request sent by the front-end device. After the operation log corresponding to the first identifier is found in the database, the query request of the corresponding front-end device sends the operation log corresponding to the first identifier to the front-end device. If the query fails, the corresponding notification information is sent to notify the front-end device that the operation log corresponding to the first identifier is not recorded in the database.
[0095] It can be seen that in the embodiment of the present application, the front-end device queries the operation log of the control instruction recorded by the server through the query request and the first identifier. The user of the front-end device can then determine whether the security device is operating normally according to the operation log, or judge whether the security device has a fault and whether maintenance is required, which further improves the operating stability of the security device.
[0096] In a possible embodiment, if the security system includes multiple security devices, and the first security device is one of the multiple first security devices, before the server sends the control instruction and the first identifier to the first security device, the method also includes: the server determines that the first security device is online; if the server determines that the first security device is offline, the server determines a second security device from the multiple first security devices, and the second security device is one of the multiple security devices that is connected to the first security device; the server sends the control instruction and the first identifier to the second security device; the second security device receives the control instruction and the first identifier, and sends the control instruction and the first identifier to the first security device.
[0097] Specifically, in an embodiment of the present application, the server can query whether the security device is online. If the first security device is online, the server sends the control instruction and the first identifier directly to the first security device. For a detailed description of the server sending the control instruction and the first identifier directly to the first security device, please refer to the aforementioned related content, which will not be repeated here.
[0098] If the server determines that the first security device is offline, it proves that the first security device is not connected to the server due to network fluctuations and other reasons. At this time, the server attempts to send control instructions and the first identification to the first security device through the second security device. The second security device here is a security device that is connected to the first security device, and there are usually multiple of them in actual application scenarios. For example, in a home scenario, there are multiple security devices of different types (a camera device and a door access control device, etc.), while in a commercial scenario, there may be multiple security devices of the same type (multiple camera devices and multiple door access control devices, etc.). At this time, the control instructions and the first identification can be sent to the first security device through other online security devices.
[0099] For example, see Figure 4 , Figure 4 A schematic diagram of sending a control instruction through a second security device provided in an embodiment of the present application. The server 401 determines that the first security device 402 is offline, while the second security device 403 is online, and the second security device 403 is connected to the first security device 402. The server 401 sends the control instruction and the first identifier to the second security device 403, and instructs the second security device 403 to forward the control instruction and the first identifier to the second security device 403.
[0100] It can be seen that in the embodiment of the present application, when the first security device is in an offline state, the server forwards the control instruction and the first identifier through the second security device connected to the first security device, thereby solving the problem that the first security device and the server cannot communicate normally due to network fluctuations and other reasons, and further improving the operating stability of the security device.
[0101] In a possible embodiment, the server determines the second security device from the multiple first security devices, including: the server obtains multiple target security devices from the multiple security devices, the target security device is the device with the highest security level among the multiple security devices; the server obtains the control instruction sending success rate of each target security device among the multiple target security devices; the server determines the target security device with the highest control instruction sending success rate as the second security device.
[0102] Specifically, the security level here is used to characterize the importance of the corresponding security equipment. For example, security equipment used for fire warning is a higher-level security equipment, while security inspection equipment, access control equipment, etc. are lower-level security equipment. High-level security equipment usually needs to run continuously and is equipped with more advanced hardware. It may also be equipped with an independent IoT card to communicate directly with the server. Therefore, the server here determines the device with the highest command sending success rate from multiple target security devices with the highest security level as the second security device. Thereby improving the success rate of sending control instructions and further improving the operational stability of security equipment.
[0103] By implementing the method in the above application embodiment, it can be seen that the server generates corresponding control instructions and identifiers according to the control instructions sent by the front-end device, can temporarily store the control instructions in the database of the server, and send the control instructions to the security equipment in a timely manner, thereby improving the stability of the operation of the security equipment. At the same time, the database can also store the corresponding operation log according to each control instruction and the identifier corresponding to the control instruction, so that the user can query the operation log to know whether the security equipment is operating normally or investigate the cause of the fault, and then quickly solve the possible faults of the security equipment, further improving the operational stability of the security equipment.
[0104] Based on the description of the above configuration method embodiment, the present application also provides a control device 500 for a security device, which can be a control device running on Figure 1 A computer program (including program code) in the security system shown. Specifically Figure 1 The front-end device 101, the server 102 or the first security device 103 shown. Figure 5 , Figure 5 A schematic diagram of the structure of a control device for a security device provided in an embodiment of the present application, wherein the control device 500 for the security device comprises:
[0105] The sending unit 501 is used to send a control instruction to the server, where the control instruction is used to request to control the first security device;
[0106] Receiving unit 502: used to receive a control instruction and generate a first identifier corresponding to the control instruction;
[0107] The sending unit 501 is used to send a control instruction and a first identifier to a first security device;
[0108] Receiving unit 502: used to receive a control instruction and a first identifier, and execute the control instruction;
[0109] Generating unit 503: used to generate an execution result record after the control instruction is executed, and send the execution result record and the first identifier to the server;
[0110] Receiving unit 502: used to receive the execution result record and the first identifier, and determine the first execution time of the control instruction, the first execution time being the time between the moment when the front-end device sends the control instruction to the server and the current moment;
[0111] Storage unit 504: used to generate a corresponding operation log according to the execution result record if the first execution time is less than the first preset time, and store the operation log and the first identifier in the database of the server.
[0112] In a possible embodiment, the sending unit 501 is further specifically configured to: if the server fails to obtain the execution result record within the first preset time, resend the control instruction and the first identifier to the first security device.
[0113] In a possible embodiment, the front-end device is also connected to the first security device, and the generation unit 503 is also specifically used to: if the first security device fails to send the execution result record and the first identification to the server, generate a corresponding second identification according to the first identification, and send the execution result record and the second identification to the front-end device; receive the execution result record and the second identification, and send the execution result record and the second identification to the server; receive the execution result record and the second identification, and determine the second execution time of the control instruction, the second execution time is the time between the moment when the front-end device sends the control instruction to the server and the current moment; if the second execution time is less than the second preset time, generate a corresponding operation log according to the execution result record, and store the operation log and the second identification in the database of the server, and the second preset time is greater than the first preset time.
[0114] In a possible embodiment, the front-end device and the first security device are connected via a local area network. In terms of sending the execution result record and the second identification to the front-end device, the sending unit 501 is also specifically used to: broadcast the execution result record and the second identification in the local area network; the front-end device monitors the local area network until the execution result record and the second identification are obtained.
[0115] In a possible embodiment, if the execution time is less than the first preset time or the execution time is less than the second preset time, the sending unit 501 is also specifically used to: send a first notification to the front-end device, and the first notification is used to indicate that the control instruction is executed successfully; if the execution time is not less than the first preset time or the execution time is not less than the second preset time, the sending unit 501 is also specifically used to: send a second notification to the front-end device, and the second notification is used to indicate that the control instruction fails to execute.
[0116] In a possible embodiment, after the server receives a control instruction and generates a control instruction and a first identifier corresponding to the control instruction, the sending unit 501 is also specifically used to: send the first identifier to the front-end device; after the server sends a first notification to the front-end device, the sending unit 501 is also specifically used to: send a query request and the first identifier to the server; the server receives the query request and the first identifier, and queries the database for an operation log corresponding to the first identifier; if the server successfully queries the database for an operation log corresponding to the first identifier, the operation log corresponding to the first identifier is sent to the front-end device.
[0117] In a possible embodiment, if the security system includes multiple security devices, and the first security device is one of the multiple first security devices, before the server sends the control instruction and the first identifier to the first security device, the receiving unit 502 is also specifically used to: determine that the first security device is online; if the server determines that the first security device is offline, determine a second security device from the multiple first security devices, and the second security device is one of the multiple security devices that is connected to the first security device; send the control instruction and the first identifier to the second security device; the second security device receives the control instruction and the first identifier, and sends the control instruction and the first identifier to the first security device.
[0118] Based on the description of the above method embodiment and device embodiment, please refer to Figure 6 , Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6 The electronic device 600 shown (the electronic device 600 may be a computer device, Figure 1 The front-end device 101, server 102 or first security device 103 shown includes a memory 601, a processor 602, a communication interface 603 and a bus 604. The memory 601, the processor 602 and the communication interface 603 are connected to each other through the bus 604.
[0119] The memory 601 may be a read-only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM).
[0120] The memory 601 can store programs. When the program stored in the memory 601 is executed by the processor 602, the processor 602 and the communication interface 603 are used to execute the various steps of the control method of the security device of the embodiment of the present application.
[0121] The processor 602 can adopt a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), a graphics processing unit (GPU) or one or more integrated circuits to execute relevant programs to implement the functions required to be performed by the units in the electronic device 600 of the embodiment of the present application, or to execute the control method of the security equipment of the method embodiment of the present application.
[0122] The processor 602 may also be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the control method of the security equipment of the present application may be completed by the hardware integrated logic circuit or software instructions in the processor 602. The above-mentioned processor 602 may also be a general-purpose processor, a digital signal processor (DigitalSignal Processing, DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (Field ProgrammableGate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 601, and the processor 602 reads the information in the memory 601, and combines its hardware to complete the functions required to be performed by the units included in the electronic device 600 of the embodiment of the present application, or executes the control method of the security equipment of the method embodiment of the present application.
[0123] The communication interface 603 uses a transceiver such as, but not limited to, a transceiver to implement communication between the electronic device 600 and other devices or a communication network. For example, data can be acquired through the communication interface 603 .
[0124] The bus 604 may include a path for transmitting information between various components of the electronic device 600 (eg, the memory 601 , the processor 602 , and the communication interface 603 ).
[0125] It should be noted that although Figure 6 The electronic device 600 shown only shows a memory, a processor, and a communication interface, but in the specific implementation process, those skilled in the art should understand that the electronic device 600 also includes other devices necessary for normal operation. At the same time, according to specific needs, those skilled in the art should understand that the electronic device 600 may also include hardware devices for implementing other additional functions. In addition, those skilled in the art should understand that the electronic device 600 may also only include the devices necessary to implement the embodiments of the present application, and does not necessarily include Figure 6 All devices shown in .
[0126] An embodiment of the present application further provides a chip, which includes a processor and a data interface. The processor reads instructions stored in a memory through the data interface to implement the control method of the security equipment.
[0127] Optionally, as an implementation method, the chip may further include a memory, in which instructions are stored, and the processor is used to execute the instructions stored in the memory. When the instructions are executed, the processor is used to execute the control method of the security equipment.
[0128] An embodiment of the present application also provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is executed on a computer or a processor, the computer or the processor executes one or more steps in any of the above methods.
[0129] The embodiment of the present application further provides a computer program product including instructions. When the computer program product is executed on a computer or a processor, the computer or the processor executes one or more steps in any of the above methods.
[0130] Those skilled in the art will appreciate that the functions described in conjunction with the various illustrative logic blocks, modules, and algorithm steps disclosed herein can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions described in the various illustrative logic blocks, modules, and steps can be stored or transmitted as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to tangible media, such as data storage media, or includes any media (e.g., based on a communication protocol) that facilitates the transfer of a computer program from one place to another. In this manner, computer-readable media may generally correspond to (1) non-temporary tangible computer-readable storage media, or (2) communication media, such as signals or carrier waves. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the techniques described in this application. A computer program product may include computer-readable media.
[0131] As an example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and can be accessed by a computer. Also, any connection is properly referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio and microwave are included in the definition of media. However, it should be understood that the computer-readable storage media and data storage media do not include connections, carrier waves, signals or other temporary media, but are actually directed to non-temporary tangible storage media. As used herein, disks and optical disks include compact disks (CDs), laser optical disks, optical optical disks, digital versatile disks (DVDs), and Blu-ray disks, where disks typically reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0132] Instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Thus, the term "processor" as used herein may refer to any of the aforementioned structures or any other structures suitable for implementing the techniques described herein. Additionally, in some aspects, the functions described by the various illustrative logic blocks, modules, and steps described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated in a combined codec. Moreover, the techniques may be fully implemented in one or more circuits or logic elements.
[0133] The techniques of the present application may be implemented in a variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC), or a set of ICs (e.g., a chipset). Various components, modules, or units are described in this application to emphasize functional aspects of devices for performing the disclosed techniques, but do not necessarily need to be implemented by different hardware units. In fact, as described above, the various units may be combined in an encoded hardware unit in conjunction with appropriate software and / or firmware, or provided by interoperating hardware units (including one or more processors as described above).
[0134] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the specific descriptions of the corresponding steps in the aforementioned method embodiments, and will not be repeated here.
[0135] It should be understood that in the description of the present application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; wherein A and B can be singular or plural. Also, in the description of the present application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, wherein a, b, c can be single or multiple. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art can understand that the words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not limit them to be necessarily different. Meanwhile, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.
[0136] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the division of the unit is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The mutual coupling, direct coupling, or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0137] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0138] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media integrations. The available medium may be a read-only memory (ROM), or a random access memory (RAM), or a magnetic medium, such as a floppy disk, a hard disk, a tape, a disk, or an optical medium, such as a digital versatile disc (DVD), or a semiconductor medium, such as a solid state disk (SSD), etc.
[0139] The above is only a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited thereto, and any changes or replacements within the technical scope disclosed in the embodiment of the present application should be included in the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiment of the present application should be based on the protection scope of the claims.
[0140] The device embodiments described above are merely illustrative, wherein the units and modules described as separate components may or may not be physically separated. In addition, some or all of the units and modules may be selected according to actual needs to achieve the purpose of the present embodiment. Those of ordinary skill in the art may understand and implement the present invention without creative effort.
[0141] The above is only a specific implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for controlling a security device, characterized in that: The method is applied to a security system, wherein the security system includes a front-end device, a server and a first security device, and the front-end device controls the first security device through the server. The method includes: The front-end device sends a control instruction to the server, where the control instruction is used to request control of the first security device; The server receives the control instruction and generates a first identifier corresponding to the control instruction; The server sends the control instruction and the first identifier to the first security device; The first security device receives the control instruction and the first identifier, and executes the control instruction; The first security device generates an execution result record after the control instruction is executed, and sends the execution result record and the first identifier to the server; The server receives the execution result record and the first identifier, and determines a first execution time of the control instruction, where the first execution time is the time between the moment when the front-end device sends the control instruction to the server and the current moment; If the first execution time is less than a first preset time, the server generates a corresponding operation log according to the execution result record, and stores the operation log and the first identifier in a database of the server.
2. The method according to claim 1, characterized in that The method further comprises: If the server fails to obtain the execution result record within the first preset time, the server resends the control instruction and the first identifier to the first security device.
3. The method according to claim 1, characterized in that: The front-end device is also connected to the first security device, and the method further includes: If the first security device fails to send the execution result record and the first identifier to the server, the first security device generates a corresponding second identifier according to the first identifier, and sends the execution result record and the second identifier to the front-end device; The front-end device receives the execution result record and the second identifier, and sends the execution result record and the second identifier to the server; The server receives the execution result record and the second identifier, and determines a second execution time of the control instruction, where the second execution time is the time between the moment when the front-end device sends the control instruction to the server and the current moment; If the second execution time is less than the second preset time, the server generates a corresponding operation log according to the execution result record, and stores the operation log and the second identifier in the database of the server, and the second preset time is greater than the first preset time.
4. The method according to claim 3, characterized in that The front-end device and the first security device are connected via a local area network, and sending the execution result record and the second identifier to the front-end device includes: The first security device broadcasts the execution result record and the second identifier in the local area network; The front-end device monitors the local area network until the execution result record and the second identifier are obtained.
5. The method according to any one of claims 1 to 4, characterized in that: If the execution time is less than the first preset time or the execution time is less than the second preset time, the method further includes: The server sends a first notification to the front-end device, where the first notification is used to indicate that the control instruction is executed successfully; If the execution time is not less than the first preset time or the execution time is not less than the second preset time, the method further includes: The server sends a second notification to the front-end device, where the second notification is used to indicate that the execution of the control instruction fails.
6. The method according to any one of claims 1 to 5, characterized in that: After the server receives the control instruction and generates a control instruction and a first identifier corresponding to the control instruction, the method further includes: The server sends the first identifier to the front-end device; After the server sends the first notification to the front-end device, the method further includes: The front-end device sends a query request and the first identifier to the server; The server receives the query request and the first identifier, and queries the database for an operation log corresponding to the first identifier; If the server successfully searches the database for the operation log corresponding to the first identifier, the server sends the operation log corresponding to the first identifier to the front-end device.
7. The method according to any one of claims 1 to 6, characterized in that: If the security system includes a plurality of security devices, and the first security device is one of the plurality of first security devices, before the server sends the control instruction and the first identifier to the first security device, the method further includes: The server determines that the first security device is in an online state; If the server determines that the first security device is in an offline state, the server determines a second security device from the multiple first security devices, where the second security device is one of the multiple security devices that is connected to the first security device; The server sends the control instruction and the first identifier to the second security device; The second security device receives the control instruction and the first identifier, and sends the control instruction and the first identifier to the first security device.
8. A control device for security equipment, characterized in that: The device is used to execute a control method for a security device. The device belongs to a security system. The security system includes a front-end device, a server, and a first security device. The front-end device controls the first security device through the server. The device includes: A sending unit: used for sending a control instruction to the server, wherein the control instruction is used for requesting to control the first security device; Receiving unit: used for receiving the control instruction and generating a first identifier corresponding to the control instruction; A sending unit: configured to send the control instruction and the first identifier to the first security device; A receiving unit: configured to receive the control instruction and the first identifier, and execute the control instruction; A generating unit: configured to generate an execution result record after the control instruction is executed, and send the execution result record and the first identifier to the server; A receiving unit: used for receiving the execution result record and the first identifier, and determining a first execution time of the control instruction, where the first execution time is the time between the moment when the front-end device sends the control instruction to the server and the current moment; Storage unit: used for generating a corresponding operation log according to the execution result record if the first execution time is less than a first preset time, and storing the operation log and the first identifier in the database of the server.
9. An electronic device, characterized in that: The method comprises a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for executing the steps in the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 7.
Citation Information
Cited By
Registration method and device of security and protection equipment, electronic equipment and storage medium
CN120281814A
Security equipment registration method, device, electronic device and storage medium
CN120281814B