CN114328724A - Data synchronization method and system for parallel client of equipment - Google Patents

Data synchronization method and system for parallel client of equipment Download PDF

Info

Publication number
CN114328724A
CN114328724A CN202111607044.7A CN202111607044A CN114328724A CN 114328724 A CN114328724 A CN 114328724A CN 202111607044 A CN202111607044 A CN 202111607044A CN 114328724 A CN114328724 A CN 114328724A
Authority
CN
China
Prior art keywords
client
list
clients
instruction
data
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
CN202111607044.7A
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.)
Chinainstru and Quantumtech Hefei Co Ltd
Original Assignee
Chinainstru and Quantumtech Hefei 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 Chinainstru and Quantumtech Hefei Co Ltd filed Critical Chinainstru and Quantumtech Hefei Co Ltd
Priority to CN202111607044.7A priority Critical patent/CN114328724A/en
Publication of CN114328724A publication Critical patent/CN114328724A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a device parallel client data synchronization method, which comprises the following steps: s1: acquiring client connection information of the common connection equipment; s2: establishing connection among the clients; s3: when any client sends an instruction to the equipment, synchronous data is sent to other clients at the same time; s4: and after receiving the synchronous data sent by other clients, any client synchronizes the data of the client. The method and the system can reduce the occupancy rate of data synchronization operation among multiple clients to a signal channel and a processor and improve the timeliness of the data synchronization operation among the multiple clients when the multiple clients simultaneously control one or a group of devices.

Description

Data synchronization method and system for parallel client of equipment
Technical Field
The application relates to the technical field of transmission, storage and application of equipment control information and output information, in particular to a method and a system for synchronizing data of parallel clients of equipment.
Background
In practical application, for the convenience of development of experimental research work, analysis and detection equipment such as a single spin spectrometer, an electron paramagnetic resonance spectrometer, a scanning electron microscope and an atomic force microscope sometimes need to be provided with a plurality of clients for simultaneous control, so that on one hand, experimenters can control and read data of the equipment at different positions, and on the other hand, multi-user cooperative operation can be realized.
The method includes that a plurality of clients simultaneously control one or a group of equipment, and firstly, the problem to be solved is how to realize data synchronization among the plurality of clients, and especially when any client modifies the working parameters of the equipment or sends an operation instruction, other clients are required to synchronously obtain the modified working parameters of the equipment or the operation instruction and the working state of the equipment.
In order to solve the problems, the conventional solution is that each client acquires real-time device operating parameters and states at a fixed period, and the scheme has the disadvantages that the real-time device operating parameters and states often relate to more data information, and if the frequency of acquiring the real-time device operating parameters and states by the client is higher, the occupancy rate of the job on a signal channel and a processor is too high, so that the job efficiency of other conventional functions of the device and the client is influenced; if the frequency of the client acquiring the real-time working parameters of the equipment and the working state of the equipment is low, data asynchronization between different clients is easily caused, and the equipment receives repeated instructions with the same or different contents, so that errors in the analysis process and even system abnormity are caused.
Disclosure of Invention
The application provides a method and a system for synchronizing data of a parallel client of equipment, which can at least partially solve the technical problems in the background technology to a certain extent.
The application provides a data synchronization method for equipment parallel clients, which comprises the following steps:
s1: acquiring client connection information of the common connection equipment;
s2: establishing connection among the clients;
s3: when any client sends an instruction to the equipment, synchronous data is sent to other clients at the same time;
s4: and after receiving the synchronous data sent by other clients, any client synchronizes the data of the client.
The connection information includes, but is not limited to, client IP address, MAC address, software version number, supported device model number, etc.
As a further improvement of the above technical solution, step S1 includes:
s11: the method comprises the steps that the equipment establishes connection with two or more clients;
s12: the device records the client connection information for establishing the connection and forms a list.
As a further improvement of the above technical solution, step S1 further includes S13:
when a client side outside the list requests to establish connection, the equipment adds the connection information of the client side in the list;
when a client requests disconnection in the list, the device deletes the connection information of the client in the list.
As a further improvement of the above technical solution, step S2 includes:
s21: each client acquires a list;
s22: each client establishes a connection with other clients in the list except itself.
As a further improvement of the above technical solution, step S2 includes:
s21: each client acquires a list;
s22: each client establishes connection with other clients except the client in the list;
s23: when the list is changed, the equipment sends the changed list to the client in the changed list;
s24: and each client receives and establishes connection with other clients except the client in the list according to the changed list.
As a further improvement of the above technical solution, step S3 includes:
s31: the client receives an input instruction of a user;
s32: the client judges whether the input instruction belongs to the equipment control instruction, if not, the operation is finished, and if so, the operation continues to step S33;
s33: the client sends the input instruction to the equipment, and simultaneously sends the input instruction to other clients except the client in the list.
The equipment control instruction specifically refers to a parameter instruction for controlling the working state of the equipment and an operation instruction for controlling the working process of the equipment.
As a further improvement of the above technical solution, step S3 includes:
s301: when the user selects a certain instruction input box for inputting an instruction, the client judges whether the instruction input box belongs to the equipment control instruction input box, if not, the operation is finished, and if so, the operation continues to the step S302;
s302: for the instruction input box selected by the user, the client sends an input box locking instruction to other clients except the client in the list;
s303: the client receives input box locking instructions sent by other clients except the client in the list;
s304: and the client locks the specified instruction input box according to the received input box locking instruction.
The locking is that the instruction input box cannot be selected, or the instruction input box can be selected but cannot input an instruction, or the instruction input in the instruction input box cannot be confirmed or executed.
As a further improvement of the above technical solution, in step S304, the locked instruction input box displays a locked state.
As a further improvement of the above technical solution, in step S304, the locked instruction input box displays the locking reason.
As a further improvement of the above technical solution, step S3 further includes:
s305: when the instruction input box selected by the user in step S302 finishes the selection state, the client sends an input box unlocking instruction to other clients in the list except for the client itself;
s306: the client receives input box unlocking instructions sent by other clients except the client in the list;
s307: and the client unlocks the specified instruction input box according to the received input box unlocking instruction.
As a further improvement of the above technical solution, step S4 includes:
s41: the client receives input instructions sent by other clients except the client in the list;
s42: and the client synchronizes data according to the received input instruction.
As a further improvement of the above technical solution, step S4 further includes:
s43: after receiving the client synchronous data of the input instruction, replying a synchronous confirmation message to the client sending the input instruction;
s44: the client sending the input instruction does not receive the synchronization confirmation message replied by one or more clients except the client in the list within the set time, and then sends the connection information of the client not replying the synchronization confirmation message to the equipment;
s45: after receiving the connection information of the client which does not reply the synchronization confirmation message, the equipment sends real-time working parameters and state data to the client which does not reply the synchronization confirmation message;
s46: after receiving real-time working parameters and state data of the equipment, the client synchronizes the data of the client and replies a connection confirmation message to the equipment;
s47: and for the client side which does not reply the synchronization confirmation message, the equipment does not receive the connection confirmation message within the set time after the real-time working parameters and the state data are sent, and the client side is judged to request to disconnect.
The application also provides a parallel client data synchronization system of equipment, including: the system comprises a device and two or more clients for controlling the device and reading data;
the apparatus comprises: the system comprises a first communication module used for establishing data connection with two or more clients and a first list module used for recording and storing the connection information of all the clients connected with the first communication module;
the client comprises: the device comprises a communication module II used for establishing data connection with the equipment and other clients, a list module II used for synchronizing with the content of the list module I, a monitoring module used for collecting user input instructions per se and judging whether the clients except the clients in the list module II need to be synchronized, and a synchronization module used for synchronizing data per se according to the data sent by the clients except the clients in the list module II.
As a further improvement of the above technical solution, the first list module is further configured to add connection information of the client when the connection is established according to the client request, and delete connection information of the client when the connection is disconnected according to the client request.
As a further improvement of the above technical solution, the monitoring module is configured to determine whether the instruction input box belongs to the device control instruction input box when the user selects the instruction input box, and is configured to send an input box locking instruction to the other clients except the client itself in the list module two when the user selects the device control instruction input box; the synchronization module is also used for receiving input frame locking instructions sent by other clients except the client in the list module II, and is used for locking the specified instruction input frame according to the received input frame locking instructions.
As a further improvement of the above technical solution, the monitoring module is configured to determine whether synchronization of the clients other than the self-user input instruction in the list module two is required according to whether the collected self-user input instruction belongs to an equipment control instruction, and is further configured to send the input instruction determined by the monitoring module to be synchronized to the clients other than the self-user input instruction in the list module two; the synchronization module is also used for receiving input instructions which are sent by other clients except the client in the list module II and need to be synchronized.
As a further improvement of the above technical solution, the client further includes a first confirmation module, where the first confirmation module is configured to reply a synchronization confirmation message to the client that sends the input instruction when the second communication module receives the input instruction, and is configured to count an unanswered person, where the unanswered person is the client that receives the input instruction that does not reply the synchronization confirmation message within a set time after the second communication module sends the input instruction.
As a further improvement of the above technical solution, the device further includes a second confirmation module, the first confirmation module is further configured to send the connection information of the non-replier to the second confirmation module, and the second confirmation module is configured to send real-time operating parameters and status data of the device to the non-replier;
the synchronization module is also used for receiving the real-time working parameters and the real-time state data of the equipment, synchronizing the data per se according to the real-time working parameters and the real-time state data of the equipment and replying a connection confirmation message to the confirmation module II; and the second confirmation module is also used for judging that the client requests to disconnect when the connection confirmation message is not received within the set time after the real-time working parameters and the real-time state data of the equipment are sent.
The present application further provides an electronic device, including: memory, processor and computer program stored on the memory and executable on the processor, the processor executing the program to implement a device parallel client data synchronization method as described above and subsequent improvements thereof.
The present application also provides a non-transitory computer readable storage medium having stored thereon a computer program for execution by a processor for implementing a device parallel client data synchronization method as described above and subsequent improvements thereof.
Compared with the prior art, the beneficial effect of this application is:
the method and the system for data synchronization of the parallel clients of the equipment can reduce the occupancy rate of data synchronization operation among multiple clients to a signal channel and a processor and improve the timeliness of the data synchronization operation among the multiple clients when the multiple clients simultaneously control one or one group of equipment.
Through the client list, each client can conveniently know the connection information and range with other clients, and each client can update the list in real time when requesting to connect or disconnect equipment, so that the situation that newly connected clients cannot receive synchronous data or disconnected clients still receive the synchronous data is avoided.
When the user selects the device control instruction input box, the instruction input boxes corresponding to other clients are locked, so that the method and the device can be suitable for parameter instructions and operation instructions which need to be completed by inputting contents such as numerical values in a certain time, and the probability of simultaneous operation and conflict among different clients is reduced.
The locking state of the instruction input frame is displayed, so that the user is conveniently prompted that other clients are operating; by displaying the locking reason of the instruction input box, the expansion of the locking function of the instruction input box is convenient to realize, and the instruction input box can be locked in other states needing to be locked.
When the data synchronization between the clients is blocked or disconnected, the device can still send real-time working parameters and state data to the client which fails to synchronize the data so as to facilitate the data synchronization, and when the connection between the client which fails to synchronize the data and the device cannot be realized, the disconnection of the client is directly judged so as to avoid the useless work caused by continuously sending the data to the client when the data of other clients are synchronized.
Drawings
The following drawings are provided to aid those skilled in the art in better understanding the summary of the invention and/or the detailed description of the invention; the drawings of the present application are intended to illustrate the present application and should not be construed as limiting the present application.
Fig. 1 is a schematic flow chart of a device parallel client data synchronization method according to the present application;
fig. 2 is a schematic structural diagram of a device parallel client data synchronization system according to the present application.
Detailed Description
In order to facilitate those skilled in the art to clearly understand the technical features of the present application and the technical problems solved thereby and the technical effects achieved thereby, the following describes the technical solutions and/or implementations of the present application with reference to specific embodiments in the drawings; the detailed description of the present application is intended to be illustrative of the present application and is not to be construed as limiting the present application.
Referring to the content shown in fig. 1, the present embodiment provides a device parallel client data synchronization method, including the following steps:
s1: the client connection information of the common connection device is obtained (taking fig. 1 as an example, the connection information of the a client, the b client and the d client of the common connection device is obtained). The connection information includes, but is not limited to, client IP address, MAC address, software version number, supported device model number, etc.
Specifically, step S1 includes:
s11: the device establishes connection with two or more clients (namely, a client, b client and d client); specifically, all clients needing to connect with the device send a search device broadcast or a directional sending message to the device, when the device receives the broadcast or the message, the connection information of the client in the broadcast or the message is recorded, and the broadcast or the message is replied, wherein the replied content comprises information such as a device IP, a device MAC, a device hardware version number, a device firmware version number, a device model number and the like; when the client receives the reply information of the equipment, the client judges whether the equipment is in accordance by comparing the model number and the version of the equipment, if so, the client determines that the equipment is found, the client establishes connection with the equipment, and at the moment, the client can send connection success information to the equipment;
s12: the device records the connection information of the clients (namely, a client, b client and d client) establishing the connection and forms a list (abd); specifically, each time connection success information sent by one client is received, whether the connection information of the client is recorded or not is inquired in the list, if yes, the operation is ended, and if not, the connection information of the client is added to the list;
s13: when a client (namely, the c client) outside the list requests to establish connection, the equipment adds the connection information of the client (namely, the c client) in the list (abd);
when there is a request for disconnection from a client (i.e., d-client) in the list, the device deletes the connection information of the client (i.e., d-client) in the list (abd).
S2: and establishing connection among the clients (taking fig. 1 as an example, establishing connection among the client a, the client b and the client c).
Specifically, step S2 includes:
s21: each client (namely, a client, b client and d client) acquires a list (abd); specifically, when the device replies the broadcast or the message to the client, the device sends a list to the client at the same time;
s22: each client (namely, a client, b client and d client) establishes connection with other clients except the client in the list (abd); specifically, the client receives the reply information of the device and also receives the list, so that connection can be established with other clients except the client in the list through the connection information recorded in the list;
s23: when the list (abd) is changed, the equipment sends the changed list (abc) to the clients (namely, a client, b client and c client) in the changed list (abc);
s24: each client (namely, the client a, the client b and the client c) receives and establishes connection with other clients except the client in the list (abc) according to the changed list (abc).
S3: when any client sends an instruction to the device, synchronous data is sent to other clients at the same time (taking fig. 1 as an example, when a client sends an instruction to the device, synchronous data is sent to b client and c client at the same time).
Specifically, step S3 includes:
s31: a, a client receives an input instruction of a user;
s32: the client (i.e. a client) judges whether the input command belongs to the equipment control command, if not, the operation is finished, and if so, the operation continues to the step S33; the equipment control instruction specifically refers to a parameter instruction for controlling the working state of the equipment and an operation instruction for controlling the working process of the equipment;
s33: the clients (i.e., a-clients) send input instructions to the device while sending input instructions to other clients (i.e., b-clients and c-clients) in the list (abc) except for themselves.
Some parameter instructions and operation instructions are finished instantly by directly clicking, and the probability of simultaneous operation and conflict among different clients is relatively low; some parameter instructions and operation instructions are completed by inputting contents such as numerical values and the like, a certain time is needed, and the probability of simultaneous operation and conflict among different clients is relatively high and needs to be overcome; for this, step S3 further includes:
s301: when the user selects a certain command input box for inputting a command, the client (i.e. a client) judges whether the command input box belongs to the device control command input box, if not, the process is finished, if yes, the process continues to step S302;
s302: for the instruction input box selected by the user, the client (namely, a client) sends an input box locking instruction to other clients (namely, b client and c client) except the client in the list (abc);
s303: the client (namely, the b client and the c client) receives input box locking instructions sent by other clients (namely, the a client) except the client in the list (abc);
s304: the client (namely, the b client and the c client) locks the specified instruction input box according to the received input box locking instruction.
The locking is that the instruction input box cannot be selected, or the instruction input box can be selected but cannot input an instruction, or the instruction input in the instruction input box cannot be confirmed or executed. The method comprises the steps of realizing the locking of the instruction input box, and the following steps of realizing the unlocking of the instruction input box:
s305: when the instruction input box selected by the user in step S302 ends the selection state, the client (i.e., the a client) sends an input box unlocking instruction to other clients (i.e., the b client and the c client) in the list (abc) except for itself; the instruction input box ending selection state may specifically be that the user cancels selection of the instruction input box or completes input in the instruction input box;
s306: the client (namely, the b client and the c client) receives input box unlocking instructions sent by other clients (namely, the a client) except the client in the list (abc);
s307: and the client sides (namely the client side b and the client side c) unlock the specified instruction input box according to the received input box unlocking instruction.
Specifically, in this embodiment, the list also has the role of authority verification, namely: after receiving the instruction, the client may determine whether to execute the instruction according to an instruction source, for example: if the instruction sender is judged to be the client in the list, the instruction sent by the instruction sender is executed; and if the instruction sender is judged not to be the client in the list, the instruction sent by the instruction sender is not executed.
In one embodiment, in step S304, the locked instruction input box displays a locked state. The locking state can be displayed by displaying special colors, changing grey and dark, adding a frame and the like in a manner known by a person skilled in the art, and the scheme is simple and easy to implement, has a simple and smooth interface, and is suitable for the condition that the application occasion of the locking function of the instruction input frame is single.
In another embodiment, in step S304, the locked instruction input box displays the reason for the lock. The reason for displaying the locking can be that a remark symbol is displayed, a remark symbol is opened to explain the specific reason, or 'X user is operating' is directly displayed; displaying the locking reason can facilitate the expansion of the locking function of the instruction input box, and the instruction input box can be locked in other states needing locking, such as: after the parameter instruction is sent, the instrument needs to adjust the working state, and at the moment, if the working parameter of the equipment is modified again, the equipment is easy to cause equipment failure, so that the instruction input box can be designed to be locked in the state; when the user operates the device, the user can know whether the instruction input box is locked because other users operate the device or the device is in a parameter adjusting state.
S4: any client side receives the synchronization data sent by other client sides and then synchronizes the data (taking fig. 1 as an example, the client side b and the client side c receive the synchronization data sent by the client side a and then synchronize the data).
Specifically, step S4 includes:
s41: the client (namely, the b client and the c client) receives input instructions sent by other clients (namely, the a client) except the client in the list (abc);
s42: the client sides (namely the client side b and the client side c) synchronize data according to the received input instruction;
s43: after receiving the synchronous data of the clients (namely, the client b and the client c) of the input instruction, replying a synchronous confirmation message to the client (namely, the client a) sending the input instruction;
s44: if the client (i.e. the client a) sending the input instruction does not receive the synchronization confirmation message replied by one or more clients (i.e. one or two of the client b and the client c, in the case shown in fig. 1, the client b does not reply the synchronization confirmation message) except the client a in the list (abc) within a set time, sending the connection information of the client (i.e. the client b) which does not reply the synchronization confirmation message to the device;
s45: after receiving the connection information of the client (namely, the b client) which does not reply the synchronization confirmation message, the equipment sends real-time working parameters and state data to the client (namely, the b client) which does not reply the synchronization confirmation message;
s46: after receiving real-time working parameters and state data of the equipment, the client (namely, the client b under the condition of replying the connection confirmation message), synchronizing the data of the client and replying the connection confirmation message to the equipment;
s47: for the client (i.e. the client b under the condition of not replying the synchronization confirmation message), the device does not receive the connection confirmation message within the set time after the real-time working parameters and the state data are sent, and the client (i.e. the client b) is judged to request to disconnect.
The device parallel client data synchronization method provided by the embodiment may be considered as a hardware or firmware-based working method or process, may be considered as executable instruction content for implementing a logic function, may be considered as data for an instruction execution system to run in any temporary readable storage medium, may also be considered as any working process for the instruction execution system to run, and may also be considered as data stored in a non-temporary readable storage medium. The instruction execution system may be a computer-based system or other system that can read instructions and execute them.
In the device parallel client data synchronization method provided by this embodiment, each step may be implemented by hardware, software, firmware, or a combination thereof, for example, each step may be stored in a memory as independent software or as a part of software operation, and implemented by firmware running a suitable instruction execution system; it may also be implemented partially or wholly by a combination of one or more of the following known technologies: logic circuits, application specific integrated circuits, Programmable Gate Arrays (PGAs), Field Programmable Gate Arrays (FPGAs), and the like.
Referring to fig. 2, the present embodiment provides a device-parallel client data synchronization system, including: the system comprises a device and two or more clients for controlling and reading data of the device (taking fig. 2 as an example, the system comprises the device, and a client and b client for controlling and reading data of the device);
the apparatus comprises: the system comprises a first communication module used for establishing data connection with two or more clients and a first list module used for recording and storing the connection information of all the clients connected with the first communication module; the first list module is further configured to add connection information of the client when connection is established according to the client request, and delete connection information of the client when connection is disconnected according to the client request.
The client comprises: the device comprises a communication module II used for establishing data connection with the equipment and other clients, a list module II used for synchronizing with the content of the list module I, a monitoring module used for collecting user input instructions per se and judging whether the clients except the clients in the list module II need to be synchronized, and a synchronization module used for synchronizing data per se according to the data sent by the clients except the clients in the list module II.
The monitoring module is used for judging whether the instruction input box belongs to the equipment control instruction input box when a user selects the instruction input box, and is used for sending an input box locking instruction to other clients except the client in the list module II when the user selects the equipment control instruction input box; the synchronization module is also used for receiving input frame locking instructions sent by other clients except the client in the list module II, and is used for locking the specified instruction input frame according to the received input frame locking instructions.
The monitoring module is used for judging whether other clients except the client in the second list module need to be synchronized according to whether the acquired user input instruction belongs to the equipment control instruction, and is also used for sending the input instruction which is judged by the monitoring module to be synchronized to other clients except the client in the second list module; the synchronization module is also used for receiving input instructions which are sent by other clients except the client in the list module II and need to be synchronized.
The client further comprises a first confirmation module, the first confirmation module is used for replying a synchronous confirmation message to the client sending the input instruction when the second communication module receives the input instruction, and is used for counting non-repliers, and the non-repliers are the clients which do not reply the input instruction of the synchronous confirmation message within the set time after the second communication module sends the input instruction.
The equipment further comprises a second confirmation module, wherein the first confirmation module is further used for sending the connection information of the non-replied person to the second confirmation module, and the second confirmation module is used for sending real-time working parameters and state data of the equipment to the non-replied person;
the synchronization module is also used for receiving the real-time working parameters and the real-time state data of the equipment, synchronizing the data per se according to the real-time working parameters and the real-time state data of the equipment and replying a connection confirmation message to the confirmation module II; and the second confirmation module is also used for judging that the client requests to disconnect when the connection confirmation message is not received within the set time after the real-time working parameters and the real-time state data of the equipment are sent.
The module mentioned in this embodiment refers to a function dividing unit, and is not limited to a hardware function implementing unit, a software function implementing unit, and a firmware function implementing unit with fixed structures and/or connections; therefore, the above modules may be formed by part of N1 hardware function implementing units, all of N2 hardware function implementing units, part of N3 software function implementing units, all of N4 software function implementing units, part of N5 firmware function implementing units, and all of N6 firmware function implementing units for hardware, software or firmware function implementing units; n1, N2, N3, N4, N5 and N6 are natural numbers, and N1+ N2+ N3+ N4+ N5+ N6 is not less than 1.
Each module mentioned in this embodiment may be implemented by any one or more of software, hardware, and firmware independently, or implemented by any one or more of software, hardware, and firmware in multiple combinations, or implemented by any one or more of software, hardware, and firmware in a split manner; the modules may be stored in a computer-readable storage medium, which may be a transitory computer-readable storage medium or a non-transitory computer-readable storage medium, not only in an executable environment.
For those skilled in the art, it is understood that the device parallel client data synchronization system provided in this embodiment is actually an implementation of the device parallel client data synchronization method provided in this embodiment, and a specific optimized method is provided to implement a product scheme and a product function allocation scheme, so that the explanation for the device parallel client data synchronization method is also applicable to a device parallel client data synchronization system.
Based on that, the embodiment also provides an electronic device, which includes: the device comprises a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor executes the program to realize part or all of the steps of the device parallel client data synchronization method and the recombination of part of the steps in a manner easily imaginable to those skilled in the art.
Moreover, it is not difficult for a person skilled in the art to understand that, part or all of the steps included in implementing the device parallel client data synchronization method provided in the foregoing embodiments may be stored in a non-transitory computer readable storage medium and then executed by a processor, and based on this, the present embodiment also provides a non-transitory computer readable storage medium on which a computer program is stored, where the computer program is executed by a processor, so as to implement part or all of the steps of the device parallel client data synchronization method provided in the foregoing embodiments, and a recombination of part of the steps according to a manner that a person skilled in the art can easily think of.
The non-transitory computer readable storage medium of this embodiment includes, but is not limited to, one or a combination of the following devices: drum memory, tape memory, magnetic disk memory, optical disk memory, and semiconductor memory; the semiconductor memory may in particular be a read-only memory (ROM), or a programmable read-only memory (PROM), or an erasable programmable read-only memory (EPROM), or a one-time programmable read-only memory (OPTROM), or a charged erasable programmable read-only memory (EEPROM), or a Flash memory (Flash memory), or a nitride read-only memory (NROM), etc.
While the preferred embodiments of the present application have been described in detail, it will be understood that the invention may be embodied otherwise than as described herein, and that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (20)

1. A data synchronization method for equipment parallel clients is characterized by comprising the following steps:
s1: acquiring client connection information of the common connection equipment;
s2: establishing connection among the clients;
s3: when any client sends an instruction to the equipment, synchronous data is sent to other clients at the same time;
s4: and after receiving the synchronous data sent by other clients, any client synchronizes the data of the client.
2. The device parallel client data synchronization method of claim 1, wherein step S1 comprises:
s11: the method comprises the steps that the equipment establishes connection with two or more clients;
s12: the device records the client connection information for establishing the connection and forms a list.
3. The device parallel client data synchronization method of claim 2, wherein the step S1 further comprises S13:
when a client side outside the list requests to establish connection, the equipment adds the connection information of the client side in the list;
when a client requests disconnection in the list, the device deletes the connection information of the client in the list.
4. The device parallel client data synchronization method of claim 2, wherein step S2 comprises:
s21: each client acquires a list;
s22: each client establishes a connection with other clients in the list except itself.
5. The device parallel client data synchronization method of claim 3, wherein the step S2 comprises:
s21: each client acquires a list;
s22: each client establishes connection with other clients except the client in the list;
s23: when the list is changed, the equipment sends the changed list to the client in the changed list;
s24: and each client receives and establishes connection with other clients except the client in the list according to the changed list.
6. The device parallel client data synchronization method of claim 4, wherein the step S3 comprises:
s31: the client receives an input instruction of a user;
s32: the client judges whether the input instruction belongs to the equipment control instruction, if not, the operation is finished, and if so, the operation continues to step S33;
s33: the client sends the input instruction to the equipment, and simultaneously sends the input instruction to other clients except the client in the list.
7. The device parallel client data synchronization method of claim 4, wherein the step S3 comprises:
s301: when the user selects a certain instruction input box for inputting an instruction, the client judges whether the instruction input box belongs to the equipment control instruction input box, if not, the operation is finished, and if so, the operation continues to the step S302;
s302: for the instruction input box selected by the user, the client sends an input box locking instruction to other clients except the client in the list;
s303: the client receives input box locking instructions sent by other clients except the client in the list;
s304: and the client locks the specified instruction input box according to the received input box locking instruction.
8. The device-parallel client data synchronization method of claim 7, wherein in step S304, the locked command input box displays a locked state.
9. The device parallel client data synchronization method of claim 7, wherein in step S304, the locked command input box displays a locking reason.
10. The device parallel client data synchronization method of claim 7, wherein the step S3 further comprises:
s305: when the instruction input box selected by the user in step S302 finishes the selection state, the client sends an input box unlocking instruction to other clients in the list except for the client itself;
s306: the client receives input box unlocking instructions sent by other clients except the client in the list;
s307: and the client unlocks the specified instruction input box according to the received input box unlocking instruction.
11. The device parallel client data synchronization method of claim 6, wherein step S4 comprises:
s41: the client receives input instructions sent by other clients except the client in the list;
s42: and the client synchronizes data according to the received input instruction.
12. The device parallel client data synchronization method of claim 11, wherein the step S4 further comprises:
s43: after receiving the client synchronous data of the input instruction, replying a synchronous confirmation message to the client sending the input instruction;
s44: the client sending the input instruction does not receive the synchronization confirmation message replied by one or more clients except the client in the list within the set time, and then sends the connection information of the client not replying the synchronization confirmation message to the equipment;
s45: after receiving the connection information of the client which does not reply the synchronization confirmation message, the equipment sends real-time working parameters and state data to the client which does not reply the synchronization confirmation message;
s46: after receiving real-time working parameters and state data of the equipment, the client synchronizes the data of the client and replies a connection confirmation message to the equipment;
s47: and for the client side which does not reply the synchronization confirmation message, the equipment does not receive the connection confirmation message within the set time after the real-time working parameters and the state data are sent, and the client side is judged to request to disconnect.
13. A device parallel client data synchronization system, comprising: the system comprises a device and two or more clients for controlling the device and reading data;
the apparatus comprises: the system comprises a first communication module used for establishing data connection with two or more clients and a first list module used for recording and storing the connection information of all the clients connected with the first communication module;
the client comprises: the device comprises a communication module II used for establishing data connection with the equipment and other clients, a list module II used for synchronizing with the content of the list module I, a monitoring module used for collecting user input instructions per se and judging whether the clients except the clients in the list module II need to be synchronized, and a synchronization module used for synchronizing data per se according to the data sent by the clients except the clients in the list module II.
14. The system of claim 13, wherein the first list module is further configured to add connection information of the client when the client requests to establish a connection, and delete connection information of the client when the client requests to disconnect.
15. The system according to claim 13, wherein the monitoring module is configured to determine whether the command input box belongs to a device control command input box when the user selects the command input box, and is configured to send an input box locking command to the other clients except the client in the second list module when the user selects the device control command input box; the synchronization module is also used for receiving input frame locking instructions sent by other clients except the client in the list module II, and is used for locking the specified instruction input frame according to the received input frame locking instructions.
16. The system according to claim 13, wherein the monitoring module is configured to determine whether synchronization of the clients in the second list module other than the self-user input instruction is required according to whether the collected self-user input instruction belongs to a device control instruction, and further configured to send the input instruction determined by the monitoring module to be synchronized to the clients in the second list module other than the self-user input instruction; the synchronization module is also used for receiving input instructions which are sent by other clients except the client in the list module II and need to be synchronized.
17. The system of claim 16, wherein the client further comprises a first confirmation module, the first confirmation module is configured to reply a synchronization confirmation message to the client that sent the input command when the second communication module receives the input command, and is configured to count non-repliers, and the non-repliers are the clients that did not reply to the input command for receiving the synchronization confirmation message within a set time after the second communication module sends the input command.
18. The system according to claim 17, wherein the device further comprises a second confirmation module, the first confirmation module is further configured to send the connection information of the non-replying person to the second confirmation module, and the second confirmation module is configured to send real-time operating parameters and status data of the device to the non-replying person;
the synchronization module is also used for receiving the real-time working parameters and the real-time state data of the equipment, synchronizing the data per se according to the real-time working parameters and the real-time state data of the equipment and replying a connection confirmation message to the confirmation module II; and the second confirmation module is also used for judging that the client requests to disconnect when the connection confirmation message is not received within the set time after the real-time working parameters and the real-time state data of the equipment are sent.
19. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, the processor executing the program to implement a device parallel client data synchronization method according to any of claims 1-12.
20. A non-transitory computer readable storage medium having stored thereon a computer program, the program being executable by a processor for implementing an apparatus parallel client data synchronization method according to any one of claims 1 to 12.
CN202111607044.7A 2021-12-24 2021-12-24 Data synchronization method and system for parallel client of equipment Pending CN114328724A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111607044.7A CN114328724A (en) 2021-12-24 2021-12-24 Data synchronization method and system for parallel client of equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111607044.7A CN114328724A (en) 2021-12-24 2021-12-24 Data synchronization method and system for parallel client of equipment

Publications (1)

Publication Number Publication Date
CN114328724A true CN114328724A (en) 2022-04-12

Family

ID=81013673

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111607044.7A Pending CN114328724A (en) 2021-12-24 2021-12-24 Data synchronization method and system for parallel client of equipment

Country Status (1)

Country Link
CN (1) CN114328724A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115022817A (en) * 2022-05-30 2022-09-06 无锡富华物联科技有限公司 Offline ear tag data transmission method, system and terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115022817A (en) * 2022-05-30 2022-09-06 无锡富华物联科技有限公司 Offline ear tag data transmission method, system and terminal

Similar Documents

Publication Publication Date Title
CN107870772B (en) Cross-environment application deployment method, platform, system and readable storage medium
CN108183918B (en) AAA high-concurrency authentication method and system
CN109547524B (en) User behavior storage method, device, equipment and storage medium based on Internet of things
CN110062041B (en) Method and device for changing IOT (input/output) equipment based on block chain
CN110191451B (en) State synchronization method, mobile terminal, system and device of Bluetooth equipment
CN113709250B (en) Cross-domain user data synchronization method based on subscription transmission mode
CN110677383A (en) Firewall opening method and device, storage medium and computer equipment
WO2016173194A1 (en) Updating method, device and system for information about resources
CN114328724A (en) Data synchronization method and system for parallel client of equipment
CN103731465A (en) Distributed system and transaction treatment method thereof
CN110417876A (en) Node server and main control device in session method, distributed system
CN102437921A (en) Memory method and network device of configuration information
CN112118600A (en) Flow traction system under 5G independent networking SA architecture
CN113242313B (en) Data synchronization method, system, device, server and storage medium
CN111200651A (en) Method, system, device and medium for timed calling of microservice
CN115776501A (en) Block chain system architecture, management method, electronic equipment and readable storage medium
JPH06301618A (en) Remote procedure accessing method
CN111090648B (en) Relational database data synchronization conflict resolution method
WO2020259326A1 (en) Signal transmission method and apparatus
CN110071949B (en) System, method and device for managing computing application across geographic areas
JP2005507522A (en) Method and system for ensuring sequential consistency in distributed computing
KR101578626B1 (en) Method for processing bundle message between controller and network equipment
CN108965088B (en) Method and device for establishing static tunnel
CN111327563B (en) Internet of things equipment login management method and device
CN113938381A (en) Universal simple network management and network element configuration synchronization method and system

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