[go: up one dir, main page]

CN113254240B - A method, system, device and medium for managing and controlling equipment - Google Patents

A method, system, device and medium for managing and controlling equipment Download PDF

Info

Publication number
CN113254240B
CN113254240B CN202110683953.2A CN202110683953A CN113254240B CN 113254240 B CN113254240 B CN 113254240B CN 202110683953 A CN202110683953 A CN 202110683953A CN 113254240 B CN113254240 B CN 113254240B
Authority
CN
China
Prior art keywords
command execution
message queue
execution management
management array
length
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.)
Active
Application number
CN202110683953.2A
Other languages
Chinese (zh)
Other versions
CN113254240A (en
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.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202110683953.2A priority Critical patent/CN113254240B/en
Publication of CN113254240A publication Critical patent/CN113254240A/en
Application granted granted Critical
Publication of CN113254240B publication Critical patent/CN113254240B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Advance Control (AREA)

Abstract

本发明公开了一种管理控制设备的方法、系统、设备和存储介质,方法包括:申请内存空间以设置命令执行管理阵列,并设置命令执行管理阵列的最大信息长度,申请消息队列资源以创建消息队列并定义消息队列发送数据的专属类型;响应于接收到控制主机信息,将控制主机信息加入命令执行管理阵列,并判断控制主机信息的长度是否小于或等于命令执行管理阵列的最大信息长度;响应于控制主机信息的长度小于或等于命令执行管理阵列的最大信息长度,通过消息队列使用专属类型发送执行请求并接收返回的执行状态及结果;以及通知主机控制主机信息已经执行完成,并响应于主机获取执行状态及结果,初始化命令执行管理阵列和消息队列。

Figure 202110683953

The invention discloses a method, system, device and storage medium for managing and controlling equipment. The method includes: applying for memory space to set a command execution management array, setting the maximum information length of the command execution management array, and applying for message queue resources to create messages Queue and define the exclusive type of data sent by the message queue; in response to receiving the control host information, add the control host information to the command execution management array, and determine whether the length of the control host information is less than or equal to the maximum information length of the command execution management array; response When the length of the control host information is less than or equal to the maximum message length of the command execution management array, send an execution request using a dedicated type through the message queue and receive the returned execution status and result; and notify the host that the control host information has been executed, and respond to the host Obtain execution status and results, initialize command execution management arrays and message queues.

Figure 202110683953

Description

Method, system, device and medium for managing control device
Technical Field
The present invention relates to the field of Linux systems, and more particularly, to a method, a system, a computer device, and a readable medium for managing a control device.
Background
Due to the characteristics of developability, low cost, stable and reliable system, tailorability and the like of source codes, the Linux operating system, especially the embedded system thereof, is one of the mainstream embedded operating systems nowadays, and is widely applied to a plurality of fields such as industrial manufacturing, process control, communication, instruments, automobiles, ships, aviation, aerospace, military equipment, consumer products and the like.
The application of the Linux operating system can not leave a processor hardware platform, a large amount of complex requirements bring wide application of various processor peripheral chip devices, a logic structure developed by device drivers of the existing Linux operating system is adopted, if a plurality of devices are connected to the same bus, and the plurality of devices access at the same time, the mutual exclusion access of the bus is difficult to achieve, the existing control on the devices mainly controls data flow, and the control data flow often influences service data flow, so that the efficiency of service processing is reduced.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, a system, a computer device, and a computer readable storage medium for managing a control device, in which a single thread is used to process a command execution management array and a message queue layer by layer, so as to reduce the influence of a control data stream on a service data stream, and then, communication of control data between layers is implemented through an inter-thread communication mechanism, so as to implement management of a device based on a Linux system, and implement management and control of the device while avoiding the influence on a service.
In view of the above, an aspect of the embodiments of the present invention provides a method for managing a control device, including the following steps: applying for a memory space to set a command execution management array, setting the maximum information length of the command execution management array, applying for a message queue resource to create a message queue and defining the exclusive type of data sent by the message queue; in response to receiving control host information, adding the control host information to the command execution management array, and judging whether the length of the control host information is less than or equal to the maximum information length of the command execution management array; in response to the length of the control host information being less than or equal to the maximum information length of the command execution management array, sending an execution request and receiving a returned execution state and result by using the exclusive type through the message queue; and informing the host that the control host has completed executing the information, and initializing the command execution management array and the message queue in response to the host acquiring the execution state and result.
In some embodiments, the method further comprises: in response to the command execution management array setup being complete, enabling a new thread to listen to the message queue to detect whether there is an execution request.
In some embodiments, the method further comprises: in response to receiving the execution request, a fork function is called under the current process to create a sub-process, and an execute function is called in the sub-process to execute the execution request.
In some embodiments, the method further comprises: and setting a nameless pipeline between the current process and the subprocess, and redirecting to receive the execution state and result of the execute function.
In some embodiments, the method further comprises: dynamically applying for a memory space to store the executed state and result, and writing the address of the memory space into the command execution management array.
In some embodiments, the receiving the returned execution state and result comprises: judging whether the returned execution state and result belong to the exclusive type; and responding to the returned execution state and result not belonging to the exclusive type, and returning the returned execution state and result to an original address.
In some embodiments, the method further comprises: judging whether a command execution management array and/or a message queue needs to be created or not according to the current equipment model or scene; and in response to a need to create a command execution management array and/or message queue, sending an enable signal and creating a command processing thread.
In another aspect of the embodiments of the present invention, a system for managing a control device is provided, including: the system comprises a creating module, a memory space application module and a message queue resource application module, wherein the creating module is configured to apply for a memory space to set a command execution management array, set the maximum information length of the command execution management array, apply for a message queue resource to create a message queue and define the exclusive type of data sent by the message queue; the judging module is configured to respond to the received control host information, add the control host information into the command execution management array, and judge whether the length of the control host information is less than or equal to the maximum information length of the command execution management array; the message module is configured to respond that the length of the control host information is smaller than or equal to the maximum information length of the command execution management array, send an execution request by using the exclusive type through the message queue and receive a returned execution state and result; and an initialization module configured to notify a host that the control host has completed executing the information, and initialize the command execution management array and the message queue in response to the host obtaining the execution status and result.
In another aspect of the embodiments of the present invention, there is also provided a computer device, including: at least one processor; and a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of the method as above.
In a further aspect of the embodiments of the present invention, a computer-readable storage medium is also provided, in which a computer program for implementing the above method steps is stored when the computer program is executed by a processor.
The invention has the following beneficial technical effects: the single-thread scheme is adopted for processing layer by layer, the influence of control data flow on service data flow is reduced, then the communication of control data among layers is realized through an inter-thread communication mechanism, so that the management of equipment based on a Linux system is realized, and the management and the control of the equipment are realized while the influence on the service is avoided.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a schematic diagram of an embodiment of a method of managing a control device provided by the present invention;
FIG. 2 is a schematic diagram of a hardware structure of an embodiment of a computer device for managing a control device provided in the present invention;
FIG. 3 is a schematic diagram of an embodiment of a computer storage medium of a management control device provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
In view of the above objects, a first aspect of embodiments of the present invention proposes an embodiment of a method of managing a control device. Fig. 1 is a schematic diagram illustrating an embodiment of a method for managing a control device according to the present invention. As shown in fig. 1, the embodiment of the present invention includes the following steps:
s1, applying for a memory space to set a command execution management array, setting the maximum information length of the command execution management array, applying for a message queue resource to create a message queue and defining the exclusive type of data sent by the message queue;
s2, responding to the received control host information, adding the control host information into the command execution management array, and judging whether the length of the control host information is less than or equal to the maximum information length of the command execution management array;
s3, responding to the length of the control host information is smaller than or equal to the maximum information length of the command execution management array, sending an execution request by using the exclusive type through the message queue, and receiving a returned execution state and result; and
s4, informing the host that the control host has completed executing, and responding to the host obtaining the executing state and result, initializing the command execution management array and the message queue.
The embodiment of the invention adopts C high-level language to describe a control mechanism, uses a general processor CPU as a main program of a host end to operate, starts an independent thread in a certain single module to finish the processing of the control function, finishes the encapsulation or processing of control data in each module through a multithread processing mechanism in the whole system, and then carries out data interaction of each module through a communication mode among threads such as a message queue, thereby finishing the management and the control of a Linux system. By using the control management mechanism, a more diversified system control mechanism can be realized under the condition of avoiding the influence on the original working mechanism, the requirements on multiple industries and multiple scenes are met, and the product adaptability is improved.
In some embodiments, the method further comprises: judging whether a command execution management array and/or a message queue needs to be created or not according to the current equipment model or scene; and in response to a need to create a command execution management array and/or message queue, sending an enable signal and creating a command processing thread. Judging whether the current equipment model or scene needs to provide the service mechanism, if not, the function is not enabled, reducing CPU burden, if so, enabling the function, sending enabling information through the original information interaction channel, enabling the function, and creating a corresponding mechanism.
Applying for memory space to set command execution management array, setting maximum information length of the command execution management array, applying for message queue resource to create message queue and defining exclusive type of the message queue for sending data. Applying for memory space, setting command execution management array, limiting length of command execution management array, setting maximum information length according to actual situation, and maintaining by platform interaction module; applying for message queue resource, creating exclusive message queue and defining message queue to send exclusive type of data.
In some embodiments, the method further comprises: in response to the command execution management array setup being complete, enabling a new thread to listen to the message queue to detect whether there is an execution request. And informing the case control module through the original information interaction channel, and starting a new thread to monitor and execute the request.
And in response to receiving control host information, adding the control host information into the command execution management array, and judging whether the length of the control host information is less than or equal to the maximum information length of the command execution management array. After receiving the control host information, the controlled device platform analyzes and verifies the control host information, wherein the verification mode needs to be set according to an actual application scene, for example, whether an instruction is supported or not, and if the verification fails, a corresponding error is returned to the host end; and if the verification is passed, adding the control host information to the command execution management array. And assembling the shell execution command string, and checking the length validity, namely judging whether the length of the command string is less than or equal to the maximum information length of the command execution management array.
And in response to the length of the control host information being less than or equal to the maximum information length of the command execution management array, sending an execution request and receiving a returned execution state and result by using the exclusive type through the message queue.
In some embodiments, the method further comprises: in response to receiving the execution request, a fork function is called under the current process to create a sub-process, and an execute function is called in the sub-process to execute the execution request. The Fork () function is a system call to create a process that is almost identical to the original process, called the child process, and the original process called the parent process. After a process calls the fork () function, the system first allocates resources to the new process, such as space for storing data and code, and then copies all values of the original integration into the new process, only a few values are different from the values of the original process, which is equivalent to cloning an original process. One point to be noted is: after the fork function is called, the code segment executed by the parent process and the child process simultaneously is the code after the fork function, and the previous code is executed by the parent process.
After the fork function is executed, if the creation of a new process is successful, two processes appear, one is a child process and the other is a parent process. In the child process, the fork function returns 0, in the parent process, the fork function returns the process ID (identification) of the newly created child process, and whether the current process is the child process or the parent process can be judged by the value returned by the fork. Fork error may have two causes, the first, current number of processes has reached the upper limit specified by the system, when the value of errno is set to EAGAIN; second, the system memory is insufficient, and the value of errno is set to ENOMEM. After the child process is created successfully, two processes which are basically identical appear in the system, the two processes are executed without a fixed sequence, and the sequence of the process execution needs to be determined according to a process scheduling strategy of the system. Each process has a unique process identifier, which can be obtained through the getpid () function, and a variable that records the parent process pid, whose value can be obtained through the getppid () function.
The Exec family of functions provides a method for starting another program in a process, which can find an executable file according to the name of an executed file or directory and replace a data segment, a code segment and a stack segment of an original calling process, and after the execution is finished, the content of the original calling process is replaced by the content of the new program except for a process number. When a process calls an exec function, the process is completely replaced by the new program, which starts from its main function, and thus calling exec does not create a new process, so the process ID (also including parent process number, process group number, current working directory … …) before and after it is unchanged. Exec simply replaces the text, data, stack and stack segments of the current process with another new program. The fifth bit of Execve is v, which indicates that the parameter is passed in a pointer array construction mode, and the sixth bit of e indicates that a new process environment variable can be passed.
In some embodiments, the method further comprises: and setting a nameless pipeline between the current process and the subprocess, and redirecting to receive the execution state and result of the execute function.
The pipe is an interprocess communication mechanism inherited by Linux from unix, and the idea is to create a shared file (the file is a pseudo file, does not occupy the size of a disk, and is a buffer area) in an inner core, so that two communication parties can realize communication by using the shared file, and the shared file for transmitting messages is called as the pipe. The anonymous pipe has no file nodes in the file system and can be used for interprocess communication with affinity. The nameless pipe may be created using the pipe () function. Redirection is to put some erroneous or correct information output by the command into a specified file, so that the redirection is managed well.
In some embodiments, the receiving the returned execution state and result comprises: judging whether the returned execution state and result belong to the exclusive type; and responding to the returned execution state and result not belonging to the exclusive type, and returning the returned execution state and result to an original address.
And informing the host that the control host information is executed, and initializing the command execution management array and the message queue in response to the host acquiring the execution state and result.
In some embodiments, the method further comprises: dynamically applying for a memory space to store the executed state and result, and writing the address of the memory space into the command execution management array. The platform interaction module dynamically applies for space, stores execution states and results, and places memory addresses in corresponding command execution management arrays for maintenance and access. After taking the result away, the host releases the space for storing the result and initializes the command management matrix and the message queue.
The invention adopts a single-thread scheme to process layer by layer, reduces the influence of control data flow on service data flow, realizes the communication of control data among layers through an inter-thread communication mechanism, can improve the control flexibility and reduce the influence of the control data flow on other performances, expands the control mode of the storage equipment, widens the application scene, improves the competitiveness of the storage equipment, and realizes the management and control of the equipment while avoiding the influence on the service.
It should be particularly noted that, the steps in the embodiments of the method for managing a control device described above can be mutually intersected, replaced, added, or deleted, and therefore, these methods for managing a control device that are reasonably changed in permutation and combination also belong to the scope of the present invention, and the scope of the present invention should not be limited to the embodiments.
In view of the above object, a second aspect of an embodiment of the present invention provides a system for managing a control device, including: the system comprises a creating module, a memory space application module and a message queue resource application module, wherein the creating module is configured to apply for a memory space to set a command execution management array, set the maximum information length of the command execution management array, apply for a message queue resource to create a message queue and define the exclusive type of data sent by the message queue; the judging module is configured to respond to the received control host information, add the control host information into the command execution management array, and judge whether the length of the control host information is less than or equal to the maximum information length of the command execution management array; the message module is configured to respond that the length of the control host information is smaller than or equal to the maximum information length of the command execution management array, send an execution request by using the exclusive type through the message queue and receive a returned execution state and result; and an initialization module configured to notify a host that the control host has completed executing the information, and initialize the command execution management array and the message queue in response to the host obtaining the execution status and result.
In some embodiments, the system further comprises a listening module configured to: in response to the command execution management array setup being complete, enabling a new thread to listen to the message queue to detect whether there is an execution request.
In some embodiments, the system further comprises a second creation module configured to: in response to receiving the execution request, a fork function is called under the current process to create a sub-process, and an execute function is called in the sub-process to execute the execution request.
In some embodiments, the system further comprises a receiving module configured to: and setting a nameless pipeline between the current process and the subprocess, and redirecting to receive the execution state and result of the execute function.
In some embodiments, the system further comprises a storage module configured to: dynamically applying for a memory space to store the executed state and result, and writing the address of the memory space into the command execution management array.
In some embodiments, the message module is configured to: judging whether the returned execution state and result belong to the exclusive type; and responding to the returned execution state and result not belonging to the exclusive type, and returning the returned execution state and result to an original address.
In some embodiments, the system further comprises a second determining module configured to: judging whether a command execution management array and/or a message queue needs to be created or not according to the current equipment model or scene; and in response to a need to create a command execution management array and/or message queue, sending an enable signal and creating a command processing thread.
The invention adopts a single-thread scheme to process layer by layer, reduces the influence of control data flow on service data flow, realizes the communication of control data among layers through an inter-thread communication mechanism, can improve the control flexibility and reduce the influence of the control data flow on other performances, expands the control mode of the storage equipment, widens the application scene, improves the competitiveness of the storage equipment, and realizes the management and control of the equipment while avoiding the influence on the service.
In view of the above object, a third aspect of the embodiments of the present invention provides a computer device, including: at least one processor; and a memory storing computer instructions executable on the processor, the instructions being executable by the processor to perform the steps of: s1, applying for a memory space to set a command execution management array, setting the maximum information length of the command execution management array, applying for a message queue resource to create a message queue and defining the exclusive type of data sent by the message queue; s2, responding to the received control host information, adding the control host information into the command execution management array, and judging whether the length of the control host information is less than or equal to the maximum information length of the command execution management array; s3, responding to the length of the control host information is smaller than or equal to the maximum information length of the command execution management array, sending an execution request by using the exclusive type through the message queue, and receiving a returned execution state and result; and S4, informing the host that the control host has completed executing the information, and initializing the command execution management array and the message queue in response to the host acquiring the execution state and result.
In some embodiments, the steps further comprise: in response to the command execution management array setup being complete, enabling a new thread to listen to the message queue to detect whether there is an execution request.
In some embodiments, the steps further comprise: in response to receiving the execution request, a fork function is called under the current process to create a sub-process, and an execute function is called in the sub-process to execute the execution request.
In some embodiments, the steps further comprise: and setting a nameless pipeline between the current process and the subprocess, and redirecting to receive the execution state and result of the execute function.
In some embodiments, the steps further comprise: dynamically applying for a memory space to store the executed state and result, and writing the address of the memory space into the command execution management array.
In some embodiments, the receiving the returned execution state and result comprises: judging whether the returned execution state and result belong to the exclusive type; and responding to the returned execution state and result not belonging to the exclusive type, and returning the returned execution state and result to an original address.
In some embodiments, the steps further comprise: judging whether a command execution management array and/or a message queue needs to be created or not according to the current equipment model or scene; and in response to a need to create a command execution management array and/or message queue, sending an enable signal and creating a command processing thread.
Fig. 2 is a schematic diagram of a hardware structure of an embodiment of the computer device for managing and controlling devices according to the present invention.
Taking the apparatus shown in fig. 2 as an example, the apparatus includes a processor 201 and a memory 202, and may further include: an input device 203 and an output device 204.
The processor 201, the memory 202, the input device 203 and the output device 204 may be connected by a bus or other means, and fig. 2 illustrates the connection by a bus as an example.
The memory 202, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the method for managing a control device in the embodiments of the present application. The processor 201 executes various functional applications of the server and data processing by running nonvolatile software programs, instructions, and modules stored in the memory 202, that is, implements the method of managing a control device of the above-described method embodiment.
The memory 202 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of a method of managing the control apparatus, and the like. Further, the memory 202 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 202 may optionally include memory located remotely from processor 201, which may be connected to local modules via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 203 may receive information such as a user name and a password that are input. The output device 204 may include a display device such as a display screen.
Program instructions/modules corresponding to one or more methods of managing a control device are stored in the memory 202 and, when executed by the processor 201, perform the method of managing a control device in any of the method embodiments described above.
Any embodiment of a computer device performing the method of managing a control device described above may achieve the same or similar effects as any of the preceding method embodiments corresponding thereto.
The invention also provides a computer readable storage medium storing a computer program which, when executed by a processor, performs the method as above.
Fig. 3 is a schematic diagram of an embodiment of a computer storage medium for managing a control device according to the present invention. Taking the computer storage medium as shown in fig. 3 as an example, the computer readable storage medium 3 stores a computer program 31 which, when executed by a processor, performs the method as described above.
Finally, it should be noted that, as one of ordinary skill in the art can appreciate that all or part of the processes of the methods of the above embodiments can be implemented by a computer program to instruct related hardware, and the program of the method for managing a control device can be stored in a computer readable storage medium, and when executed, the program can include the processes of the embodiments of the methods as described above. The storage medium of the program may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like. The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (9)

1. A method of managing a control device, comprising the steps of:
applying for a memory space to set a command execution management array, setting the maximum information length of the command execution management array, applying for a message queue resource to create a message queue and defining the exclusive type of data sent by the message queue;
in response to receiving control host information, adding the control host information to the command execution management array, and judging whether the length of the control host information is less than or equal to the maximum information length of the command execution management array;
responding to the length of the control host information being smaller than or equal to the maximum information length of the command execution management array, sending an execution request by using the exclusive type through the message queue, and receiving a returned execution state and result; and
and informing the host that the control host information is executed, and initializing the command execution management array and the message queue in response to the host acquiring the execution state and result.
2. The method of claim 1, further comprising:
in response to the command execution management array setup being complete, enabling a new thread to listen to the message queue to detect whether there is an execution request.
3. The method of claim 1, further comprising:
in response to receiving the execution request, a fork function is called under the current process to create a sub-process, and an execute function is called in the sub-process to execute the execution request.
4. The method of claim 3, further comprising:
and setting a nameless pipeline between the current process and the subprocess, and redirecting to receive the execution state and result of the execute function.
5. The method of claim 1, further comprising:
dynamically applying for a memory space to store the executed state and result, and writing the address of the memory space into the command execution management array.
6. The method of claim 1, further comprising:
judging whether a command execution management array and/or a message queue needs to be created or not according to the current equipment model or scene; and
in response to a need to create a command execution management array and/or message queue, an enable signal is sent and a command processing thread is created.
7. A system for managing control devices, comprising:
the system comprises a creating module, a memory space application module and a message queue resource application module, wherein the creating module is configured to apply for a memory space to set a command execution management array, set the maximum information length of the command execution management array, apply for a message queue resource to create a message queue and define the exclusive type of data sent by the message queue;
the judging module is configured to respond to the received control host information, add the control host information into the command execution management array, and judge whether the length of the control host information is less than or equal to the maximum information length of the command execution management array;
the message module is configured to respond that the length of the control host information is smaller than or equal to the maximum information length of the command execution management array, send an execution request by using the exclusive type through the message queue, and receive a returned execution state and result; and
and the initialization module is configured to notify the host that the control host information is completely executed, and initialize the command execution management array and the message queue in response to the host acquiring the execution state and result.
8. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of the method of any one of claims 1 to 6.
9. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
CN202110683953.2A 2021-06-21 2021-06-21 A method, system, device and medium for managing and controlling equipment Active CN113254240B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110683953.2A CN113254240B (en) 2021-06-21 2021-06-21 A method, system, device and medium for managing and controlling equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110683953.2A CN113254240B (en) 2021-06-21 2021-06-21 A method, system, device and medium for managing and controlling equipment

Publications (2)

Publication Number Publication Date
CN113254240A CN113254240A (en) 2021-08-13
CN113254240B true CN113254240B (en) 2021-10-15

Family

ID=77188944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110683953.2A Active CN113254240B (en) 2021-06-21 2021-06-21 A method, system, device and medium for managing and controlling equipment

Country Status (1)

Country Link
CN (1) CN113254240B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113961148B (en) * 2021-10-28 2023-08-08 苏州浪潮智能科技有限公司 Data interaction method, system and device for host and storage system
CN114374684B (en) * 2021-12-27 2023-05-16 山东浪潮科学研究院有限公司 Shell command optimization method and system
CN116522323B (en) * 2023-03-17 2023-11-24 哈尔滨工业大学 Method for managing reading and writing of container message queue based on name space

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108196794A (en) * 2017-12-29 2018-06-22 华为技术有限公司 A kind of message treatment method, apparatus and system
CN109669724A (en) * 2018-11-26 2019-04-23 许昌许继软件技术有限公司 A kind of more order concurrent type frog service means for acting as agent and system based on linux system
CN110008708A (en) * 2019-04-11 2019-07-12 北京可信华泰信息技术有限公司 Communication means and system between a kind of host and credible platform control module

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101097527B (en) * 2006-06-27 2011-11-30 中国银联股份有限公司 Flowpath scheduling method and system of application progress
US20090037929A1 (en) * 2007-07-30 2009-02-05 Tresys Technology, Llc Secure Inter-Process Communications Using Mandatory Access Control Security Policies
CN101751288A (en) * 2008-12-12 2010-06-23 中国移动通信集团山东有限公司 Method, device and system applying process scheduler
CN109189573B (en) * 2018-08-10 2021-06-01 郑州云海信息技术有限公司 Heterogeneous memory management system based on NVDIMM
CN110597460A (en) * 2019-08-09 2019-12-20 苏州浪潮智能科技有限公司 Method for completely removing residual information of disk

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108196794A (en) * 2017-12-29 2018-06-22 华为技术有限公司 A kind of message treatment method, apparatus and system
CN109669724A (en) * 2018-11-26 2019-04-23 许昌许继软件技术有限公司 A kind of more order concurrent type frog service means for acting as agent and system based on linux system
CN110008708A (en) * 2019-04-11 2019-07-12 北京可信华泰信息技术有限公司 Communication means and system between a kind of host and credible platform control module

Also Published As

Publication number Publication date
CN113254240A (en) 2021-08-13

Similar Documents

Publication Publication Date Title
CN113254240B (en) A method, system, device and medium for managing and controlling equipment
US11960915B2 (en) Method and apparatus for creating virtual machine based on parameter information of a virtual network interface card
US10430172B2 (en) Re-configuration in cloud computing environments
TWI685800B (en) System and method for task scheduling and device management
US9104501B2 (en) Preparing parallel tasks to use a synchronization register
CN110990136B (en) Task processing method and task scheduler
US12346733B2 (en) Batch processing and error resolution management
CN108776587B (en) Data acquisition method and device, computer equipment and storage medium
JPWO2014171130A1 (en) Information processing system, deployment method, processing device, and deployment device
CN110163554A (en) Operation method, device, server and the storage medium of workflow
US20180316572A1 (en) Cloud lifecycle managment
CN119718673A (en) On-demand code execution with limited memory footprint
US8752061B2 (en) Resource allocation within multiple resource providers based on the incoming resource request and the expected state transition of the resource requesting application, and selecting a resource provider based on the sum of the percentage of the resource provider currently used, the requesting load as a percentage of the resource provider's total resource, and the additional load imposed by the expected state of the requesting application as a percentage of the resource provider's total resource
US9628401B2 (en) Software product instance placement
CN110737533B (en) A task scheduling method, device, electronic device and storage medium
CN117632416B (en) A method, device, medium and equipment for scheduling process engine trigger tasks
US10346141B1 (en) Deterministic execution for visually developed operations
CN114416381B (en) Processing resource over-partitioning method, device, equipment and storage medium
US12164980B2 (en) Initiating operations for applications via communication bridges
JP2018513460A (en) Method and system for requesting access to a restricted service instance
CN115033251A (en) Software deployment method and device, electronic equipment and storage medium
CN116089020B (en) Virtual machine operation method, capacity expansion method and capacity expansion system
US11442943B1 (en) Error-causing record isolation for data stream processing
CN110941498B (en) Data processing method, device and storage medium
CN113761548B (en) Data transmission method and device for Shuffle process

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
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Patentee after: Suzhou Yuannao Intelligent Technology Co.,Ltd.

Country or region after: China

Address before: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Patentee before: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Country or region before: China