CN117319523A - Data sharing transmission control method and device and electronic equipment - Google Patents

Data sharing transmission control method and device and electronic equipment Download PDF

Info

Publication number
CN117319523A
CN117319523A CN202311297897.4A CN202311297897A CN117319523A CN 117319523 A CN117319523 A CN 117319523A CN 202311297897 A CN202311297897 A CN 202311297897A CN 117319523 A CN117319523 A CN 117319523A
Authority
CN
China
Prior art keywords
sub
file system
subprocess
monitoring
cluster file
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
CN202311297897.4A
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.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data 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 Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202311297897.4A priority Critical patent/CN117319523A/en
Publication of CN117319523A publication Critical patent/CN117319523A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/16Implementing security features at a particular protocol layer
    • H04L63/168Implementing security features at a particular protocol layer above the transport layer

Abstract

The embodiment of the specification provides a data sharing transmission control method, a data sharing transmission control device and electronic equipment, which can timely recover authority verification information of abnormal processes and ensure normal and efficient access of other businesses to a cluster file system. The method comprises the following steps: receiving a shared connection request from the client, and creating a sub-process for the client; after the sub-process and the cluster file system are successfully connected, determining the identity information of the sub-process, and associating the identity information with the authority verification information corresponding to the client; monitoring the running state of the subprocess to determine whether the subprocess is abnormal or not; and under the condition that the subprocess is abnormal, sending a transmission ending request to the cluster file system based on the identity information, so that the cluster file system recovers the authority verification information associated with the identity information in real time.

Description

Data sharing transmission control method and device and electronic equipment
Technical Field
The present disclosure relates to the field of digital file transmission technologies, and in particular, to a method and an apparatus for controlling data sharing transmission, and an electronic device.
Background
The shared transport protocol (Server Message Block, SMB) is a protocol for data file transfer between different network nodes, and may be applied to communication transfer between a clustered file system and an access client. And authority verification information (CAP) is used in the cluster file system to ensure the operation capability authority of the client process corresponding to the SBM service on the file information in the cluster file, such as file reading and writing, file cache reading and writing and the like. Different client processes, or different times of the same client process, may be different to hold CAP capability information for the same file. A mechanism of periodic heartbeat update is generally adopted between the cluster file system and the SMB client process to ensure timely update of the CAP.
Under normal conditions, when the client of the SMB service is actively disconnected, the corresponding SMB service process also normally closes session connection between the cluster file systems and actively releases the file CAP information. If an SMB client process exits abnormally, the corresponding file or directory in the cluster file system may still be opened or occupied, and the corresponding CAP information cannot be released in real time. Such a situation may cause the same client or other clients to enter a blocking state when accessing the file or directory again, which may affect normal file sharing transfer of the clustered file system.
Disclosure of Invention
In view of this, the embodiments of the present disclosure provide a data sharing transmission control method, apparatus, and electronic device, which can timely recover authority verification information of an abnormal process, and ensure normal and efficient access of other services to a clustered file system.
In a first aspect, an embodiment of the present disclosure provides a data sharing transmission control method, where the method is applied to an SMB server in a data sharing transmission system, and the data sharing transmission system further includes a client and a cluster file system. The method comprises the following steps:
receiving a shared connection request from the client, and creating a subprocess aiming at the client, wherein the subprocess is used for carrying out mounting connection with the cluster file system so as to provide services for the client;
after the sub-process and the cluster file system are successfully connected in a mounting way, the identity information of the sub-process is determined, the identity information is associated with the authority verification information corresponding to the client, and the identity information and the authority verification information are distributed and determined by the cluster file system;
monitoring the running state of the subprocess to determine whether the subprocess is abnormal or not;
And under the condition that the subprocess is abnormal, sending a transmission ending request to the cluster file system based on the identity information, so that the cluster file system recovers the authority verification information associated with the identity information in real time.
The embodiment of the specification also provides a data sharing transmission control device which is applied to the SMB server side in the data sharing transmission system, and the data sharing transmission system also comprises a client side and a cluster file system. The device comprises:
the sub-process creation module is used for receiving a shared connection request from the client, creating a sub-process for the client, wherein the sub-process is used for carrying out mounting connection with the cluster file system so as to provide service for the client;
the identification information association module is used for determining the identification information of the sub-process after the sub-process and the cluster file system are successfully connected, associating the identification information with the authority verification information corresponding to the client, wherein the identification information and the authority verification information are distributed and determined by the cluster file system;
the sub-process monitoring module is used for monitoring the running state of the sub-process to determine whether the sub-process is abnormal or not; and
And the sub-process termination control module is used for sending a transmission ending request to the cluster file system based on the identity information under the condition that the sub-process is abnormal, so that the cluster file system recovers the authority verification information associated with the identity information in real time.
The embodiments of the present specification also provide a data sharing transmission control electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the data sharing transmission control method according to the first aspect when executing the program.
From the above, it can be seen that the data sharing transmission control method, device and electronic equipment provided in the embodiments of the present disclosure have the following beneficial technical effects:
and monitoring the sub-process of the data sharing transmission at the SMB server side, and storing ClientID information of the sub-process of the SMB service and associating the ClientID information with corresponding authority verification information CAP when session connection is established with the cluster file system. In the service execution process, the SMB server monitors the state of the sub-process, and when the sub-process exits abnormally, the SMB server sends a transmission ending request to the cluster file system according to the recorded ClientID, so that the cluster file system is triggered to timely recover CAP information. In such a way, on one hand, the sub-process is prevented from being blocked for a long time so as to block the access of the client, and on the other hand, the sub-process is ensured to release the held file or directory CAP information in real time when the sub-process is abnormally exited, so that the situation that the same client is prevented from entering a blocking state when the same client is repeatedly accessed to the same file directory or other clients mount the same share and access the same file directory, and the method has important significance for avoiding large-scale blocking when a large number of Windows clients in enterprise scenes access the same SMB share.
Drawings
The features and advantages of the present invention will be more clearly understood by reference to the accompanying drawings, which are illustrative and should not be construed as limiting the invention in any way, in which:
FIG. 1 is a schematic diagram of a method for controlling data sharing transmission according to one or more alternative embodiments of the present disclosure;
FIG. 2 is a schematic diagram of a method for monitoring an operation state of a sub-process in a data sharing transmission control method according to one or more alternative embodiments of the present disclosure;
FIG. 3 is a schematic diagram of another method for monitoring the operation status of the sub-process in a data sharing transmission control method according to one or more alternative embodiments of the present disclosure;
FIG. 4 is a schematic diagram of a data sharing transmission control device according to one or more alternative embodiments of the present disclosure;
fig. 5 is a schematic diagram of a data sharing transmission control electronic device according to one or more alternative embodiments of the present disclosure.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
The shared transport protocol (Server Message Block, SMB) is a protocol for data file transfer between different network nodes, and may be applied to communication transfer between a clustered file system (Cluster File System, CFS) and an access client. And authority verification information (CAP) is used in the cluster file system to ensure the operation capability authority of the client process corresponding to the SBM service on the file information in the cluster file, such as file reading and writing, file cache reading and writing and the like. Different client processes, or different times of the same client process, may be different to hold CAP capability information for the same file. A mechanism of periodic heartbeat update is generally adopted between the cluster file system and the SMB client process to ensure timely update of the CAP.
Under normal conditions, when the client of the SMB service is actively disconnected, the corresponding SMB service process also normally closes session connection between the cluster file systems and actively releases the file CAP information. If an SMB client process exits abnormally, the corresponding file or directory in the cluster file system may still be opened or occupied, and the corresponding CAP information cannot be released in real time. Such a situation may cause the same client or other clients to enter a blocking state when accessing the file or directory again, which may affect normal file sharing transfer of the clustered file system.
In view of the above problems, an object of an embodiment of the present disclosure is to provide a data sharing transmission control method, which monitors and responds to an abnormal state of a client service process in an SMB service, and controls a cluster file system to timely recover authority verification information corresponding to a file or a directory occupied by the abnormal process, so that the file or the directory in the cluster file system can respond in time when being accessed later, and fault tolerance of the cluster file system in applying the SMB service is greatly improved.
Based on the above objects, the embodiments of the present specification provide a data sharing transmission control method.
As shown in fig. 1, one or more alternative embodiments of the present disclosure provide a data sharing transmission control method, which is applied to an SMB server in a data sharing transmission system.
And the SMB server side, the client side and the cluster file system are shared by the data transmission system. The SMB server is used for responding to the data sharing transmission request of the client and connecting with the cluster file so as to provide data transmission service for the client, and the client can access and operate files or catalogs in the cluster file system through the SMB server.
In the data sharing transmission system, a plurality of clients may be included, the clients may repeatedly access the same or different files in the cluster file system, and the clients may access different files at the same time or at different times.
The method comprises the following steps:
s1: and receiving a shared connection request from the client, and creating a subprocess aiming at the client, wherein the subprocess is used for carrying out mounting connection with the cluster file system so as to provide services for the client.
The SMB server side is provided with a functional interface, and the client side sends a shared connection request to the SMB server side by utilizing the functional interface. After receiving the shared connection request, the SMB server may create a new sub-process for the data sharing transmission service of the client by using the main process to provide services for the new sub-process.
After the subprocess is created, file communication (UNIX SOCKET) connection is established between the main process and the subprocess of the SMB server side, so that interaction is conveniently carried out between the main process and the subprocess by utilizing the UNIX SOCKET connection.
For the shared connection request of the client, the sub-process may execute a mount-on-connection to the cluster file system, so that the client may access file data in the cluster file system through the sub-process.
S2: after the sub-process and the cluster file system are successfully connected in a mounting way, the identity information of the sub-process is determined, the identity information is associated with the authority verification information corresponding to the client, and the identity information and the authority verification information are distributed and determined by the cluster file system.
After the sub-process is successfully connected with the cluster file system in a mounting manner, the cluster file system distributes authority verification information CAP for the sub-process, so that the sub-process has the authority of the operation capability on the file information in the cluster file system. In an alternative embodiment of the present specification, the cluster file system further assigns corresponding identification information (ClientID) to the sub-process, where the identification information ClientID uniquely corresponds to the sub-process.
The SMB server side can acquire the authority verification information CAP and the identification information ClientID from the subprocess and correlate and correspond the CAP and the identification information ClientID.
S3: and monitoring the running state of the subprocess to determine whether the subprocess is abnormal or not.
The SMB server side can monitor the running state of the subprocess to determine whether the subprocess is abnormal or not, so that timely control response can be performed when the subprocess is determined to be abnormal. For the subprocess corresponding to the client data sharing transmission service, abnormal conditions which may cause the same client or other clients to access the same file or directory again to cause blocking include overtime abnormality and operation abnormality. The timeout exception refers to that the sub-process is timeout without response, and the operation exception refers to that the memory segment is crashed and exits in error in the operation process of the sub-process.
For timeout exceptions, the SMB server may monitor according to the loopback message of the sub-process. As shown in fig. 2, in a data sharing transmission control method provided in one or more alternative embodiments of the present disclosure, monitoring an operation state of the sub-process to determine whether an abnormality occurs in the sub-process includes:
s201: and the SMB server receives the loopback message from the subprocess and determines the latest response time corresponding to the loopback message.
In the SMB server, the sub-process may be controlled to send the loopback (PING) message to the SMB server, where the SMB server determines a latest response time of the sub-process according to the PING message.
In some alternative embodiments, a monitoring queue may be set by the main process of the SMB server, and PING messages from a plurality of the sub-processes may be received by using the monitoring queue. And simultaneously, the main process creates an independently arranged monitoring thread, and the monitoring thread is utilized to periodically carry out traversal check on the monitoring queue according to a preset time interval.
A plurality of queue data elements in the monitor queue are used to record the loopback (PING) messages from a plurality of the sub-processes. The PING message comprises the PID of the subprocess, the corresponding identity information (ClientID) of the subprocess, the message loopback time and the corresponding remote IP address, and the monitoring thread can determine the latest response time of the corresponding subprocess according to the message loopback time.
S202: comparing the latest response time with the current time to determine whether the time difference between the latest response time and the current time exceeds a preset time threshold.
The preset time threshold can be flexibly set and adjusted according to actual application requirements, for example, can be set to be 1min or 30s.
S203: and responding to the time difference between the two time differences exceeding the preset time threshold value, and determining that the operation of the sub-process is abnormal due to timeout.
Upon determining that the sub-process has a timeout exception, the host process of the SMB server may send a process termination command (SIGKILL) to the sub-process to force the end of the sub-process.
In the main process, the monitoring thread is independently set. Since the collection of queue information is a relatively time-consuming task, the queue information cannot be directly put into a main thread, and an independent thread can be independently started to monitor and process a plurality of corresponding sub-processes in the monitoring queue. And the monitoring thread can also reject the loopback message corresponding to the child thread with the overtime abnormality from the monitoring queue after determining that the overtime abnormality occurs in the operation of the child process, so that the data volume in the monitoring queue is reduced.
For abnormal operation, the SMB server side can set monitoring logic to detect and capture key information of abnormal exit of the subprocess. As shown in fig. 3, in a data sharing transmission control method provided in one or more alternative embodiments of the present disclosure, monitoring an operation state of the sub-process to determine whether an abnormality occurs in the sub-process includes:
s301: the SMB server monitors signals of the subprocesses to detect and determine whether the subprocesses generate key index signals, and the key index signals are used for representing process operation faults.
The key index signal may include, for example, SIGCHLD signal, sigevg signal, SIGABRT signal, and the like. These key indicator signals respectively represent that different abnormal running conditions cause abnormal exit of the sub-process.
S302: and in response to determining that the sub-process generates a key index signal, determining that the sub-process is abnormal in operation.
After determining that the sub-process is abnormal, the files or directories accessed in the cluster system files before the sub-process may still be opened or occupied, and the corresponding CAP information cannot be released in real time. Therefore, the SMB server needs to respond in time after determining that the subprocess is abnormal.
S4: and under the condition that the subprocess is abnormal, sending a transmission ending request to the cluster file system based on the identity information, so that the cluster file system recovers the authority verification information associated with the identity information in real time.
When the sub-thread is determined to be abnormal, the main process in the SMB server side can send a transmission ending request to the cluster file system. In some optional real-time modes, the transmission end request is determined according to the identity information ClientID, the main process may encapsulate the ClientID corresponding to the sub-process with the exception in the transmission end request, and the transmission end request may further include a transmission end instruction, where the transmission end instruction is used to trigger the permission recovery operation of the cluster file system.
After the cluster file system receives the transmission ending request, the corresponding identification information can be extracted and determined from the transmission ending request, the corresponding authority verification information CAP is determined based on the identification information, and the cluster file system recovers the authority verification information CAP in response to the transmission ending instruction. Therefore, when the same client side is reconnected to access the same file directory or other client sides mount the same share and access the same file directory, the blocking state is not entered again,
In the data sharing transmission control method, the sub-process of the data sharing transmission is monitored at the SMB server side, and when session connection is established with the cluster file system, clientID information of the sub-process of the SMB service is stored and associated with corresponding authority verification information CAP. In the service execution process, the SMB server monitors the state of the sub-process, and when the sub-process exits abnormally, the SMB server sends a transmission ending request to the cluster file system according to the recorded ClientID, so that the cluster file system is triggered to timely recover CAP information. In such a way, on one hand, the sub-process is prevented from being blocked for a long time so as to block the access of the client, and on the other hand, the sub-process is ensured to release the held file or directory CAP information in real time when the sub-process is abnormally exited, so that the situation that the same client is prevented from entering a blocking state when the same client is repeatedly accessed to the same file directory or other clients mount the same share and access the same file directory, and the method has important significance for avoiding large-scale blocking when a large number of Windows clients in enterprise scenes access the same SMB share.
In one or more alternative embodiments of the present disclosure, the detailed processing steps of the data sharing transmission control method are as follows.
The method comprises the steps of initializing a main process in an SMB server, and initializing a functional interface to receive a shared connection request from a client by the SMB server. The functional interface may be, for example, an SMB445 interface, an SMB139 interface, or the like. And initializing a monitoring queue, a monitoring thread, establishing connection with the cluster file system, monitoring key index signals and the like.
Step one: the ports 445, 139 connection of the SMB server are monitored and a new sub-process is created for the client after the client initiates the SMB connection.
Step two: initializing a monitoring queue, wherein each node element in the monitoring queue is used for recording PING information of each SMB business subprocess, including PID, clientID, PING time of the SMB subprocess and a remote IP address.
Step three: the abnormal process queue is initialized, and the child process queue receives PING information of the SMB child process and performs some cleaning actions on the child process, so that in order to avoid excessively long occupation time of the exclusive lock with the monitoring thread, the abnormal process queue is specially initialized, and the SMB main process and the monitoring thread interact through the abnormal process queue.
Step four: the main thread starts a periodic task, periodically acquires the PING message time of each SMB sub-process from the sub-process queue, judges whether the last response time is overtime for 1min, and if so, further puts the PING message time into the abnormal process queue.
Step five: the monitoring thread is initialized, and because the collection of stack information is a relatively time-consuming task, the stack information cannot be directly put into the main thread, and an independent thread is independently started to complete task processing of an abnormal process queue. The monitoring thread periodically traverses the elements of the exception process queue, if so, collects stack information, sends a SIGKILL signal to the child process, and then removes it from the exception queue.
Step six: and establishing a file communication UNXI SOCKET connection with the cluster file system, and sending a transmission ending request to the cluster file system.
And secondly, initializing and interacting the SMB subprocesses, wherein the method mainly comprises the steps of connecting with a UNIX SOCKET of the main process, mounting a cluster file system, and periodically sending PING information to the main process.
Step one: when the SMB main process receives the SMB 445 or 139 connection, a new sub-process is automatically created.
Step two: the sub-process acquires the PID of the main process and establishes a UNIX SOCKET connection with the PID.
Step three: the subprocess mount is connected with the cluster file system and is used for docking a main file operation interface; and after successful mounting, a ClientID identifier allocated to the cluster file system can be correctly acquired.
Step four: after the cluster file system is successfully mounted, a periodic task is started, and PING information is periodically sent to the SMB main process through UNIX SOCKET connection, wherein the data content of the PING information comprises the ClientID obtained in the step three.
Finally, the SMB sub-process exits abnormally and transmits the ending request.
Step one: the SMB main process regularly traverses the sub-process queue to acquire the latest PING time, compares the latest PING time with the current time, considers that the sub-process is abnormal if the time is overtime for 1min, constructs an abnormal data element containing the sub-process PID and ClientID information, adds the abnormal data element into the abnormal process queue, marks the abnormal data element as non-monitoring in the sub-process queue, and avoids repeated notification.
Step two: the monitoring thread periodically traverses the abnormal process queue, when traversing to the abnormal data element, firstly collects stack information and records, then sends a SIGKILL signal to the subprocess, and when the processing is completed, the abnormal data element is removed from the abnormal process queue.
Step three: the sub-process responds to the SIGKILL signal and exits, at which point the main process will receive the exit message for the sub-process in the key indicator signal processing logic.
Step four: the main process firstly encapsulates a transmission ending request data packet containing ClientID parameters and sends the transmission ending request data packet to the cluster file system; and then removed from the normal sub-process queue.
Step five: after receiving the session ending request, the cluster file system forcibly retrieves the file or directory CAP occupied by the current abnormal sub-process;
step six: when the Windows client corresponding to the SMB abnormal subprocess reinitiates connection, the files or subdirectories accessed under the shared directory are not blocked, and can be directly accessed. When the SMB sub-process exits abnormally due to other memory access errors, the SMB sub-process can be directly captured by the main process, and the steps are repeated.
It should be noted that the methods of one or more embodiments of the present description may be performed by a single device, such as a computer or server. The method of the embodiment can also be applied to a distributed scene, and is completed by mutually matching a plurality of devices. In the case of such a distributed scenario, one of the devices may perform only one or more steps of the methods of one or more embodiments of the present description, the devices interacting with each other to accomplish the methods.
It should be noted that the foregoing describes specific embodiments of the present invention. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Based on the same inventive concept, corresponding to the method of any embodiment, the embodiment of the present disclosure further provides a data sharing transmission control device, where the device is applied to an SMB server in a data sharing transmission system, and the data sharing transmission system further includes a client and a cluster file system.
Referring to fig. 4, the data sharing transmission control apparatus includes:
the sub-process creation module is used for receiving a shared connection request from the client, creating a sub-process for the client, wherein the sub-process is used for carrying out mounting connection with the cluster file system so as to provide service for the client;
The identification information association module is used for determining the identification information of the sub-process after the sub-process and the cluster file system are successfully connected, associating the identification information with the authority verification information corresponding to the client, wherein the identification information and the authority verification information are distributed and determined by the cluster file system;
the sub-process monitoring module is used for monitoring the running state of the sub-process to determine whether the sub-process is abnormal or not; and
and the sub-process termination control module is used for sending a transmission ending request to the cluster file system based on the identity information under the condition that the sub-process is abnormal, so that the cluster file system recovers the authority verification information associated with the identity information in real time.
In one or more optional embodiments of the present disclosure, in a data sharing transmission control device, the sub-process monitoring module is further configured to receive a loopback message from the sub-process, and determine a latest response time corresponding to the loopback message; comparing the latest response time with the current time to determine whether the time difference between the latest response time and the current time exceeds a preset time threshold; and under the condition that the time difference between the two time differences exceeds the preset time threshold, determining that the operation of the sub-process is abnormal due to overtime.
In one or more optional embodiments of the present disclosure, the sub-process monitoring module is further configured to set a monitoring queue in a main process of the SMB server, and receive the echo message from each sub-process using the monitoring queue; and performing periodic traversal check on the monitoring queue according to a preset time interval to determine the latest response time corresponding to each sub-process.
In one or more optional embodiments of the present disclosure, the loopback message includes a PID of the sub-process, the id information corresponding to the sub-process, a message loopback time, and a corresponding remote IP address, and the latest response time is determined according to the message loopback time.
In one or more optional embodiments of the present disclosure, in a data sharing transmission control device, after determining that a timeout exception occurs in the operation of the sub-process, the sub-process monitoring module is further configured to control the SMB server to send a process termination command to the sub-process, so as to forcibly end the sub-process.
In the data sharing transmission control device provided in one or more optional embodiments of the present disclosure, the sub-process monitoring module is further configured to perform signal monitoring for the sub-process, so as to detect and determine whether the sub-process generates a key indicator signal, where the key indicator signal is used to characterize a process operation failure; and under the condition that the subprocess generates a key index signal, determining that the subprocess is abnormal in operation.
In the data sharing transmission control device provided in one or more optional embodiments of the present disclosure, the sub-process termination control module is further configured to generate the transmission end request based on the identity information, where the transmission end request includes a transmission end instruction and the identity information; and sending the transmission ending request to the cluster file system so that the cluster file system extracts the identification information from the transmission ending request and determines the permission verification information corresponding to the identification information.
In one or more optional embodiments of the present disclosure, a data sharing transmission control device is provided, where the main process includes a main thread and a monitoring thread that is independently set. The subprocess monitoring module is further used for receiving the loopback messages from the subprocesses, wherein the loopback messages comprise the PID of the subprocesses, the identity information corresponding to the subprocesses, the message loopback time and the corresponding remote IP addresses; performing periodic traversal checking on the monitoring queue according to a preset time interval by using the monitoring thread, and determining the message loopback time of the loopback message corresponding to the plurality of subprocesses in the monitoring queue; determining the latest response time corresponding to each subprocess in the monitoring queue according to the message loopback time corresponding to the subprocesses; comparing the latest response time with the current time to determine whether the time difference between the latest response time and the current time exceeds a preset time threshold; and under the condition that the time difference between the two time differences exceeds the preset time threshold, determining that the operation of the sub-process is abnormal due to overtime. The sub-process monitoring module is further used for removing the loopback message corresponding to the sub-thread with the abnormal overtime from the monitoring queue after determining that the overtime abnormality occurs in the operation of the sub-process; and sending a process termination command to the sub-process to forcibly end the sub-process.
For convenience of description, the above devices are described as being functionally divided into various modules, respectively. Of course, the functions of each module may be implemented in one or more pieces of software and/or hardware when implementing one or more embodiments of the present description.
The device of the foregoing embodiment is configured to implement the corresponding method in the foregoing embodiment, and has the beneficial effects of the corresponding method embodiment, which is not described herein.
Fig. 5 shows a more specific hardware architecture of an electronic device according to this embodiment, where the device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 implement communication connections therebetween within the device via a bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit ), microprocessor, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc. for executing relevant programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory ), static storage device, dynamic storage device, or the like. Memory 1020 may store an operating system and other application programs, and when the embodiments of the present specification are implemented in software or firmware, the associated program code is stored in memory 1020 and executed by processor 1010.
The input/output interface 1030 is used to connect with an input/output module for inputting and outputting information. The input/output module may be configured as a component in a device (not shown) or may be external to the device to provide corresponding functionality. Wherein the input devices may include a keyboard, mouse, touch screen, microphone, various types of sensors, etc., and the output devices may include a display, speaker, vibrator, indicator lights, etc.
Communication interface 1040 is used to connect communication modules (not shown) to enable communication interactions of the present device with other devices. The communication module may implement communication through a wired manner (such as USB, network cable, etc.), or may implement communication through a wireless manner (such as mobile network, WIFI, bluetooth, etc.).
Bus 1050 includes a path for transferring information between components of the device (e.g., processor 1010, memory 1020, input/output interface 1030, and communication interface 1040).
It should be noted that although the above-described device only shows processor 1010, memory 1020, input/output interface 1030, communication interface 1040, and bus 1050, in an implementation, the device may include other components necessary to achieve proper operation. Furthermore, it will be understood by those skilled in the art that the above-described apparatus may include only the components necessary to implement the embodiments of the present description, and not all the components shown in the drawings.
The electronic device of the foregoing embodiment is configured to implement the corresponding method in the foregoing embodiment, and has the beneficial effects of the corresponding method embodiment, which is not described herein.
Based on the same inventive concept, the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the data sharing transmission control method according to any of the above embodiments, corresponding to the method of any of the above embodiments.
The computer readable media of the present embodiments, including both permanent and non-permanent, removable and non-removable media, may be used to implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device.
The storage medium of the foregoing embodiments stores computer instructions for causing the computer to execute the data sharing transmission control method according to any one of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which are not described herein.
It will be appreciated by those skilled in the art that implementing all or part of the above-described embodiment method may be implemented by a computer program to instruct related hardware, where the program may be stored in a computer readable storage medium, and the program may include the above-described embodiment method when executed. Wherein the storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a random access Memory (RandomAccessMemory, RAM), a Flash Memory (Flash Memory), a Hard Disk (HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present application.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
It should also be noted that 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 one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
Those of ordinary skill in the art will appreciate that: the discussion of any of the embodiments above is merely exemplary and is not intended to suggest that the scope of the disclosure, including the claims, is limited to these examples; combinations of features of the above embodiments or in different embodiments are also possible within the spirit of the present disclosure, steps may be implemented in any order, and there are many other variations of the different aspects of one or more embodiments described above which are not provided in detail for the sake of brevity.
While the present disclosure has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of those embodiments will be apparent to those skilled in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
The present disclosure is intended to embrace all such alternatives, modifications and variances which fall within the broad scope of the appended claims. Any omissions, modifications, equivalents, improvements, and the like, which are within the spirit and principles of the one or more embodiments of the disclosure, are therefore intended to be included within the scope of the disclosure.

Claims (10)

1. The data sharing transmission control method is characterized by being applied to an SMB server side in a data sharing transmission system, wherein the data sharing transmission system also comprises a client side and a cluster file system; the method comprises the following steps:
receiving a shared connection request from the client, and creating a subprocess aiming at the client, wherein the subprocess is used for carrying out mounting connection with the cluster file system so as to provide services for the client;
after the sub-process and the cluster file system are successfully connected in a mounting way, the identity information of the sub-process is determined, the identity information is associated with the authority verification information corresponding to the client, and the identity information and the authority verification information are distributed and determined by the cluster file system;
Monitoring the running state of the subprocess to determine whether the subprocess is abnormal or not;
and under the condition that the subprocess is abnormal, sending a transmission ending request to the cluster file system based on the identity information, so that the cluster file system recovers the authority verification information associated with the identity information in real time.
2. The method of claim 1, wherein monitoring the running state of the sub-process to determine if an exception occurred to the sub-process comprises:
the SMB server receives the loopback message from the subprocess and determines the latest response time corresponding to the loopback message;
comparing the latest response time with the current time to determine whether the time difference between the latest response time and the current time exceeds a preset time threshold;
and responding to the time difference between the two time differences exceeding the preset time threshold value, and determining that the operation of the sub-process is abnormal due to timeout.
3. The method of claim 2, wherein the SMB server receives a loopback message from the child process, determining a most recent response time corresponding to the loopback message, comprising:
a main process of the SMB server side sets a monitoring queue, and the monitoring queue is utilized to receive the loopback messages from the sub-processes;
And performing periodic traversal check on the monitoring queue according to a preset time interval to determine the latest response time corresponding to each sub-process.
4. The method of claim 2, wherein the echo message includes a PID of the sub-process, the identity information corresponding to the sub-process, a message echo time, and a corresponding remote IP address, the most recent response time being determined based on the message echo time.
5. The method of claim 2, further comprising, after determining that the sub-process operation has a timeout exception:
and the SMB server side sends a process termination command to the subprocess so as to forcedly finish the subprocess.
6. The method of claim 1, wherein monitoring the running state of the sub-process to determine if an exception occurred to the sub-process comprises:
the SMB server monitors signals of the subprocesses to detect and determine whether the subprocesses generate key index signals, wherein the key index signals are used for representing process operation faults;
and in response to determining that the sub-process generates a key index signal, determining that the sub-process is abnormal in operation.
7. The method according to claim 1, wherein in case of an exception of the sub-process, sending an end of transmission request to the clustered file system based on the identification information comprises:
generating the transmission ending request based on the identity information, wherein the transmission ending request comprises a transmission ending instruction and the identity information;
and sending the transmission ending request to the cluster file system so that the cluster file system extracts the identification information from the transmission ending request and determines the permission verification information corresponding to the identification information.
8. The method of claim 1, wherein monitoring the running state of the sub-process to determine if an exception occurred to the sub-process comprises:
a main process of the SMB server side sets a monitoring queue, and the monitoring queue is utilized to receive the loopback messages from the sub-processes;
the loopback message comprises the PID of the subprocess, the identity information corresponding to the subprocess, the message loopback time and the corresponding remote IP address;
the main process comprises a main thread and an independently arranged monitoring thread, and the monitoring thread is used for executing traversal checking work;
Performing periodic traversal check on the monitoring queue according to a preset time interval by using the monitoring thread in the main process, and determining the message loopback time of the loopback message corresponding to the plurality of subprocesses in the monitoring queue;
determining the latest response time corresponding to each subprocess in the monitoring queue according to the message loopback time corresponding to the subprocesses;
comparing the latest response time with the current time to determine whether the time difference between the latest response time and the current time exceeds a preset time threshold;
determining that the overtime abnormality occurs to the operation of the sub-process in response to the time difference between the two time differences exceeding the preset time threshold;
after determining that the sub-process operation has a timeout exception, the method further comprises:
the monitoring thread eliminates the loopback message corresponding to the child thread with the overtime abnormality from the monitoring queue;
and the SMB server side sends a process termination command to the subprocess so as to forcedly finish the subprocess.
9. The data sharing transmission control device is characterized by being applied to an SMB server side in a data sharing transmission system, wherein the data sharing transmission system also comprises a client side and a cluster file system; the device comprises:
The sub-process creation module is used for receiving a shared connection request from the client, creating a sub-process for the client, wherein the sub-process is used for carrying out mounting connection with the cluster file system so as to provide service for the client;
the identification information association module is used for determining the identification information of the sub-process after the sub-process and the cluster file system are successfully connected, associating the identification information with the authority verification information corresponding to the client, wherein the identification information and the authority verification information are distributed and determined by the cluster file system;
the sub-process monitoring module is used for monitoring the running state of the sub-process to determine whether the sub-process is abnormal or not; and
and the sub-process termination control module is used for sending a transmission ending request to the cluster file system based on the identity information under the condition that the sub-process is abnormal, so that the cluster file system recovers the authority verification information associated with the identity information in real time.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 8 when the program is executed by the processor.
CN202311297897.4A 2023-10-08 2023-10-08 Data sharing transmission control method and device and electronic equipment Pending CN117319523A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311297897.4A CN117319523A (en) 2023-10-08 2023-10-08 Data sharing transmission control method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311297897.4A CN117319523A (en) 2023-10-08 2023-10-08 Data sharing transmission control method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN117319523A true CN117319523A (en) 2023-12-29

Family

ID=89246046

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311297897.4A Pending CN117319523A (en) 2023-10-08 2023-10-08 Data sharing transmission control method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN117319523A (en)

Similar Documents

Publication Publication Date Title
CN106843749B (en) Write request processing method, device and equipment
CN108933798B (en) Data storage method, storage server and system
US10609123B2 (en) Hybrid quorum policies for durable consensus in distributed systems
CN111258851B (en) Cluster alarm method, device, setting and storage medium
CN111949444A (en) Data backup and recovery system and method based on distributed service cluster
US9727394B2 (en) Establishing causality order of computer trace records
CN115150419B (en) Configuration and access method and system for hybrid cloud object storage
CN111176888A (en) Cloud storage disaster recovery method, device and system
CN114764380A (en) Distributed cluster control method and device based on ETCD
US9092396B2 (en) Standby system device, a control method, and a program thereof
CN108352995B (en) SMB service fault processing method and storage device
US10318385B2 (en) Service recovery using snapshots and interservice messages
CN108512753B (en) Method and device for transmitting messages in cluster file system
US10721135B1 (en) Edge computing system for monitoring and maintaining data center operations
CN111342986B (en) Distributed node management method and device, distributed system and storage medium
US11930292B2 (en) Device state monitoring method and apparatus
CN107528703B (en) Method and equipment for managing node equipment in distributed system
CN110321199B (en) Method and device for notifying common data change, electronic equipment and medium
US20070198993A1 (en) Communication system event handling systems and techniques
CN117319523A (en) Data sharing transmission control method and device and electronic equipment
US7350065B2 (en) Method, apparatus and program storage device for providing a remote power reset at a remote server through a network connection
CN106790521B (en) System and method for distributed networking by using node equipment based on FTP
CN113596195B (en) Public IP address management method, device, main node and storage medium
JP2015114952A (en) Network system, monitoring control unit, and software verification method
CN110502460B (en) Data processing method and node

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