Equipment control method and system, electronic equipment and storage medium
By storing the control instructions of the device to the cloud and pulling them from the cloud, the problem of low efficiency and poor fault tolerance in the prior art is solved, and more efficient and reliable device control is achieved.
Patent Information
- Application Number
- CN202510185739.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-06-24
AI Technical Summary
In the prior art, when the server actively sends a large number of control instructions during the equipment control process, there are problems of low efficiency and poor fault tolerance.
By storing multiple control instructions of the device to the cloud and allowing the device to pull and execute control instructions from the cloud, complex and time-consuming operations are processed by the device itself, reducing the waiting and processing time in the cloud and reducing the probability of errors.
This method effectively reduces the waiting and processing time in the cloud, reduces the probability of errors, and improves the efficiency and reliability of device control.
Smart Images

Figure CN120201073A_ABST
Abstract
Description
Background Art
[0002] In the prior art, during the device control process, the server actively sends control instructions to the device. If a large number of control instructions are sent to the device within a short period of time, there will be problems of low efficiency and poor fault tolerance. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a device control method, system, electronic device, and storage medium in view of the deficiencies of the prior art, specifically as follows:
[0004] 1) In the first aspect, the present invention provides a device control method, and the specific technical solution is as follows:
[0005] Store multiple control instructions of the device in the cloud;
[0006] Enable the device to pull control instructions from the cloud and execute them.
[0007] The beneficial effects of the device control method provided by the present invention are as follows:
[0008] By means of the device actively pulling, pulling control instructions from the cloud and executing them, complex and time-consuming operations are all processed by the device itself, which can effectively reduce the waiting time and processing time of the cloud, and can also reduce the error probability.
[0009] On the basis of the above solution, the device control method of the present invention can also be improved as follows.
[0010] Further, it further includes:
[0011] Whenever the device executes any control instruction, enable the device to determine whether the expected operating state of the device corresponding to the control instruction is consistent with the actual operating state of the device after executing the control instruction, and obtain a judgment result.
[0012] Further, it further includes:
[0013] When the judgment result is negative, issue a reminder.
[0014] Further, enabling the device to pull control instructions from the cloud and execute them includes:
[0015] Enable the device to regularly pull control instructions from the cloud and execute them, and / or enable the device to automatically pull control instructions from the cloud and execute them according to the current actual operating state.
[0016] 2) In the second aspect, the present invention further provides a device control system, and the specific technical solution is as follows:
[0017] It includes a storage module and a control module;
[0018] The storage module is used to: store multiple control instructions of the device in the cloud;
[0019] The control module is used to: enable the device to pull control instructions from the cloud and execute them.
[0020] Based on the above solution, an equipment control system of the present invention can also be improved as follows.
[0021] Furthermore, it further includes a judgment module. The judgment module is used to: whenever the device executes any control instruction, enable the device to judge whether the expected operating state of the device corresponding to the control instruction is consistent with the actual operating state of the device after executing the control instruction, and obtain a judgment result.
[0022] Furthermore, it further includes a reminder module. The reminder module is used to: when the judgment result is negative, issue a reminder.
[0023] Furthermore, the control module is specifically used to: enable the device to periodically pull control instructions from the cloud and execute them, and / or enable the device to automatically pull control instructions from the cloud and execute them according to the current actual operating state.
[0024] 3) Thirdly, the present invention also provides an electronic device. The electronic device includes a processor, the processor is coupled with a memory, and at least one computer program is stored in the memory. The at least one computer program is loaded and executed by the processor so that the electronic device implements any one of the above device control methods.
[0025] 4) Fourthly, the present invention also provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, it implements any one of the above device control methods.
[0026] It should be noted that for the beneficial effects obtained by the technical solutions and corresponding possible implementation manners of the second to fourth aspects of the present invention, reference can be made to the technical effects of the first aspect and its corresponding possible implementation manners described above, which will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for description in the embodiments of the present invention:
[0028] Figure 1 It is a schematic flowchart of a device control method according to an embodiment of the present invention;
[0029] Figure 2 It is a schematic structural diagram of a device control system according to an embodiment of the present invention;
[0030] Figure 3 It is a schematic structural diagram of an electronic device according to an embodiment of the present invention. Detailed implementation manners
[0031] The principles and features of the present invention will be described below. The examples given are only used to explain the present invention and are not intended to limit the scope of the present invention.
[0032] The technical solution of the present invention and how the technical solution of the present invention solves the above technical problems will be described in detail below with specific embodiments. These several specific embodiments below can be combined with each other. For the same or similar concepts or processes, they may not be repeated in some embodiments. The embodiments of the present invention will be described below with reference to the accompanying drawings.
[0033] As Figure 1 shown, a device control method according to an embodiment of the present invention includes the following steps:
[0034] S1. Store multiple control instructions of the device in the cloud;
[0035] Among them, the device can specifically be a router, a computer device, a drone, etc.
[0036] Among them, according to the different devices, the control instructions will also be different. For example, the control instruction is: a control instruction for controlling a router to perform data forwarding; the control instruction can also be: an instruction for controlling a computer device to perform memory cleaning; the control instruction can also be: an instruction for controlling a router, a computer device or a drone to perform plugin update, configuration update, etc.; the control instruction can also be an instruction for controlling the flight of a drone.
[0037] S2. Cause the device to pull the control instruction from the cloud and execute it.
[0038] Optionally, in the above technical solution, whenever the device executes any control instruction, cause the device to determine whether the expected operating state of the device corresponding to the control instruction is consistent with the actual operating state of the device after executing the control instruction, and obtain a judgment result.
[0039] Optionally, in the above technical solution, when the judgment result is no, issue a reminder so that the control personnel can handle it in time. When the judgment result is yes, a reminder that the operation is normal can be issued.
[0040] Optionally, in the above technical solution, causing the device to pull the control instruction from the cloud and execute it includes:
[0041] S10. Cause the device to periodically pull the control instruction from the cloud and execute it, and / or cause the device to automatically pull the control instruction from the cloud and execute it according to the current actual operating state.
[0042] Among them, causing the device to automatically pull the control instruction from the cloud according to the current actual operating state, the specific implementation process is as follows:
[0043] S101. Preprocess the historical operation data of multiple devices in multiple historical operation states. Specifically:
[0044] ① Sort the multiple devices, and according to the sorted sequence, sort the same item of data in each historical operation data to obtain a sequence corresponding to each item of data. Number each data in each sequence (specific values of memory occupancy rate, average delay of wireless network, specific value of jitter, specific value of packet loss rate, etc.) in turn. At this time, each sequence with numbered becomes time-series data.
[0045] Among them, according to different devices, the operation data is also different. For example, the operation data of a router includes: memory occupancy rate, average delay of wireless network, jitter, packet loss rate, etc.; the operation data of a drone includes the pose parameters of the drone, the remaining power of the drone, and the average flight speed of the drone, etc.
[0046] ② Perform Fourier transform on each time-series data to obtain the Fourier transform data corresponding to each time-series data. Select multiple peaks greater than the preset peak threshold from each Fourier transform data, and perform normalization processing on all selected peaks to obtain the normalized value corresponding to each selected peak. And use the normalized value corresponding to any selected peak as the first initial weight of the data corresponding to the selected peak. Thus, the first initial weight of the data corresponding to each selected peak is obtained.
[0047] In the same sequence, first, calculate the ratio between the data corresponding to any unselected peak and the data corresponding to each selected peak. Then, calculate the product of each ratio corresponding to the unselected peak and the corresponding first initial weight, and take the average value of all products as the first initial weight of the data corresponding to the unselected peak until the first initial weight of the data corresponding to each unselected peak is calculated.
[0048] ③ Divide multiple amplitude ranges for each sequence corresponding to each item of data, and divide the corresponding sequence according to the amplitude range corresponding to each item of data to obtain multiple data sets. Among them, the amplitude range set for each sequence corresponding to each item of data can be set according to the actual situation. For example, take "divide the difference between the maximum value and the minimum value in the sequence corresponding to each item of data into five equal parts" as the standard to divide multiple amplitude ranges.
[0049] ④ Use the principal component analysis method to analyze each data set corresponding to the same data, and determine the variance contribution rate of each data set corresponding to the same data relative to the same data. The variance contribution rate can characterize the importance degree.
[0050] ⑤ Use the variance contribution rate corresponding to any data set as the second initial weight of each data in the data set until the second initial weight of each data is obtained.
[0051] ⑥ Use the mean of the first initial weight and the second initial weight of each data in any historical operation data as the initial weight of the data in the historical operation data. Alternatively, configure different coefficients for the first initial weight and the second initial weight of each data in any historical operation data, and use the sum and / or mean of the product of the first initial weight of each data in the historical operation data and the corresponding coefficient and the product of the second initial weight and the corresponding coefficient as the initial weight of the data in the historical operation data. Use the sum and / or mean of the initial weights of each data in the historical operation data as the initial weight of the historical operation data until the initial weight of each historical operation data is obtained.
[0052] Use the historical operation data and the corresponding initial weights as the preprocessed historical operation data. Alternatively, use the mean of the first initial weight and the second initial weight of each data in any historical operation data as the initial weight of the data in the historical operation data until the initial weight of each data in each historical operation data is obtained. Use the historical operation data and the corresponding initial weight of each data as the preprocessed historical operation data.
[0053] S102. Add labels to each preprocessed historical target data to obtain a data set.
[0054] Among them, the added labels can specifically be: the control instruction corresponding to each preprocessed historical target data (or the selection probability corresponding to the control instruction. When any control instruction is selected, the selection probability of the control instruction is 100%, and when it is not selected, the selection probability is 0. The label can be set according to the actual situation to facilitate the distinction of different control instructions). Among them, all control instructions include control instructions for starting the device, control instructions for stopping the device, control instructions for adjusting the working parameters of the device, control instructions for firewall settings, and control instructions for intrusion detection, etc.
[0055] S103. Based on the data set, train a preset deep learning model to obtain a trained preset deep learning model.
[0056] Among them, the preset deep learning model can be a convolutional neural network or other deep learning network models, which can be set according to the actual situation.
[0057] When training a preset deep learning model, setting an initial weight for each piece of historical operation data, which can represent the importance of the historical operation data, or obtaining the initial weight of each data in each piece of historical operation data, which can represent the importance degree of each data. During the training process, more attention can be paid to the data or historical operation data with larger initial weights, thereby improving the overall performance of the preset deep learning model. Specifically, by assigning appropriate initial weights, the dependence of the preset deep learning model on these abnormal samples can be reduced, the bias can be lowered, and the preset deep learning model can be made to pay more attention to those more representative historical operation data, thereby improving the performance of the preset deep learning model on unseen data and enhancing the generalization ability. Generally speaking, by setting the initial weights, the performance of the preset deep learning model can be optimized, the bias can be reduced, the generalization ability can be improved, and the class differences can be balanced and the data changes can be adapted.
[0058] S104. Obtain the actual operation data of the device in the current actual operation state, input the actual operation data into the trained preset deep learning model to obtain the number of the control instruction, and the device obtains the corresponding control instruction from the cloud according to the number of the control instruction obtained from the trained preset deep learning model and executes it.
[0059] In the above embodiments, although the steps are numbered as S1, S2, etc., these are only specific embodiments given by the present invention. Those skilled in the art can adjust the execution order of S1, S2, etc. according to the actual situation, and this is also within the protection scope of the present invention. It can be understood that in some embodiments, it may include some or all of the above embodiments.
[0060] As Figure 2 shown, a device control system 200 according to an embodiment of the present invention includes a storage module 201 and a control module 202;
[0061] The storage module 201 is used for: storing multiple control instructions of the device to the cloud;
[0062] The control module 202 is used for: making the device pull the control instruction from the cloud and execute it according to the preset conditions.
[0063] Optionally, in the above technical solution, it further includes a judgment module, and the judgment module is used for: whenever the device executes any control instruction, making the device judge whether the expected state of the device corresponding to the control instruction is consistent with the actual state after the device executes the control instruction to obtain a judgment result.
[0064] Optionally, in the above technical solution, it further includes a reminder module, and the reminder module is used for: when the judgment result is negative, sending a reminder.
[0065] Optionally, in the above technical solution, the control module 202 is specifically configured to: enable the device to periodically pull control instructions from the cloud and execute them.
[0066] In another embodiment, the cloud is used to: manage and store the final operating state of the device, and is also used to provide an interface for communicating with the device; the device (device side) is used to: periodically pull the latest control instructions from the cloud to control the device. In order to avoid the pressure on the cloud (cloud platform) when multiple devices pull control instructions simultaneously, it is necessary to consider the pulling timing of the device. The pulling timing of the device is related to factors such as the startup time of the device and the device ID. The pulling period will also be automatically adjusted according to the pressure on the cloud to avoid the pressure caused by ineffective retry processes on the cloud (cloud platform). The device is also used to: compare the current operating state of the device with the expected state (specifically compare the updated firmware version number, updated plugin version number, updated configuration data, and operating data, etc.) to determine whether they are consistent. If they are consistent, there is no need to pull the latest control instructions from the cloud and execute them. If they are inconsistent, it is necessary to pull the latest control instructions from the cloud and execute them, and feedback the execution result to the cloud. The cloud is also used to: statistically calculate the achievement rate of the execution result in real time, analyze whether it is abnormal, and provide typical abnormal devices for debugging and analysis.
[0067] It should be noted that the beneficial effects of the device control system 200 provided in the above embodiment are the same as those of the above device control method, and will not be elaborated here. In addition, when the system provided in the above embodiment realizes its functions, only the division of the above function modules is used for illustration. In actual applications, the above functions can be allocated to different function modules according to needs, that is, the system can be divided into different function modules according to the actual situation to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be elaborated here.
[0068] Among them, the device control system of the present invention can be a computer program (including program code) running in a computer device. For example, the device control system of the present invention is an application software and can be used to execute the corresponding steps in the device control method of the present invention.
[0069] In some embodiments, the device control system of the present invention can be implemented in a combination of software and hardware. As an example, the device control system of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the device control method of the present invention. For example, a processor in the form of a hardware decoding processor can employ one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0070] Among them, the modules involved in the embodiments of the present invention can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation to the module itself in some cases.
[0071] An electronic device according to an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned device control method is implemented. That is to say, an electronic device according to an embodiment of the present invention may include, but is not limited to: a processor and a memory; the memory is used to store the computer program; the processor is used to execute the device control method shown in any embodiment of the present invention by calling the computer program.
[0072] In an alternative embodiment, an electronic device is provided, as Figure 3 shown, Figure 3 the electronic device 4000 shown includes: a processor 4001 and a memory 4003. Among them, the processor 4001 and the memory 4003 are connected, such as connected through a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, and the transceiver 4004 can be used for data interaction between the electronic device and other electronic devices, such as data sending and / or data receiving, etc. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation to the embodiments of the present invention.
[0073] The processor 4001 can be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logical blocks, modules, and circuits described in connection with the disclosure of the present invention. The processor 4001 can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0074] The bus 4002 can include a path for transmitting information between the above components. The bus 4002 can be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus 4002 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 only a thick line is used to represent the bus 4002 in the figure, but it does not mean that there is only one bus or one type of bus.
[0075] The memory 4003 can be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, or it can also be an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic storage media, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0076] The memory 4003 is used to store the application program code (computer program) for implementing the solution of the present invention, and is controlled by the processor 4001 for execution. The processor 4001 is used to execute the application program code stored in the memory 4003 to implement the content shown in the foregoing method embodiments.
[0077] Among them, the electronic device may also be a terminal device, and the terminal device may be any device that can install applications, including at least one of a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a smart TV, and a smart vehicle device.
[0078] It should be noted that Figure 3 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present invention.
[0079] A computer-readable storage medium according to an embodiment of the present invention has a computer program stored thereon, and when the computer program is executed by a processor, the above-mentioned device control method is implemented.
[0080] Optionally, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0081] In an exemplary embodiment, there is also provided a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the above-mentioned device control method.
[0082] Computer program code for performing the operations of the present invention may be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it may be connected to an external computer (e.g., by connecting through the Internet using an Internet service provider).
[0083] It should be understood that the flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0084] The computer-readable storage medium provided by the embodiments of the present invention may be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EEPROM 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 above. In the present invention, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0085] The above computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to execute the method shown in the above embodiments.
[0086] The above description is only a preferred embodiment of the present invention and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in the present invention is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the technical solutions formed by mutually replacing the above features with the (but not limited to) technical features having similar functions disclosed in the present invention.
[0087] It should be noted that the terms "first", "second", etc. in the specification and claims of this application are used to distinguish similar objects, and represent a limitation on a specific order or sequence. In appropriate cases, the order of use of similar objects can be interchanged so that the embodiments of the present application described herein can be implemented in an order other than the illustrated or described order.
[0088] Those skilled in the art know that the present invention can be implemented as a system, method or computer program product. Therefore, the present invention can be specifically implemented in the following forms: it can be completely hardware, can also be completely software (including firmware, resident software, microcode, etc.), and can also be in the form of a combination of hardware and software, generally referred to as "circuit", "module" or "system" in this article. In addition, in some embodiments, the present invention can also be implemented in the form of a computer program product in one or more computer-readable media, which contains computer-readable program code.
[0089] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A device control method, characterized in that: include: Store multiple control instructions of the device in the cloud; The device is enabled to pull control instructions from the cloud and execute them.
2. A device control method according to claim 1, characterized in that: Also includes: Whenever the device executes any control instruction, the device determines whether the expected operating state of the device corresponding to the control instruction is consistent with the actual operating state of the device after the device executes the control instruction, and obtains a determination result.
3. A device control method according to claim 2, characterized in that: Also includes: When the judgment result is no, a reminder is issued.
4. A device control method according to any one of claims 1 to 3, characterized in that: The device is enabled to pull control instructions from the cloud and execute them, including: The device is enabled to periodically pull control instructions from the cloud and execute them, and / or the device is enabled to automatically pull control instructions from the cloud and execute them according to the current actual operating status.
5. A device control system, characterized in that: It includes a storage module and a control module; The storage module is used to: store multiple control instructions of the device in the cloud; The control module is used to enable the device to pull control instructions from the cloud and execute them.
6. A device control system according to claim 5, characterized in that: It also includes a judgment module, which is used to: whenever the device executes any control instruction, enable the device to judge whether the expected operating state of the device corresponding to the control instruction is consistent with the actual operating state of the device after executing the control instruction, and obtain a judgment result.
7. A device control system according to claim 6, characterized in that: It also includes a reminder module, which is used to issue a reminder when the judgment result is no.
8. A device control system according to any one of claims 5 to 7, characterized in that: The control module is specifically used to: enable the device to periodically pull control instructions from the cloud and execute them, and / or enable the device to automatically pull control instructions from the cloud and execute them according to the current actual operating status.
9. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a device control method as claimed in any one of claims 1 to 4 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the device control method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Terminal information pulling treatment method, terminal and server
CN106155818A
Vehicle event and event file data management method and system and storage medium
CN112165528A
Control method and device, storage medium and electronic equipment
CN113743603A
Emergency management platform
CN114257620A
Business processing method and device, computer equipment and storage medium
CN114422594A