CN-122001883-A - Skill server cluster management method and device, storage medium and electronic device
Abstract
The application discloses a skill server cluster management method, a device, a storage medium and an electronic device, and relates to the technical field of intelligent home, wherein the skill server cluster management method is applied to management servers and comprises the steps of sending an online query request to each skill server in a skill server cluster in a set period, storing skill node information of the skill server in the management server, determining that the skill server is abnormal if online feedback of the skill server is not received under a preset feedback receiving cut-off condition, and setting a state identifier of the skill server as abnormal so as to enable the skill server to be moved out of the skill server cluster. According to the technical scheme provided by the embodiment of the application, abnormal skill server nodes can be removed in time in the skill service execution process, so that the reliability and the availability of the skill service are ensured.
Inventors
- LI YONG
- GUO YIHE
- ZHANG JIE
- ZHANG HAILONG
Assignees
- 青岛海尔科技有限公司
- 海尔优家智能科技(北京)有限公司
- 海尔智家股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241107
Claims (10)
- 1. A skill server cluster management method, applied to a management server, comprising: sending an online query request to each skill server in the skill server cluster in a set period, wherein skill node information of all registered skill servers is stored in a management server; if online feedback of the skill server is not received under a preset feedback receiving cut-off condition, determining that the skill server is abnormal; and setting the state identification of the skill server as abnormal so as to move the skill server out of the skill server cluster.
- 2. The method of claim 1, further comprising, prior to said sending an online query request to each skill server in the skill server cluster at a set period: receiving skill node information sent by the skill server, wherein the skill node information comprises a skill identifier, an IP internet protocol address and a port of the skill server; And registering the skill server by utilizing the skill node information, and setting the state identification of the skill server to be normal.
- 3. The method of claim 2, wherein the sending an online query request to each skill server in the skill server cluster at a set period comprises: And sending the online query request to the skill server in the form of a heartbeat signal according to a preset period according to the IP address of the skill server.
- 4. A method for managing a group of skill servers according to claim 3, wherein determining that there is an abnormality in the skill server if no online feedback of the skill server is received under a preset condition comprises: If the continuous heartbeat check failure reaches the preset failure times, determining that the skill server is abnormal.
- 5. The skill server cluster management method according to claim 1, further comprising, after said setting the state identification of the skill server to be abnormal: If the online feedback of the skill server is received again, determining that the skill server is recovered to be normal; and setting the state identification of the skill server to be normal so as to restore the skill server to the skill server cluster.
- 6. The skill server cluster management method according to claim 2, further comprising: A skill call interface exposed to the skill caller is configured to receive a skill server call request of the skill caller.
- 7. The skill server cluster management method of claim 6, further comprising: Receiving a skill service call request sent by a skill call party through the skill call interface, wherein the skill service call request comprises the skill identifier; inquiring the skill server with normal state in a skill server cluster list according to the skill identifier; And determining the skill server providing the service in the skill server cluster through a preset load balancing algorithm, and forwarding the skill service calling request to the skill server providing the service.
- 8. A skill server cluster management apparatus, applied to a management server, comprising: The technical skill server comprises an online inquiry request sending module, a skill server cluster, a skill server management module and a skill node information management module, wherein the online inquiry request sending module is used for sending an online inquiry request to each skill server in the skill server cluster in a set period; The skill server abnormality determining module is used for determining that the skill server is abnormal if the online feedback of the skill server is not received under the preset feedback receiving cut-off condition; And the abnormal state identification setting module is used for setting the state identification of the skill server as abnormal so as to move the skill server out of the skill server cluster.
- 9. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored program, wherein the program when run performs the skill server cluster management method of any of claims 1 to 7.
- 10. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, the processor being arranged to perform the skill server cluster management method of any of claims 1 to 7 by means of the computer program.
Description
Skill server cluster management method and device, storage medium and electronic device Technical Field The application relates to the field of intelligent home furnishing, in particular to a skill server cluster management method and device, a storage medium and an electronic device. Background The skills are cloud high-order functions of the intelligent home equipment, the basic functions of the equipment are the capability of programming on a main board of the equipment, the skills are the high-order capability developed by each equipment manufacturer based on the basic functions of the equipment, the form of the skills generally provides the skills for a server cluster formed by a plurality of skill servers distributed on the cloud, the access addresses of the exposed services are called by an application party, and finally the control of related equipment is completed. In the prior art, when the skill of the equipment is executed, if a certain node is abnormal in a distributed environment, a calling party does not have the ability of sensing server abnormality, and when the skill service is executed, a request of the skill service is still forwarded to the node with the current abnormality. After the equipment skill service is online, the skill flow is still sent to the abnormal nodes due to the fact that part of servers are abnormal, so that the equipment fails to execute when the skill is used for controlling the equipment, the availability of the skill service is reduced, and user experience is further affected. Disclosure of Invention The embodiment of the invention provides a skill server cluster management method, a device, a storage medium and an electronic device, which can discover an abnormal server and timely remove abnormal skill service nodes from a skill service list so as to ensure the reliability and usability of skill service. According to an aspect of the embodiment of the present invention, there is provided a skill server cluster management method, applied to a management server, including: sending an online query request to each skill server in the skill server cluster in a set period, wherein skill node information of all registered skill servers is stored in a management server; if online feedback of the skill server is not received under a preset feedback receiving cut-off condition, determining that the skill server is abnormal; and setting the state identification of the skill server as abnormal so as to move the skill server out of the skill server cluster. In one implementation, before the sending the online query request to each skill server in the skill server cluster at the set period, further comprising: receiving skill node information sent by the skill server, wherein the skill node information comprises a skill identifier, an IP internet protocol address and a port of the skill server; And registering the skill server by utilizing the skill node information, and setting the state identification of the skill server to be normal. In one implementation, the sending an online query request to each skill server in the skill server cluster at a set period includes: And sending the online query request to the skill server in the form of a heartbeat signal according to a preset period according to the IP address of the skill server. In one implementation, if the online feedback of the skill server is not received under a preset condition, determining that the skill server has an abnormality includes: If the continuous heartbeat check failure reaches the preset failure times, determining that the skill server is abnormal. In one implementation, after the setting the status identifier of the skill server to be abnormal, the method further includes: If the online feedback of the skill server is received again, determining that the skill server is recovered to be normal; And setting the state identification of the skill server to be normal so as to restore the skill server to the skill server cluster. In one implementation, the skill server cluster management method further includes: A skill call interface exposed to the skill caller is configured to receive a skill server call request of the skill caller. In one implementation, the skill server cluster management method further includes: Receiving a skill service call request sent by a skill call party through the skill call interface, wherein the skill service call request comprises the skill identifier; inquiring the skill server with normal state in a skill server cluster list according to the skill identifier; And determining the skill server providing the service in the skill server cluster through a preset load balancing algorithm, and forwarding the skill service calling request to the skill server providing the service. According to another aspect of the embodiment of the present invention, there is provided a skill server cluster management apparatus, applied to a management server, including: The technical skill server