CN113315683A - Efficient distributed equipment state management method - Google Patents

Efficient distributed equipment state management method Download PDF

Info

Publication number
CN113315683A
CN113315683A CN202110695052.5A CN202110695052A CN113315683A CN 113315683 A CN113315683 A CN 113315683A CN 202110695052 A CN202110695052 A CN 202110695052A CN 113315683 A CN113315683 A CN 113315683A
Authority
CN
China
Prior art keywords
client
state
server
device1
message
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
CN202110695052.5A
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 Research Institute of Precise Mechatronic Controls
Original Assignee
Beijing Research Institute of Precise Mechatronic Controls
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 Research Institute of Precise Mechatronic Controls filed Critical Beijing Research Institute of Precise Mechatronic Controls
Priority to CN202110695052.5A priority Critical patent/CN113315683A/en
Publication of CN113315683A publication Critical patent/CN113315683A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention provides a high-efficiency distributed equipment state management method, which belongs to the technical field of equipment state management and comprises the following steps: s1, initializing a system state; s2, testing and resource occupation of the first client; s3, updating the state of other clients; s4, the first client completes the test and releases the resource; s5, updating the state of other clients; thus, efficient distributed device state management is completed. The invention not only can rapidly acquire the equipment state in real time, but also avoids the consumption and utilization of resources by continuous polling, and can be applied to distributed multi-equipment or other systems with strong dependency on the resource state. Compared with the prior art, the system has the advantages of less occupied system resources and high resource cost performance, solves the problems in the prior art, and has outstanding substantive characteristics and remarkable progress.

Description

Efficient distributed equipment state management method
Technical Field
The invention belongs to the technical field of equipment state management, and particularly relates to an efficient distributed equipment state management method.
Background
With the demand of production development, various industries tend to carry out centralized, information and intelligent management on production, equipment and the like. How to efficiently monitor and manage the state of the on-line equipment provides reference for smooth production, and is an important link for realizing the aim.
The technologies of local area network configuration, communication technology, informatization technology, information security and the like provide possibility for centralized monitoring and management, and on the basis, a B/S or C/S architecture can be adopted for constructing an application program; for the multi-point to multi-point client application under the C/S architecture, the available device resource condition needs to be dynamically updated for each client in real time according to the current network state and the device resource usage condition.
In a centralized control system of a tester, a plurality of testers need to be remotely controlled on a plurality of centralized control clients, and in the process of initiating a task, connection can be established between the current operation client and the testers only if the states of the testers are available; once the connection is established, other centralized control clients must know immediately, and the tester is not displayed in the available equipment list any more; after the task is completed and the centralized control client is disconnected from the tester, other centralized control clients can select the tester from the available equipment list.
The realization of the above described functions requires monitoring the states of a plurality of testers and feeding back to all on-line centralized control clients. In a conventional mode, each centralized control client needs to poll the states of the lower computers of the plurality of testers, and updates the states once the states are changed. The device state management method in the prior art has the following problems:
1. a large amount of system resources are consumed;
2. the state change time precision is related to the polling time interval, and the precision directly conflicts with the occupation of system resources;
3. the state of the tester is not a rapid change process, and the resource cost performance is very low.
In summary, the existing multipoint-to-multipoint client application management method under the C/S architecture has the problems of large system resource occupation and low resource cost ratio, and needs to be improved.
Disclosure of Invention
The invention provides a high-efficiency distributed equipment state management method, and aims to solve the problems of large system resource occupation and low resource cost ratio of a multipoint-to-multipoint client application management method under a C/S framework in the prior art.
The purpose of the invention is realized by the following technical scheme:
an efficient distributed device state management method comprises the following steps:
s1, initializing a system state;
s2, testing and resource occupation of the first client;
s3, updating the state of other clients;
s4, the first client completes the test and releases the resource;
s5, updating the state of other clients;
thus, efficient distributed device state management is completed.
Preferably, in step S1, the system state initialization includes the following steps:
when the centralized control client is started, subscribing a test equipment state channel to the server, and acquiring the states of all test equipment at the current moment from the server, wherein the current client can only access equipment with an idle state;
when a centralized control client subscribes a test equipment state channel to a server, the server sends a message to all clients subscribing the channel as long as receiving a state change message, and the clients serve as subscribers at the moment and update test equipment state information after receiving the message; when no message is received, the default device state is not changed.
Preferably, in step S1, in the initialization phase, the first client and the second client are both subscribers and are registered on the server;
when the client establishes connection with the test equipment and starts to test, the role of the client changes: the first client serves as a state publisher and sends a message to the server; the server receives the message and informs all subscribers; and the second client serves as a state receiver, and triggers a response to update the state when receiving the message.
Preferably, in step S2, the first client testing and resource occupation includes the following steps:
if the first client has occupied a certain "free" Device1, an occupation request is sent to the server, the server allocates resources to the first client and sets the status of the Device1 to "occupied", and the first client establishes a connection with the test Device 1.
Preferably, in step S3, the other client status update includes the following steps:
s3.1, after the server receives the request of the first client and determines that the resources are allocated, updating the state of the device1 to be occupied;
s3.2, the server inquires from the test equipment state channel, and all client lists subscribing the channel are listed;
s3.3, the server sequentially sends messages to the clients in the list, wherein the content of the messages is the current state of the Device 1;
s3.4, other clients (second clients) receive the message of the server and update the state of the Device 1;
s3.5, when the second client establishes a new task, the Device1 is no longer in the available Device list, and the second client cannot establish a connection with the Device 1.
Preferably, in step S4, the step of completing the test and releasing the resource by the first client includes the following steps:
the first client disconnects the Device1, sends a message to the server, releases the Device1 resource, and updates the Device1 status after the server determines that the resource is released.
Preferably, in step S5, the other client status update includes the following steps:
s5.1, after the server receives the request of the first client and determines that the resource is released, updating the state of the device1 to be idle;
s5.2, the server inquires from the test equipment state channel, and all client lists subscribing the channel are listed;
s5.3, the server sequentially sends messages to the clients in the list, wherein the content of the messages is the current state of the Device 1;
s5.4, the other client (the second client) receives the message of the server, and updates the state of the Device1 to be idle;
s5.5, when the second client establishes a new task, the Device1 appears in the available Device list again, and the second client can establish a connection with the Device1 and perform the task.
The beneficial technical effects obtained by the invention are as follows:
the method can not only obtain the state of the equipment in real time and rapidly, but also avoid the consumption and utilization of resources by continuous polling, and can be applied to distributed multi-equipment or other systems with strong dependency on the state of the resources. Compared with the prior art, the system has the advantages of less occupied system resources and high resource cost performance, solves the problems in the prior art, and has outstanding substantive characteristics and remarkable progress.
Drawings
FIG. 1 is a diagram of a device connection according to an embodiment of the present invention;
FIG. 2 is a block flow diagram of one embodiment of the present invention.
Detailed Description
The technical solution of the present invention will be further described in detail with reference to the accompanying drawings and the detailed description. It is to be understood that the described embodiments are merely a few embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the invention without making creative efforts, shall fall within the scope of the claimed invention.
As shown in fig. 1, a specific embodiment of a method for efficiently managing states of distributed devices includes that a distributed device includes a plurality of centralized control clients, a plurality of test devices, and a server, where the devices are connected via a local area network, and in order to ensure real-time performance of a test task, the devices are allocated in two different network segments according to services, where a remote client may be connected to any test device in a resource available state.
In this specific embodiment, a publish-subscribe manner is adopted to implement state monitoring on devices, where a server is used as a message center to uniformly manage and maintain states of the devices, and a centralized control client is a subscriber and a state publisher, as shown in fig. 2, the distributed device state management method in this specific embodiment is performed according to the following steps:
s1, initializing system state
When the centralized control client is started, a test equipment state channel is subscribed to the server, the states of all test equipment at the current moment are obtained from the server, and the current client can only access equipment with an idle state.
When a centralized control client subscribes a test equipment state channel to a server, the server sends a message to all clients subscribing the channel as long as receiving a state change message, and the clients serve as subscribers at the moment and update test equipment state information after receiving the message; when no message is received, the default device state is not changed.
In this embodiment, in the initialization stage, the first client and the second client are both subscribers and are registered on the server. When the client establishes connection with the test equipment and starts to test, the role of the client changes: the first client serves as a state publisher and sends a message to the server; the server receives the message and informs all subscribers; the second client serves as a state receiver, and triggers a response to update the state when receiving the message, and the specific process is as follows:
s2, testing and resource occupation of first client
If the first client has occupied a certain "free" Device1, an occupation request is sent to the server, the server allocates resources to the first client and sets the status of the Device1 to "occupied", and the first client establishes a connection with the test Device 1.
S3, other client status update
S3.1, after the server receives the request of the first client and determines that the resources are allocated, updating the state of the device1 to be occupied;
s3.2, the server inquires from the test equipment state channel, and all client lists subscribing the channel are listed;
s3.3, the server sequentially sends messages to the clients in the list, wherein the content of the messages is the current state of the Device 1;
s3.4, the other client (in fig. 2, the second client is substituted) receives the message from the server, and updates the state of the Device 1;
s3.5, when the second client establishes a new task, the Device1 is no longer in the available Device list, and the second client cannot establish a connection with the Device 1.
S4, the first client completes the test and releases the resource
The first client disconnects the Device1, sends a message to the server, releases the Device1 resource, and updates the Device1 status after the server determines that the resource is released.
S5, other client status update
S5.1, after the server receives the request of the first client and determines that the resource is released, updating the state of the device1 to be idle;
s5.2, the server inquires from the test equipment state channel, and all client lists subscribing the channel are listed;
s5.3, the server sequentially sends messages to the clients in the list, wherein the content of the messages is the current state of the Device 1;
s5.4, other clients (in the figure, the second client replaces) receive the message of the server, and the state of the Device1 is updated to be idle;
s5.5, when the second client establishes a new task, the Device1 appears in the available Device list again, and the second client can establish a connection with the Device1 and perform the task.
Thus, efficient distributed device state management is completed.
The beneficial technical effects achieved by the above specific embodiments are:
the method can not only obtain the state of the equipment in real time and rapidly, but also avoid the consumption and utilization of resources by continuous polling, and can be applied to distributed multi-equipment or other systems with strong dependency on the state of the resources. Compared with the prior art, the system has the advantages of less occupied system resources and high resource cost performance, solves the problems in the prior art, and has outstanding substantive characteristics and remarkable progress.
The specific embodiment can be universally applied to the maintenance of the equipment state by the client under the distributed condition; can be applied to the application of a certain exclusive resource; the method can be applied to a centralized control system; the method can be used for updating data with low refresh frequency in point-to-point communication.

Claims (7)

1. An efficient distributed device state management method is characterized by comprising the following steps:
s1, initializing a system state;
s2, testing and resource occupation of the first client;
s3, updating the state of other clients;
s4, the first client completes the test and releases the resource;
s5, updating the state of other clients;
thus, efficient distributed device state management is completed.
2. The method of claim 1, wherein the method further comprises: in step S1, the system state initialization includes the following steps:
when the centralized control client is started, subscribing a test equipment state channel to the server, and acquiring the states of all test equipment at the current moment from the server, wherein the current client can only access equipment with an idle state;
when a centralized control client subscribes a test equipment state channel to a server, the server sends a message to all clients subscribing the channel as long as receiving a state change message, and the clients serve as subscribers at the moment and update test equipment state information after receiving the message; when no message is received, the default device state is not changed.
3. The method of claim 2, wherein the method further comprises: in step S1, in the initialization phase, the first client and the second client are both subscribers and are registered on the server;
when the client establishes connection with the test equipment and starts to test, the role of the client changes: the first client serves as a state publisher and sends a message to the server; the server receives the message and informs all subscribers; and the second client serves as a state receiver, and triggers a response to update the state when receiving the message.
4. The method of claim 3, wherein the method further comprises: in step S2, the first client testing and resource occupation includes the following steps:
if the first client has occupied a certain "free" Device1, an occupation request is sent to the server, the server allocates resources to the first client and sets the status of the Device1 to "occupied", and the first client establishes a connection with the test Device 1.
5. The method of claim 4, wherein the method further comprises: in step S3, the other client status update includes the following steps:
s3.1, after the server receives the request of the first client and determines that the resources are allocated, updating the state of the device1 to be occupied;
s3.2, the server inquires from the test equipment state channel, and all client lists subscribing the channel are listed;
s3.3, the server sequentially sends messages to the clients in the list, wherein the content of the messages is the current state of the Device 1;
s3.4, other clients (second clients) receive the message of the server and update the state of the Device 1;
s3.5, when the second client establishes a new task, the Device1 is no longer in the available Device list, and the second client cannot establish a connection with the Device 1.
6. The method of claim 5, wherein the method further comprises: in step S4, the step of completing the test and releasing the resource by the first client includes the following steps:
the first client disconnects the Device1, sends a message to the server, releases the Device1 resource, and updates the Device1 status after the server determines that the resource is released.
7. The method of claim 6, wherein the method further comprises: in step S5, the other client status update includes the following steps:
s5.1, after the server receives the request of the first client and determines that the resource is released, updating the state of the device1 to be idle;
s5.2, the server inquires from the test equipment state channel, and all client lists subscribing the channel are listed;
s5.3, the server sequentially sends messages to the clients in the list, wherein the content of the messages is the current state of the Device 1;
s5.4, the other client (the second client) receives the message of the server, and updates the state of the Device1 to be idle;
s5.5, when the second client establishes a new task, the Device1 appears in the available Device list again, and the second client can establish a connection with the Device1 and perform the task.
CN202110695052.5A 2021-06-23 2021-06-23 Efficient distributed equipment state management method Pending CN113315683A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110695052.5A CN113315683A (en) 2021-06-23 2021-06-23 Efficient distributed equipment state management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110695052.5A CN113315683A (en) 2021-06-23 2021-06-23 Efficient distributed equipment state management method

Publications (1)

Publication Number Publication Date
CN113315683A true CN113315683A (en) 2021-08-27

Family

ID=77379821

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110695052.5A Pending CN113315683A (en) 2021-06-23 2021-06-23 Efficient distributed equipment state management method

Country Status (1)

Country Link
CN (1) CN113315683A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117811833A (en) * 2024-02-23 2024-04-02 山东华翼微电子技术股份有限公司 Unified network crypto-engine management system and method based on publishing and subscribing mode

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1630235A (en) * 2003-12-15 2005-06-22 华为技术有限公司 Method for reflecting task progress of message based distributed platform client
CN101764830A (en) * 2008-11-28 2010-06-30 新奥特(北京)视频技术有限公司 State synchronous method and system based on message subscribing manner
CN102571818A (en) * 2012-02-16 2012-07-11 华为数字技术有限公司 Testing instrument multiplexing method, equipment and system
CN104426715A (en) * 2013-09-03 2015-03-18 北京信威通信技术股份有限公司 Distributed testing tool control method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1630235A (en) * 2003-12-15 2005-06-22 华为技术有限公司 Method for reflecting task progress of message based distributed platform client
CN101764830A (en) * 2008-11-28 2010-06-30 新奥特(北京)视频技术有限公司 State synchronous method and system based on message subscribing manner
CN102571818A (en) * 2012-02-16 2012-07-11 华为数字技术有限公司 Testing instrument multiplexing method, equipment and system
CN104426715A (en) * 2013-09-03 2015-03-18 北京信威通信技术股份有限公司 Distributed testing tool control method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117811833A (en) * 2024-02-23 2024-04-02 山东华翼微电子技术股份有限公司 Unified network crypto-engine management system and method based on publishing and subscribing mode
CN117811833B (en) * 2024-02-23 2024-05-10 山东华翼微电子技术股份有限公司 Unified network crypto-engine management system and method based on publishing and subscribing mode

Similar Documents

Publication Publication Date Title
CN109995669B (en) Distributed current limiting method, device, equipment and readable storage medium
CN110944219B (en) Resource allocation method, device, server and storage medium
CN107341044A (en) A kind of distributive data center unified monitoring framework and method
CN102255934A (en) Cloud service publishing method, cloud service publishing interface message packet and cloud service broker
WO2007123959A2 (en) Accessing a calendar server to facilitate initiation of a scheduled call
CN111078404B (en) Computing resource determining method and device, electronic equipment and medium
CN112839067B (en) Data synchronization method and device
WO2020119060A1 (en) Method and system for scheduling container resources, server, and computer readable storage medium
CN110309231A (en) A kind of method of data synchronization and system across computer room
CN102118448A (en) Method, system and terminal for realizing cloud computing
CN113315683A (en) Efficient distributed equipment state management method
EP3855689A1 (en) Method, apparatus, and system for providing service, storage medium, and electronic device
CN106411713A (en) Status notification method and server
JP5610773B2 (en) Message processing apparatus and message processing method
Trumler et al. Self-configuration via cooperative social behavior
CN113157796A (en) Data acquisition display system based on micro-service
CN116775420A (en) Information creation cloud platform resource display and early warning method and system based on Flink flow calculation
CN111294252A (en) Cluster test system
CN109962967A (en) The method of data synchronization subscribed to based on increment
CN109194731A (en) A kind of concurrent real-time Data Transmission interface realizing method based on configuration software
CN109495303A (en) Obtain the method, device network managing device and system, electronic device and storage medium of equipment parameter information
CN108696550A (en) Rapid build and the system and method for replicating cloud
CN109327529B (en) Distributed scanning method and system
CN109450686B (en) Network resource management system and method based on pervasive network
CN113542424A (en) Data processing method, device, equipment and computer program product

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210827