CN113037887A - Equipment state identification method and device, storage medium and electronic equipment - Google Patents

Equipment state identification method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN113037887A
CN113037887A CN202110258576.8A CN202110258576A CN113037887A CN 113037887 A CN113037887 A CN 113037887A CN 202110258576 A CN202110258576 A CN 202110258576A CN 113037887 A CN113037887 A CN 113037887A
Authority
CN
China
Prior art keywords
state
live broadcast
live
server
broadcast server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110258576.8A
Other languages
Chinese (zh)
Inventor
郭文艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202110258576.8A priority Critical patent/CN113037887A/en
Publication of CN113037887A publication Critical patent/CN113037887A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2404Monitoring of server processing errors or hardware failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2405Monitoring of the internal components or processes of the server, e.g. server load

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a method and a device for identifying equipment states, a storage medium and electronic equipment, and belongs to the field of cloud services. Wherein, the method comprises the following steps: detecting a network state of a live broadcast server, wherein the live broadcast server is used for synchronizing live broadcast data of a plurality of live broadcast clients through a live broadcast program, and the network state comprises a Domain Name System (DNS) state and/or an extranet access state; and identifying the working state of the live broadcast server according to the network state, wherein the working state is used for representing whether the live broadcast server has the capability of responding to the network service request. According to the invention, the technical problem of inaccurate equipment state identification of the live broadcast server in the related technology is solved, so that the accurate detection and control of the live broadcast server are realized, and the service processing efficiency of the live broadcast server is improved.

Description

Equipment state identification method and device, storage medium and electronic equipment
Technical Field
The invention relates to the field of cloud services, in particular to a method and a device for identifying equipment states, a storage medium and electronic equipment.
Background
In the related technology, live broadcast programs provide services to the outside at a plurality of live broadcast servers, and if a certain live broadcast server has a problem, the live broadcast server needs to be automatically and timely removed; when the live broadcast server returns to normal, the live broadcast server needs to be returned to provide service for the outside. Therefore, a detection method is needed to automatically identify whether the live server is normal.
In the related technology, a unique Uniform Resource Locator (URL) is provided in a live program for a detection program to access, detection of a live server is realized through path access, if the URL is accessed, a normal response can be taken, and the working state of the live server is considered to be a normal state, that is, the live server is considered to be normal. Only when the live program hangs up and does not have access to the URL, the live server is considered to be abnormal, and therefore recognition is not accurate enough. When the live server is off-shelf, the live program on the live server must be stopped, and the original user request can be cut off, so that the off-shelf live server is inconvenient.
In view of the above problems in the related art, no effective solution has been found at present.
Disclosure of Invention
The embodiment of the invention provides a method and a device for identifying equipment states, a storage medium and electronic equipment.
According to an aspect of an embodiment of the present application, there is provided a method for identifying a device status, including: detecting a network state of a live broadcast server, wherein the live broadcast server is used for synchronizing live broadcast data of a plurality of live broadcast clients through a live broadcast program, and the network state comprises a Domain Name System (DNS) state and/or an extranet access state; identifying the working state of the live broadcast server according to the network state, wherein the working state is used for representing whether the live broadcast server has the capability of responding to the network service request
Further, detecting the network status of the live server comprises: detecting a Domain Name System (DNS) state of the live broadcast server; if the DNS state is an abnormal state, determining that the network state of the live broadcast server is the abnormal state; if the DNS state is a normal state, detecting an extranet access state of the live broadcast server; if the external network access state is a normal state, determining that the network state of the live broadcast server is a normal state; and if the external network access state is an abnormal state, determining that the network state of the live broadcast server is the abnormal state.
Further, detecting a domain name system DNS state of the live server includes: controlling the direct broadcast server to analyze the appointed domain name; if the designated domain name is wrong in resolution, determining that the DNS state is an abnormal state; and if the designated domain name is correctly resolved, determining that the DNS state is a normal state.
Further, detecting the extranet access state of the live server comprises: controlling the live broadcast server to access a plurality of target domain names; if the live broadcast server successfully accesses any one of the target domain names, determining that the access state of the external network is a normal state; and if the live broadcast server fails to access the target domain names, determining that the access state of the external network is an abnormal state.
Further, before detecting the network status of the live server, the method further comprises: accessing a live program running on the live server by specifying a Uniform Resource Location (URL) address; if the live program is successfully accessed through the specified URL address, reading a configuration field of the live program, wherein the configuration field is used for indicating the activation state of the live program; and if the configuration field is a first field, determining to continue to detect the network state of the live broadcast server, wherein the first field is used for indicating that the live broadcast program is in an activated state.
Further, identifying the working state of the live server according to the network state comprises: if the network state is a normal state, identifying that the working state of the live broadcast server is an online state; and if the network state is an abnormal state, identifying that the working state of the live broadcast server is an offline state.
Further, after identifying the working state of the live broadcast server according to the network state, the method further includes: and responding to the state control information aiming at the live broadcast server, and setting a configuration field of a live broadcast program running on the live broadcast server from an original field to a target field, wherein the configuration field is used for indicating the activation state of the live broadcast program.
According to another aspect of the embodiments of the present application, there is also provided an apparatus for identifying a device status, including: the system comprises a detection module, a live broadcast server and a live broadcast server, wherein the detection module is used for detecting the network state of the live broadcast server, the live broadcast server is used for synchronizing live broadcast data of a plurality of live broadcast clients through a live broadcast program, and the network state comprises a Domain Name System (DNS) state and/or an extranet access state; and the control module is used for identifying the working state of the live broadcast server according to the network state, wherein the working state is used for representing whether the live broadcast server has the capability of responding to the network service request.
Further, the detection module includes: the detection unit is used for detecting the domain name system DNS state of the live broadcast server; the first processing unit is used for determining that the network state of the live broadcast server is an abnormal state if the DNS state is the abnormal state; if the DNS state is a normal state, detecting an extranet access state of the live broadcast server; the second processing unit is used for determining that the network state of the live broadcast server is a normal state if the external network access state is a normal state; and if the external network access state is an abnormal state, determining that the network state of the live broadcast server is the abnormal state.
Further, the detection unit includes: the first control subunit is used for controlling the direct broadcast server to analyze the specified domain name; the first determining subunit is configured to determine that the DNS status is an abnormal status if the designated domain name resolution is incorrect; and if the designated domain name is correctly resolved, determining that the DNS state is a normal state.
Further, the first processing unit includes: the second control subunit is used for controlling the live broadcast server to access a plurality of target domain names; a second determining subunit, configured to determine that the extranet access state is a normal state if the live broadcast server successfully accesses any one of the target domain names; and if the live broadcast server fails to access the target domain names, determining that the access state of the external network is an abnormal state.
Further, the apparatus further comprises: the access module is used for accessing a live program running on the live server by specifying a Uniform Resource Locator (URL) address before the detection module detects the network state of the live server; the reading module is used for reading a configuration field of the live program if the live program is successfully accessed through the specified URL address, wherein the configuration field is used for indicating the activation state of the live program; and the determining module is used for determining to continue detecting the network state of the live broadcast server if the configuration field is a first field, wherein the first field is used for indicating that the live broadcast program is in an activated state.
Further, the control module includes: the first control unit is used for identifying that the working state of the live broadcast server is an online state if the network state is a normal state; and the second control unit is used for identifying that the working state of the live broadcast server is an off-line state if the network state is an abnormal state.
Further, the apparatus further comprises: the setting module is used for responding to the state control information aiming at the live broadcast server after the control module identifies the working state of the live broadcast server according to the network state, and setting a configuration field of a live broadcast program running on the live broadcast server from an original field to a target field, wherein the configuration field is used for indicating the activation state of the live broadcast program.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program that executes the above steps when the program is executed.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; wherein: a memory for storing a computer program; a processor for executing the steps of the method by running the program stored in the memory.
Embodiments of the present application also provide a computer program product containing instructions, which when run on a computer, cause the computer to perform the steps of the above method.
According to the invention, the network state of the live broadcast server is detected, the working state of the live broadcast server is identified according to the network state, and the working state of the live broadcast server is identified according to the network state, so that the live broadcast server with abnormal network access is prevented from being identified as an online state, the technical problem that the equipment state for identifying the live broadcast server in the related technology is inaccurate is solved, the accurate detection and control of the live broadcast server are realized, and the service processing efficiency of the live broadcast server is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a device status recognition server according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of identifying a device status according to an embodiment of the invention;
FIG. 3 is a network architecture diagram of an embodiment of the present invention;
fig. 4 is a block diagram of an apparatus for identifying a device status according to an embodiment of the present invention;
fig. 5 is a block diagram of an electronic device implementing an embodiment of the invention.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments, and the illustrative embodiments and descriptions thereof of the present application are used for explaining the present application and do not constitute a limitation to the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another similar entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Example 1
The method provided by the embodiment one of the present application can be executed in a server, a computer or a similar electronic device. Taking an example of the application on a server, fig. 1 is a block diagram of a hardware structure of an identification server for identifying a device status according to an embodiment of the present invention. As shown in fig. 1, the server 10 may include one or more (only one shown in fig. 1) processors 102 (the processors 102 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and is not intended to limit the structure of the server. For example, the server may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a server program, for example, a software program and a module of application software, such as a server program corresponding to a method for identifying a device status in an embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the server program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to a server over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the server. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
In this embodiment, a method for identifying a device status is provided, and fig. 2 is a flowchart of a method for identifying a device status according to an embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, detecting a network state of a live broadcast server, wherein the live broadcast server is used for synchronizing live broadcast data of a plurality of live broadcast clients through a live broadcast program, and the network state is used for representing the internet access capability of the live broadcast server;
optionally, the network state includes a normal state and an abnormal state, the internet access capability of this embodiment includes an uplink access capability and a downlink access capability, and the network state is the normal state only when both the uplink access capability and the downlink access capability are detected to be normal, otherwise, the network state is the abnormal state.
Step S204, identifying the working state of the live broadcast server according to the network state, wherein the working state is used for representing whether the live broadcast server has the capability of responding to the network service request;
optionally, the working state includes an online state and an offline state, and the working state has a capability of responding to the network service request when the working state is online, and does not have a capability of responding to the network service request when the working state is offline. By identifying the working state of the live broadcast server, the console can enable the live broadcast server in the offline state to be in a server list, so that the live broadcast client is prevented from accessing the live broadcast server in the abnormal state, the live broadcast client is controlled to access the live broadcast server in the normal state, and the access success rate of the live broadcast client is improved. The network service request is a service request from a live broadcast client.
Through the steps, the network state of the live broadcast server is detected, the working state of the live broadcast server is identified according to the network state, the working state of the live broadcast server is identified through the network state, the live broadcast server with abnormal network access is prevented from being identified as an online state, the technical problem that the equipment state of the live broadcast server is identified inaccurately in the related technology is solved, accurate detection and control of the live broadcast server are achieved, and the service processing efficiency of the live broadcast server is improved.
Fig. 3 is a network architecture diagram of an embodiment of the present invention, including a live broadcast server, a first live broadcast client and a second live broadcast client, where the first live broadcast client is a client used by a host broadcast and is used to collect and upload live broadcast videos, and the second live broadcast client is a client used by a user (audience) and is used to synchronously download live broadcast videos and send help-pending messages, virtual items, etc. to the host broadcast, and a live broadcast program is run on the live broadcast server and is used to relay live broadcast data, and can be simultaneously accessed to a plurality of first live broadcast clients and second live broadcast clients, so as to implement video synchronization, message transmission, etc. between the first live broadcast client and the second live broadcast client.
In this embodiment, the network status of the live broadcast server may be detected through a plurality of types of network parameters, such as Domain Name System (DNS) resolution capability of the live broadcast server, extranet access capability, load level, and delay parameters.
In one implementation of this embodiment, detecting the network status of the live server includes:
s11, detecting the DNS state of the domain name system of the live broadcast server;
in an example based on the present embodiment, detecting a domain name system DNS state of a live server includes: controlling a live broadcast server to analyze the specified domain name; if the designated domain name is wrong in resolution, determining that the DNS state is an abnormal state; and if the designated domain name is correctly resolved, determining that the DNS state is a normal state.
In one example, a domain name of "www.baidu.com" is designated, the corresponding IP address is "119.75.217.109", a control command is sent to the live server to instruct the live server to resolve www.baidu.com, if "119.75.217.109" can be resolved, the DNS status is normal, and if the resolution is wrong (including no resolution, or no resolution), the DNS status is abnormal.
S12, if the DNS state is abnormal, determining that the network state of the live broadcast server is abnormal; if the DNS state is a normal state, detecting the extranet access state of the live broadcast server;
in another example based on the present embodiment, detecting the extranet access state of the live server includes: controlling a live broadcast server to access a plurality of target domain names; if the live broadcast server successfully accesses any one of the target domain names, determining that the access state of the external network is a normal state; and if the live broadcast server fails to access a plurality of target domain names, determining that the access state of the external network is an abnormal state.
In one example, the target domain name is a commercial website with a large access amount, so as to avoid as much as possible that the access to the extranet fails due to an error of the target domain name itself (e.g., a domain name address error, a service server corresponding to the domain name does not exist, etc.). For example, the plurality of target domain names comprise official website pages of the new wave, the Tencent and the network exchange, a control instruction is sent to the live broadcast server to instruct the live broadcast server to access the official website pages of the new wave, the Tencent and the network exchange, if the website pages of one of the new wave, the Tencent and the network exchange can be pulled, the external network access state is a normal state, if the website pages of the new wave, the Tencent and the network exchange can not be pulled, the external network access state is an abnormal state, and the live broadcast server can not normally access the external network.
S13, if the access state of the extranet is normal, determining that the network state of the live broadcast server is normal; and if the access state of the external network is an abnormal state, determining that the network state of the live broadcast server is the abnormal state.
In this embodiment, detecting the DNS state of the domain name system of the live server and the access state of the extranet does not require a time sequence relationship, and detecting the access state of the extranet of the live server first and then detecting the DNS state of the domain name system of the live server, or detecting simultaneously, and only when the DNS state and the access state of the extranet are both normal, the network state of the live server is normal.
In other embodiments, the network status of the live server may be further detected by a load level and a latency parameter, including: detecting whether the load level of the live broadcast server exceeds a preset threshold value, wherein if the load level of the live broadcast server exceeds the preset threshold value, the network state of the live broadcast server is an abnormal state, and otherwise, the network state of the live broadcast server is a normal state; and on the other hand, detecting whether the network delay of the live broadcast server exceeds the preset time length, if so, determining that the network state of the live broadcast server is in an abnormal state, and otherwise, determining that the network state of the live broadcast server is in a normal state. When the live broadcast server responds to the network service request, the live broadcast server not only needs to normally access the internet, but also needs to have certain processing efficiency and processing time, otherwise, the live broadcast server is blocked, and user experience is affected.
In an implementation manner of this embodiment, before detecting the network status of the live server, the method further includes: accessing a live program running on a live server by specifying a Uniform Resource Locator (URL) address; if the live program is successfully accessed through the appointed URL address, reading a configuration field of the live program, wherein the configuration field is used for indicating the activation state of the live program; and if the configuration field is a first field, determining to continue to detect the network state of the live broadcast server, wherein the first field is used for indicating that the live broadcast program is in an activated state.
Optionally, on the other hand, if the configuration field is a second field, directly identifying that the working state of the live broadcast server is an offline state/offline state, where the second field is used to indicate that the live broadcast program is in an inactive state.
In an implementation manner of this embodiment, after identifying the operating state of the live server according to the network state, the method further includes: and responding to the state control information aiming at the live broadcast server, and setting a configuration field of a live broadcast program running on the live broadcast server from an original field to a target field, wherein the configuration field is used for indicating the activation state of the live broadcast program.
In this embodiment, the configuration field is a custom field, which can be distinguished by two different field contents, such as 00 being a first field and 01 being a second field, and the configuration field is added to the configuration content of the live program, so as to directly use the configuration field to detect the working state of the live server, and adjust the field content of the configuration field, i.e. the live server corresponding to online or offline can be online, for example, when a certain live server is shut down and maintained, and when the certain live server is paused, and service scenarios such as limiting the access amount of the certain live server (e.g. stopping to continue accessing a new live client), etc., the configuration field of the live server can be directly set as the second field, thereby realizing the temporary adjustment of the live server, when the live server is set up, only the configuration field of the live program needs to be set, and the operation is simpler, and the service can be continuously provided for the original user request without influencing the original user request.
In an implementation manner of this embodiment, identifying the operating state of the live server according to the network state includes: if the network state is a normal state, identifying that the working state of the live broadcast server is an online state; and if the network state is an abnormal state, identifying that the working state of the live broadcast server is an offline state.
Through controlling and switching the working state of the live broadcast server, other servers (such as a drainage server) in the live broadcast system can be indicated or informed to carry out service adjustment, live broadcast services can be transferred to the live broadcast server in an online state, or maintenance personnel are informed to timely check the live broadcast server in an abnormal state, and the failure of the live broadcast services on a live broadcast client side due to the abnormity of the live broadcast server is prevented.
In an application scenario of this embodiment, the probe server accesses the live program and the live server through the probe program, and responds to a status code indicating a working status of the live server, where 403 is abnormal and 200 is normal. When the detection program accesses the URL of the live program, the URL returns a result according to the state (DNS analysis condition, extranet access condition, live program configuration and the like) of the live server, and the process comprises the following steps:
s21, the live program provides a URL, and when accessing the URL, determines a response status according to the following operations:
s211, checking the configuration state of the live program: (active or inactive, respectively for active and inactive states);
if the status is "inactive", it indicates that the live server has been put off shelf manually, and responds to the http status code 403;
if the status is "active", the next check is continued.
S212, checking the DNS state of the live broadcast server, and performing DNS analysis on the specified domain name:
if the analysis is wrong, indicating that the DNS is abnormal, responding to the http status code 403;
if the resolution is correct, the DNS is normal, and then the next step of checking is continued;
s213, checking the state of the accessed external network: several commonly used domain names are accessed:
if any one of the access is enabled, the response status code 200 indicates that the external network can be accessed;
if all domain names are not accessed, the problem of accessing the external network is shown, and the status code 403 is responded;
s22, the detection program periodically executes the above steps. If the status code 403 is taken or the status code cannot be taken, which indicates that the live broadcast server is abnormal, the live broadcast server is removed from the online server or the available server list, and no service is provided for the outside; if the status code 200 is received, the live server is normal, and if the live server is offline before, the live server is enabled to resume providing services.
By adopting the scheme of the embodiment, the detection program can not access the URL address and is considered to be abnormal; the DNS of the live broadcast server is not connected or the access to an external network is not connected, the live broadcast server is considered to be abnormal in the process of the program, when the state of the live broadcast program is set to be an 'inactivated state', the live broadcast server is also considered to be incapable of providing services to the outside, and an accurate detection scheme of the equipment state is realized. Whether the live program on the live server can provide the live service is accurately identified, for example, when the live server cannot access an external network, the live program is also considered to be incapable of providing the service. When the live program is hung up and the URL cannot be accessed, the live server is considered to be abnormal; when the DNS of the live broadcast server is not connected or the access external network is not connected, the live broadcast server is considered to be abnormal, the request of the user cannot be accessed to the live broadcast server, and the condition that the user request fails cannot occur.
When a certain live broadcast server needs to be off-shelf, the live broadcast program on the live broadcast server is set to be in an inactivated state only through the configuration field, and when the detection program is detected, the live broadcast server is considered to be abnormally picked off and no longer provides service to the outside, so that the detection efficiency is high. The live broadcast server is more convenient to download and does not influence the original user request. When the live broadcast server is off-shelf, only the state of a live broadcast program needs to be set, and the operation is simpler; and the original user request is continuously provided with the service without influencing the original user request.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
In this embodiment, an apparatus for identifying a device status is further provided, which is used to implement the foregoing embodiments and preferred embodiments, and the description that has been already made is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 4 is a block diagram of an apparatus for identifying a device status according to an embodiment of the present invention, and as shown in fig. 4, the apparatus includes: a detection module 40, a control module 42, wherein,
the detection module 40 is configured to detect a network state of a live server, where the live server is configured to synchronize live data of a plurality of live clients through a live program, and the network state includes a domain name system DNS state and/or an extranet access state;
and the control module 42 is configured to identify a working state of the live server according to the network state, where the working state is used to characterize whether the live server has a capability of responding to a network service request.
Optionally, the detection module includes: the detection unit is used for detecting the domain name system DNS state of the live broadcast server; the first processing unit is used for determining that the network state of the live broadcast server is an abnormal state if the DNS state is the abnormal state; if the DNS state is a normal state, detecting an extranet access state of the live broadcast server; the second processing unit is used for determining that the network state of the live broadcast server is a normal state if the external network access state is a normal state; and if the external network access state is an abnormal state, determining that the network state of the live broadcast server is the abnormal state.
Optionally, the detecting unit includes: the first control subunit is used for controlling the direct broadcast server to analyze the specified domain name; the first determining subunit is configured to determine that the DNS status is an abnormal status if the designated domain name resolution is incorrect; and if the designated domain name is correctly resolved, determining that the DNS state is a normal state.
Optionally, the first processing unit includes: the second control subunit is used for controlling the live broadcast server to access a plurality of target domain names; a second determining subunit, configured to determine that the extranet access state is a normal state if the live broadcast server successfully accesses any one of the target domain names; and if the live broadcast server fails to access the target domain names, determining that the access state of the external network is an abnormal state.
Optionally, the apparatus further comprises: the access module is used for accessing a live program running on the live server by specifying a Uniform Resource Locator (URL) address before the detection module detects the network state of the live server; the reading module is used for reading a configuration field of the live program if the live program is successfully accessed through the specified URL address, wherein the configuration field is used for indicating the activation state of the live program; and the determining module is used for determining to continue detecting the network state of the live broadcast server if the configuration field is a first field, wherein the first field is used for indicating that the live broadcast program is in an activated state.
Optionally, the control module includes: the first control unit is used for identifying that the working state of the live broadcast server is an online state if the network state is a normal state; and the second control unit is used for identifying that the working state of the live broadcast server is an off-line state if the network state is an abnormal state.
Optionally, the apparatus further comprises: the setting module is used for responding to the state control information aiming at the live broadcast server after the control module identifies the working state of the live broadcast server according to the network state, and setting a configuration field of a live broadcast program running on the live broadcast server from an original field to a target field, wherein the configuration field is used for indicating the activation state of the live broadcast program.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 3
Fig. 5 is a structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 5, the electronic device includes a processor 51, a communication interface 52, a memory 53 and a communication bus 54, where the processor 51, the communication interface 52, and the memory 53 complete mutual communication through the communication bus 54, and the memory 53 is used for storing a computer program; the processor 51 is configured to implement the following steps when executing the program stored in the memory 53: detecting a network state of a live broadcast server, wherein the live broadcast server is used for synchronizing live broadcast data of a plurality of live broadcast clients through a live broadcast program, and the network state comprises a Domain Name System (DNS) state and/or an extranet access state; identifying the working state of the live broadcast server according to the network state, wherein the working state is used for representing whether the live broadcast server has the capability of responding to the network service request
Further, detecting the network status of the live server comprises: detecting a Domain Name System (DNS) state of the live broadcast server; if the DNS state is an abnormal state, determining that the network state of the live broadcast server is the abnormal state; if the DNS state is a normal state, detecting an extranet access state of the live broadcast server; if the external network access state is a normal state, determining that the network state of the live broadcast server is a normal state; and if the external network access state is an abnormal state, determining that the network state of the live broadcast server is the abnormal state.
Further, detecting a domain name system DNS state of the live server includes: controlling the direct broadcast server to analyze the appointed domain name; if the designated domain name is wrong in resolution, determining that the DNS state is an abnormal state; and if the designated domain name is correctly resolved, determining that the DNS state is a normal state.
Further, detecting the extranet access state of the live server comprises: controlling the live broadcast server to access a plurality of target domain names; if the live broadcast server successfully accesses any one of the target domain names, determining that the access state of the external network is a normal state; and if the live broadcast server fails to access the target domain names, determining that the access state of the external network is an abnormal state.
Further, before detecting the network status of the live server, the method further comprises: accessing a live program running on the live server by specifying a Uniform Resource Location (URL) address; if the live program is successfully accessed through the specified URL address, reading a configuration field of the live program, wherein the configuration field is used for indicating the activation state of the live program; and if the configuration field is a first field, determining to continue to detect the network state of the live broadcast server, wherein the first field is used for indicating that the live broadcast program is in an activated state.
Further, identifying the working state of the live server according to the network state comprises: if the network state is a normal state, identifying that the working state of the live broadcast server is an online state; and if the network state is an abnormal state, identifying that the working state of the live broadcast server is an offline state.
Further, after identifying the working state of the live broadcast server according to the network state, the method further includes: and responding to the state control information aiming at the live broadcast server, and setting a configuration field of a live broadcast program running on the live broadcast server from an original field to a target field, wherein the configuration field is used for indicating the activation state of the live broadcast program.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment provided by the present application, a computer-readable storage medium is further provided, in which instructions are stored, and when the instructions are executed on a computer, the instructions cause the computer to execute the method for identifying the device status in any one of the above embodiments.
In a further embodiment provided by the present application, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method for identifying a device status as described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may 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 loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for identifying the state of equipment is characterized by comprising the following steps:
detecting a network state of a live broadcast server, wherein the live broadcast server is used for synchronizing live broadcast data of a plurality of live broadcast clients through a live broadcast program, and the network state comprises a Domain Name System (DNS) state and/or an extranet access state;
and identifying the working state of the live broadcast server according to the network state, wherein the working state is used for representing whether the live broadcast server has the capability of responding to the network service request.
2. The method of claim 1, wherein detecting a network status of a live server comprises:
detecting a Domain Name System (DNS) state of the live broadcast server;
if the DNS state is an abnormal state, determining that the network state of the live broadcast server is the abnormal state; if the DNS state is a normal state, detecting an extranet access state of the live broadcast server;
if the external network access state is a normal state, determining that the network state of the live broadcast server is a normal state; and if the external network access state is an abnormal state, determining that the network state of the live broadcast server is the abnormal state.
3. The method of claim 2, wherein detecting a Domain Name System (DNS) state of the live server comprises:
controlling the direct broadcast server to analyze the appointed domain name;
if the designated domain name is wrong in resolution, determining that the DNS state is an abnormal state; and if the designated domain name is correctly resolved, determining that the DNS state is a normal state.
4. The method of claim 2, wherein detecting the extranet access status of the live server comprises:
controlling the live broadcast server to access a plurality of target domain names;
if the live broadcast server successfully accesses any one of the target domain names, determining that the access state of the external network is a normal state; and if the live broadcast server fails to access the target domain names, determining that the access state of the external network is an abnormal state.
5. The method of claim 1, wherein prior to probing the network status of the live server, the method further comprises:
accessing a live program running on the live server by specifying a Uniform Resource Location (URL) address;
if the live program is successfully accessed through the specified URL address, reading a configuration field of the live program, wherein the configuration field is used for indicating the activation state of the live program;
and if the configuration field is a first field, determining to continue to detect the network state of the live broadcast server, wherein the first field is used for indicating that the live broadcast program is in an activated state.
6. The method of claim 1, wherein identifying the operational status of the live server based on the network status comprises:
if the network state is a normal state, identifying that the working state of the live broadcast server is an online state; and if the network state is an abnormal state, identifying that the working state of the live broadcast server is an offline state.
7. The method of claim 1, wherein after identifying the operational status of the live server from the network status, the method further comprises:
and responding to the state control information aiming at the live broadcast server, and setting a configuration field of a live broadcast program running on the live broadcast server from an original field to a target field, wherein the configuration field is used for indicating the activation state of the live broadcast program.
8. An apparatus for recognizing a device status, comprising:
the system comprises a detection module, a live broadcast server and a live broadcast server, wherein the detection module is used for detecting the network state of the live broadcast server, the live broadcast server is used for synchronizing live broadcast data of a plurality of live broadcast clients through a live broadcast program, and the network state comprises a Domain Name System (DNS) state and/or an extranet access state;
and the control module is used for identifying the working state of the live broadcast server according to the network state, wherein the working state is used for representing whether the live broadcast server has the capability of responding to the network service request.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program is operative to perform the method steps of any of the preceding claims 1 to 7.
10. An electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus; wherein:
a memory for storing a computer program;
a processor for performing the method steps of any of claims 1 to 7 by executing a program stored on a memory.
CN202110258576.8A 2021-03-09 2021-03-09 Equipment state identification method and device, storage medium and electronic equipment Pending CN113037887A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110258576.8A CN113037887A (en) 2021-03-09 2021-03-09 Equipment state identification method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110258576.8A CN113037887A (en) 2021-03-09 2021-03-09 Equipment state identification method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN113037887A true CN113037887A (en) 2021-06-25

Family

ID=76468876

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110258576.8A Pending CN113037887A (en) 2021-03-09 2021-03-09 Equipment state identification method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113037887A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102347976A (en) * 2011-07-25 2012-02-08 北京安天电子设备有限公司 Distributed network server monitoring method and system
CN102684936A (en) * 2011-03-11 2012-09-19 北京千橡网景科技发展有限公司 Method, equipment and system for monitoring running status of server
CN103152218A (en) * 2013-01-30 2013-06-12 北京奇虎科技有限公司 Method and device for inspecting and restoring computer network state
CN103974136A (en) * 2013-02-04 2014-08-06 周成 Method for WEB server and browser to collaboratively manage far-end video server
CN106681824A (en) * 2015-11-10 2017-05-17 阿里巴巴集团控股有限公司 Distributed system scheduling method and device and electronic equipment
US20170155928A1 (en) * 2015-11-26 2017-06-01 Le Holdings (Beijing) Co., Ltd. Method, Device and System for Playing Live Video
CN108132807A (en) * 2016-12-01 2018-06-08 北京云中融信网络科技有限公司 Parameter loading method and device
CN108156473A (en) * 2017-12-28 2018-06-12 网宿科技股份有限公司 A kind of method and system for obtaining live data
CN108632680A (en) * 2017-03-21 2018-10-09 华为技术有限公司 A kind of dispatching method of live content, dispatch server and terminal
US20200107050A1 (en) * 2017-05-31 2020-04-02 Huawei Technologies Co., Ltd. Live Broadcast Method and System, and Related Device
CN111918074A (en) * 2020-07-06 2020-11-10 深圳市鸿合创新信息技术有限责任公司 Live video fault early warning method and related equipment

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102684936A (en) * 2011-03-11 2012-09-19 北京千橡网景科技发展有限公司 Method, equipment and system for monitoring running status of server
CN102347976A (en) * 2011-07-25 2012-02-08 北京安天电子设备有限公司 Distributed network server monitoring method and system
CN103152218A (en) * 2013-01-30 2013-06-12 北京奇虎科技有限公司 Method and device for inspecting and restoring computer network state
CN103974136A (en) * 2013-02-04 2014-08-06 周成 Method for WEB server and browser to collaboratively manage far-end video server
CN106681824A (en) * 2015-11-10 2017-05-17 阿里巴巴集团控股有限公司 Distributed system scheduling method and device and electronic equipment
US20170155928A1 (en) * 2015-11-26 2017-06-01 Le Holdings (Beijing) Co., Ltd. Method, Device and System for Playing Live Video
CN108132807A (en) * 2016-12-01 2018-06-08 北京云中融信网络科技有限公司 Parameter loading method and device
CN108632680A (en) * 2017-03-21 2018-10-09 华为技术有限公司 A kind of dispatching method of live content, dispatch server and terminal
US20200107050A1 (en) * 2017-05-31 2020-04-02 Huawei Technologies Co., Ltd. Live Broadcast Method and System, and Related Device
CN108156473A (en) * 2017-12-28 2018-06-12 网宿科技股份有限公司 A kind of method and system for obtaining live data
CN111918074A (en) * 2020-07-06 2020-11-10 深圳市鸿合创新信息技术有限责任公司 Live video fault early warning method and related equipment

Similar Documents

Publication Publication Date Title
TW201944236A (en) Task processing method, apparatus, and system
EP2454678B1 (en) Downloading a plug-in on an instant messaging client
CN113472607B (en) Application program network environment detection method, device, equipment and storage medium
CN107395783B (en) IP address processing method, system, device and electronic equipment
US9596313B2 (en) Method, terminal, cache server and system for updating webpage data
CN113473576B (en) Roaming networking processing method and device, mobile terminal and readable storage medium
CN114629822B (en) Link detection method, device, electronic equipment and storage medium
US10469311B2 (en) Handling network failures in networks with redundant servers
CN109962827B (en) Equipment link detection method, device, equipment and readable storage medium
WO2020259551A1 (en) Method and apparatus for handling network connection fault
US20210258386A1 (en) Connection control method and device
CN112650606A (en) Message processing method, device and system, electronic equipment and storage medium
CN110661673B (en) Heartbeat detection method and device
CN112118151A (en) Network speed measuring method, device, system, electronic equipment and storage medium
CN112039718A (en) Upgrade state detection method, server, device and storage medium
US10842041B2 (en) Method for remotely clearing abnormal status of racks applied in data center
US10754722B1 (en) Method for remotely clearing abnormal status of racks applied in data center
CN111064802A (en) Network request processing method and device, electronic equipment and storage medium
CN113825000A (en) Screen projection method and device, electronic equipment and storage medium
CN108933706B (en) Method, device and system for monitoring data traffic
CN111866921A (en) Method, device and equipment for searching service fault of 5G base station and storage medium
CN113037887A (en) Equipment state identification method and device, storage medium and electronic equipment
CN115378841B (en) Method and device for detecting state of equipment accessing cloud platform, storage medium and terminal
CN110521233B (en) Method for identifying interrupt, access point, method for remote configuration, system and medium
CN110808967A (en) Detection method for challenging black hole attack and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210625