CN116506376A - Device management system, method, terminal and storage medium - Google Patents

Device management system, method, terminal and storage medium Download PDF

Info

Publication number
CN116506376A
CN116506376A CN202310466485.2A CN202310466485A CN116506376A CN 116506376 A CN116506376 A CN 116506376A CN 202310466485 A CN202310466485 A CN 202310466485A CN 116506376 A CN116506376 A CN 116506376A
Authority
CN
China
Prior art keywords
module
data
target equipment
target
equipment
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
CN202310466485.2A
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.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group 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 BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202310466485.2A priority Critical patent/CN116506376A/en
Publication of CN116506376A publication Critical patent/CN116506376A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/10Packet switching elements characterised by the switching fabric construction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/15Interconnection of switching modules
    • 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/08Protocols for interworking; Protocol conversion
    • 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/22Parsing or analysis of headers
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Communication Control (AREA)

Abstract

The embodiment of the application provides a device management system, a method, a terminal and a storage medium, wherein the device management system comprises: an interface layer comprising at least one type of abstracted port for interacting with device data of an access system; the logic layer comprises a logic processing module and is used for generating a control instruction for the target equipment according to an operation instruction initiated by a user for the target equipment; the protocol layer comprises a state management module and a data protocol analysis module, wherein the state management module is used for executing control instructions according to the control instructions received from the logic processing module under the condition that the target equipment is not occupied by other users currently; the data protocol analysis module is communicated with the state management module and is used for receiving data acquired by the target equipment through the state management module and analyzing the data to obtain an analysis result. According to the technology of the application, the difficulty of accessing the system into the new equipment is reduced, the compatibility of the system to different types of equipment is improved, and the equipment is convenient to update in an iteration mode.

Description

Device management system, method, terminal and storage medium
Technical Field
The present disclosure relates to the field of device management technologies, and in particular, to a device management system, a method, a terminal, and a storage medium.
Background
In the related art, an equipment management system adopting an upper computer-lower computer architecture generally adopts a cascading mode aiming at access scenes of various types of lower computer equipment, namely, corresponding upper computers are configured for each type of lower computer, and the plurality of upper computers gather equipment data to an upper-layer manager in a network communication or database sharing mode, so that the defects of high development cost and high deployment cost exist. Moreover, when accessing a new type of lower computer, it is generally necessary to restart the system after the software update in order to load the data parsing protocol code of the new device, and hot update cannot be realized.
Disclosure of Invention
Embodiments of the present application provide a device management system, a method, a terminal, and a storage medium, so as to solve or alleviate one or more technical problems in the prior art.
In a first aspect, an embodiment of the present application provides a device management system, including; an interface layer comprising at least one type of abstract port for interacting with device data of an access system; the logic layer comprises a logic processing module, and the logic processing module is used for generating a control instruction for the target equipment according to an operation instruction initiated by a user to the target equipment; the protocol layer comprises a state management module and a data protocol analysis module, wherein the state management module is communicated with the abstract port and the logic processing module and is used for executing control instructions under the condition that the target equipment is not occupied by other users currently according to the control instructions received from the logic processing module; the data protocol analysis module is communicated with the state management module and is used for receiving data acquired by the target equipment through the state management module and analyzing the data to obtain an analysis result.
In one embodiment, the state management module is further configured to: responding to a control instruction, and acquiring the current occupation condition of target equipment; executing a control instruction under the condition that the occupied condition is that the target equipment is not occupied by other users; or, if the occupation condition is that the target device is occupied by other users, feeding back the occupation condition to the logic processing module.
In one embodiment, the data protocol parsing module is further configured to: and loading a script code file corresponding to the target equipment to obtain an analysis result corresponding to the data, wherein the script code file encapsulates a data analysis protocol corresponding to the target equipment.
In one embodiment, the data protocol parsing module includes a data transceiving submodule and a parsing submodule; the data receiving and transmitting sub-module is communicated with the state management module and is used for receiving data acquired by the target equipment from the state management module and sending the data to the analysis sub-module, and receiving an analysis result from the analysis sub-module and sending the analysis result to the state management module; the analysis submodule is used for loading script code files corresponding to the target equipment so as to analyze the data and obtain analysis results corresponding to the data.
In one embodiment, the parsing sub-module is further configured to: checking and updating a device code set in a server at each interval preset time length, wherein the device code set comprises script code files corresponding to all devices accessed by a system; and under the condition that the device code set is newly added to the device, acquiring the updated device code set from the server.
In one embodiment, the protocol layer includes a timing module, where the timing module is configured to call a callback function when the operation duration of the target device reaches a preset duration, so as to switch the working state of the target device to stop operation.
In one embodiment, the operation instructions include a device scan instruction, a device test instruction, a device run instruction, and a result acquisition instruction; the logic processing module is configured to: responding to the equipment scanning instruction, and generating connection control instructions for all equipment; responding to the equipment test instruction, and generating operation control instructions for all the equipment; generating an operation control instruction for the target device in response to the device operation instruction; and generating a result acquisition control instruction for the target device in response to the result acquisition instruction.
In one embodiment, the logic layer further includes an interaction module for: generating an operation instruction initiated by a user to target equipment; uploading an analysis result obtained by the protocol layer to a database; and displaying an analysis result corresponding to the data acquired by the target equipment.
In one embodiment, the logic layer further includes a device management module for managing device information including at least one of quantity information, type information, and parameter information; the device management module is further configured to write device information into a configuration file, where the configuration file includes a first device set and a second device set, the first device set is used to write device information corresponding to all devices of the access system, and the second device set is used to write device information corresponding to devices started by default in all devices of the access system.
In a third aspect, an embodiment of the present application provides a device management method, including: responding to an operation instruction initiated by a user to target equipment, generating a control instruction to the target equipment, wherein the control instruction is used for executing target operation to the target equipment; acquiring the current occupation condition of the target equipment according to the control instruction; executing a control instruction under the condition that the occupied condition is that the target equipment is not occupied by other users; or, if the occupation condition is that the target device is occupied by other users, feeding back the occupation condition to the logic processing module.
In one embodiment, the control instructions include result acquisition instructions; executing control instructions, comprising: responding to a result acquisition instruction, and acquiring data acquired by the target equipment from the abstracted port; loading a script code file corresponding to the target equipment to analyze the data so as to obtain an analysis result corresponding to the data acquired by the target equipment; the script code file is encapsulated with a data analysis protocol corresponding to the target equipment; uploading the analysis result to a database; and displaying the analysis result.
In a third aspect, an embodiment of the present application provides an apparatus management terminal, including: memory and a processor. Wherein the memory and the processor are in communication with each other via an internal connection, the memory is configured to store instructions, the processor is configured to execute the instructions stored by the memory, and when the processor executes the instructions stored by the memory, the processor is configured to perform the method of any one of the embodiments of the above aspects.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium storing a computer program, where the method in any one of the above embodiments is performed when the computer program is run on a computer.
According to the technology of the embodiment of the application, the system is divided into the logic layer, the protocol layer and the interface layer according to the logic function, the control instruction for the target device is generated by the logic processing module of the logic layer based on the operation instruction of the user, the occupation condition of the target device is inquired by the interface after the control instruction is received by the state management module of the protocol layer, and the control instruction is executed under the condition that the target device is not occupied by other users currently so as to convert the working state of the target device into the target working state, therefore, under the condition that a plurality of users use the same target device accessed by the system, the conflict of switching of the target device under different working states can be avoided, and the working stability and the reliability of the device management system are improved. Secondly, a data protocol analysis module is arranged on a protocol layer independently to analyze the data protocols of all devices accessed to the system, so that the format of data acquired or generated by each device is converted into a preset format, and the data protocols of various devices accessed to the system are uniformly configured and managed. Therefore, the difficulty of accessing the system into the new equipment is reduced, the compatibility of the system to different types of equipment is improved, and the equipment is convenient to iteratively update.
The foregoing summary is for the purpose of the specification only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the present application will become apparent by reference to the drawings and the following detailed description.
Drawings
In the drawings, the same reference numerals refer to the same or similar parts or elements throughout the several views unless otherwise specified. The figures are not necessarily drawn to scale. It is appreciated that these drawings depict only some embodiments according to the disclosure and are not therefore to be considered limiting of its scope.
Fig. 1 shows an architecture diagram of a device management system according to an embodiment of the present application.
Fig. 2 shows a specific schematic diagram of a device management system according to an embodiment of the present application.
Fig. 3 shows a schematic operation diagram of a logic processing module of the device management system according to an embodiment of the present application.
Fig. 4 shows a schematic diagram of the operation of the protocol layers of the device management system according to an embodiment of the present application.
Fig. 5 shows a flowchart of a device management method according to an embodiment of the present application.
Fig. 6 shows a block diagram of a device management terminal according to an embodiment of the present application.
Detailed Description
Hereinafter, only certain exemplary embodiments are briefly described. As will be recognized by those of skill in the pertinent art, the described embodiments may be modified in various different ways without departing from the spirit or scope of the present application. Accordingly, the drawings and description are to be regarded as illustrative in nature and not as restrictive.
The device management system 1 according to the embodiment of the present application is described below with reference to fig. 1 to 4, the device management system 1 of the embodiment of the present application being used to access and manage a plurality of devices.
As shown in fig. 1 and 2, the device management system 1 is divided into upper, middle and lower layers according to logic functions, which are sequentially a logic layer 10, a protocol layer 20 and an interface layer 30. Specifically, the interface layer 30 includes at least one type of abstracted port for interacting with device data of the access system. The logic layer comprises a logic processing module 11, and the logic processing module 11 is used for generating a control instruction for the target equipment according to an operation instruction initiated by a user for the target equipment. The protocol layer includes a state management module 21 and a data protocol parsing module 22, where the state management module 21 communicates with the abstracted port and the logic processing module 11, and is configured to execute the control instruction according to the control instruction received from the logic processing module 11, where the target device is not currently occupied by other users. The data protocol analysis module 22 is in communication with the state management module 21, and is configured to receive data collected by the target device through the state management module 21, and analyze the data to obtain an analysis result.
In the embodiment of the present application, the logic layer 10 may further include an interaction module 12 and a device management module 13 in addition to the logic processing module 11.
The logic processing module 11 is in communication with the interaction module 12, and is configured to receive the operation instruction generated by the interaction module 12, and generate a corresponding control instruction according to the operation instruction, where the control instruction is configured to perform a target operation corresponding to the operation instruction on the target device. For example, in the case where the operation instruction is a device scan instruction, the logic processing module 11 generates a device connection control instruction for all devices to implement a device connection operation for all devices; in the case that the operation instruction is a device test instruction, the logic processing module 11 generates operation control instructions for all devices to implement device test operations for all devices; in the case that the operation instruction is a device operation instruction, the logic processing module 11 generates an operation control instruction for the target device to implement a device operation for the target device; in the case where the operation instruction is a result acquisition instruction, the logic processing module 11 generates a result acquisition control instruction to acquire data for the target device.
Illustratively, the device management module 13 is responsible for managing device information of all devices of the access system, which may include at least one of quantity information, type information, and parameter information.
Illustratively, the interaction module 12 provides a UI (User Interface) unit for generating operation instructions for the target device under the interactive operation of the User to implement the interaction of the system with the User. In addition, the interaction module 12 also uploads the data result collected or generated by the device to the background database 40 of the device management system 1 after the device completes processing, and displays the data result through the UI unit.
In the embodiment of the present application, the protocol layer 20 may further include a timing module 23 in addition to the status management module 21 and the data protocol parsing module 22.
Illustratively, the state management module 21 is respectively in communication with the abstract port of the interface layer 30 and the logic processing module 11 of the logic layer 10, and is configured to receive a control instruction generated by the logic processing module 11, and query the current occupation situation of the target device through the abstract port based on the control instruction, where the state management module 21 does not execute the control instruction and feeds back the current occupation situation of the target device to the logic processing module 11 when the target device is currently occupied by other users; in case the target device is not currently occupied by other users, the state management module 21 executes control instructions to switch the target device to the target operating state. The working states of the device may include a "scanning state", a "setting state", an "operating state", and the like.
The data protocol analysis module 22 is configured to analyze data protocols of different types of devices and uniformly convert the data protocols into a preset data format adopted by the system. The data protocol parsing module 22 adopts an interpreter mode, and loads data protocol parsing codes by using a pre-configured script code file to parse data collected by the device. For example, the data protocol parsing module 22 converts the byte stream data collected by the device into JSON (JavaScript Object Notation ) format for easy reading and understanding. It can be understood that the JSON format is a lightweight data exchange format, and uses a text format completely independent of a programming language to store and represent data, so that the data is easy to read and write, and easy to machine to parse and generate, thereby effectively improving network transmission efficiency.
Illustratively, the timing module 23 is configured to start and close a timer to enable the duration of the device in any operating state to conform to a preset duration.
Illustratively, the interface layer 30 is configured to abstract different types of ports to obtain different types of abstract ports to provide the protocol layer 20 with functionality for device access. Depending on the function implemented, the abstract ports may include open ports, set ports, close ports, run device ports, and data transceiver ports, among others.
In a specific example, the device management system 1 of the embodiment of the present application may implement unified management of healthy medical devices. Specifically, the devices to which the device management system 1 is connected include a body weight detection device, a biochemical analysis device, a gastrointestinal treatment device, and the like. It will be appreciated that the operating time of the weight detection device is typically short and the operating time of the biochemical analysis device and the gastrointestinal treatment device is typically long. In the process that a certain user C uses the biochemical analysis equipment, an operation instruction to the biochemical analysis equipment initiated by the user D may exist, and the logic processing module 11 generates a control instruction to the biochemical analysis equipment based on the operation instruction; in response to a control instruction for the biochemical analysis device, the state management module 21 queries the occupation condition of the biochemical analysis device through the interface layer, and the occupation condition is that the biochemical analysis device is currently occupied by the user C, based on which the state management module 21 feeds back the current occupation condition of the biochemical analysis device to the logic processing module 11, and does not execute the control instruction.
According to the device management system 1 of the embodiment of the application, the system is divided into the logic layer 10, the protocol layer 20 and the interface layer 30 according to the logic function, the logic processing module 11 of the logic layer 10 is utilized to generate the control instruction for the target device based on the operation instruction of the user, the state management module 21 of the protocol layer 20 is utilized to query the occupation condition of the target device after receiving the control instruction, and the control instruction is executed under the condition that the target device is not occupied by other users currently so as to convert the working state of the target device into the target working state, therefore, under the condition that a plurality of users use the same target device accessed by the system, the switching of the target device under different working states can be prevented from generating conflict, and the working stability and the reliability of the device management system 1 are improved. Secondly, the data protocol analysis module 22 is separately arranged in the protocol layer 20 to analyze the data protocols of all devices accessed to the system, so that the format of data acquired or generated by each device is converted into a preset format, and the data protocols of various devices accessed to the system are uniformly configured and managed. Therefore, the difficulty of accessing the system into the new equipment is reduced, the compatibility of the system to different types of equipment is improved, and the equipment is convenient to iteratively update.
In one embodiment, the status management module 21 is further configured to: responding to a control instruction, and acquiring the current occupation condition of target equipment; executing a control instruction under the condition that the occupied condition is that the target equipment is not occupied by other users; or, in the case that the occupancy is that the target device is occupied by other users, the occupancy is fed back to the logic processing module 11.
In this embodiment of the present application, the state management module 21 may directly obtain the current occupancy status of the target device through the abstract port of the interface layer 30 connected to the target device.
In one embodiment, the data protocol parsing module 22 is configured to: and loading a script code file corresponding to the target equipment to obtain an analysis result corresponding to the data, wherein the script code file encapsulates a data analysis protocol corresponding to the target equipment.
In the embodiment of the present application, the data protocol analysis module 22 communicates with the interface layer 30 through the state management module 21, and the data protocol analysis module 22 receives data collected by the device transmitted through the interface layer 30 through the state management module 21 and analyzes the data.
Illustratively, the data protocol parsing module 22 uses an interpreter mode to parse data collected by the device by loading a preset data protocol parsing code.
Optionally, as shown in fig. 3, the data parsing module includes a data transceiving sub-module 222 and a parsing sub-module 221. The data transceiver sub-module 222 communicates with the state management module 21, and is configured to receive data collected by a device from the state management module 21 and transmit the data to the parsing sub-module 221, and receive a parsing result corresponding to the data from the parsing sub-module 221 and send the parsing result to the state management module 21, and send the parsing result to the interaction module 12 of the logic layer 10 through the state management module 21, so as to upload the parsing result to the database 40 and display the parsing result. The parsing sub-module 221 is configured to load a script code file corresponding to the target device, parse the data and obtain a parsing result corresponding to the data, and then send the parsing result to the state management module 21 through the data transceiver sub-module 222.
Further, the parsing sub-module 221 is further configured to check, at the server, an updated device code set for each interval for a preset duration, where the device code set includes script code files corresponding to all devices accessed by the system; and under the condition that the device code set is newly added to the device, acquiring the updated device code set from the server.
Thus, the parsing sub-module 221 performs timing checking on the server, obtains the script code file updated in real time from the server, and performs parsing on the data collected by the device by loading the data parsing protocol code encapsulated in the script code file.
It can be understood that the user can update the data analysis protocol code corresponding to the newly accessed device in real time at the server and encapsulate the data analysis protocol code in the script code file. When the script code needs to be executed each time, the parsing sub-module 221 reloads the script code file, which is different from the language for writing desktop software, which can be run after compiling, and the parsing sub-module 221 can configure or modify the script code file on the server without exiting the software when one or more devices are accessed to the system by adopting an interpreter mode, thereby realizing the function of hot update.
It should be noted that, because the storage space occupied by the script code file is very small, only the code of the data protocol analysis instruction is stored, so the time consumption of each loading is very small and can be ignored. Based on this, the resolution efficiency of the data protocol resolution module 22 is high, so that the data processing efficiency of the device management system 1 is improved as a whole.
In one embodiment, the protocol layer 20 includes a timing module 23, where the timing module 23 is configured to call a callback function when the operation duration of the target device reaches a preset duration, so as to switch the operation state of the target device to stop operation.
It will be appreciated that the timing module 23 is responsible for switching the timer and for some time consuming operations, such as scanning the device or running the device, etc., to prevent the device from falling into endless wait after no response, the current operation of the device is ended by using the timing module 23 to receive a number as the timer duration and a callback function which is invoked when the timer duration has been reached.
Alternatively, the data parsing protocol is written in Java Script language, python language, or Lua language.
In one example, in a system developed in the C language, the JavaScript language may be used to parse the code at the server configuration data protocol, and the parsing sub-module 221 may specifically execute the JavaScript code using a Jint execution engine or a Jurassic execution engine.
In another example, the data protocol parsing code may also be configured at the server using the Python language, and the parsing sub-module 221 may specifically execute Python code using the IronPython (a Python compiler based on NET applications).
In another example, the code may also be parsed at the server configuration data protocol using the Lua language, and then executed using a NeoLua module (a Lua compiler based on NET applications).
In one embodiment, the operation instructions include device scan instructions, device test instructions, device run instructions, and result acquisition instructions. The logic processing module 11 is configured to: responding to the equipment scanning instruction, and generating connection control instructions for all equipment; responding to the equipment test instruction, and generating operation control instructions for all the equipment; generating an operation control instruction for the target device in response to the device operation instruction; and generating a result acquisition control instruction for the target device in response to the result acquisition instruction.
In the embodiment of the present application, for the device scan instruction and the device test instruction, the logic processing module 11 may use a producer-consumer mode to convert the device scan instruction into a connection control instruction for all devices, so as to implement a device connection operation for all devices; and converting the device test instruction into an operation control instruction for all devices so as to realize the execution of device operation on all devices. It can be understood that the target devices corresponding to the device scanning instruction and the device testing instruction are all devices accessed by the system.
The device execution instructions are, for example, instructions initiated by a user requesting execution of a particular target device. The result acquisition instruction may be an instruction automatically generated by the logic processing module 11 to request acquisition of a data result acquired by the target device after the target device performs the corresponding process.
In other examples of the present application, after the device performs the corresponding operation to obtain the data result, the data result may be automatically sent to the data protocol analysis module 22 through the state management module 21, and after the data protocol analysis module 22 analyzes the data result, the analysis result may be sent to the interaction module 12 of the logic layer 10 through the state management module 21.
Alternatively, as shown in FIG. 4, the logic processing module 11 includes a producer thread 111 and a consumer thread 112. In response to the device scan instruction, the producer thread 111 scans the interface layer 30 for the type and number of abstract ports, and generates a plurality of test cases according to the type and number of abstract ports, and sequentially adds the plurality of test cases to the test queue 113; the consumer thread 112 sequentially retrieves test cases from the test queue 113 and performs a connection operation through the state management module 21, and adds devices corresponding to the successfully connected test cases to the connected device set.
Illustratively, the producer thread 111 scans for port types and port numbers supported by the interface layer 30, where the port types may include serial ports, USB ports, and the like. After the scan results are obtained, the ports and all supported device types are formed into test cases and added to the tail of the test queue 113 in sequence. For example, the system may support access to 10 devices, specifically including 6 serial devices and 4 USB devices, and for the scan result of the interface layer 30 is 3 serial ports and 3 USB ports, a total of 30 test cases of 6×3+4×3 are formed and added to the test queue 113 sequentially. The consumer thread 112 reads one test case at a time from the head of the test queue 113, then invokes the functionality of the protocol layer 20 to complete the test, if the test passes, adds the device to which the test case corresponds to the first device set, otherwise continues to read the next test case and perform the test.
In one embodiment, the logic layer 10 further includes an interaction module 12, the interaction module 12 being configured to: generating an operation instruction initiated by a user to target equipment; uploading the analysis result obtained by the protocol layer 20 to the database 40; and displaying an analysis result corresponding to the data acquired by the target equipment.
Illustratively, the interaction module 12 has a UI interface element for a user to initiate operational instructions to the target device. The UI interface unit may further receive an analysis result corresponding to the data collected by the target device from the data analysis module of the protocol layer 20, and upload the analysis result to the database 40; and reading the analysis result corresponding to the stored data acquired by the target device from the database 40 and displaying the analysis result.
In one embodiment, the logic layer 10 further includes a device management module 13, where the device management module 13 is configured to manage device information, and the device information includes at least one of quantity information, type information, and parameter information.
It may be understood that the number information refers to the total number of devices accessed by the device management system 1, the type information refers to port type information of devices accessed by the device management system 1, for example, the port type information may be divided into serial port devices and USB port devices, and the parameter information refers to information such as an operating parameter, a status parameter, and the like of the devices.
Optionally, the device management module 13 is further configured to write the device information into a configuration file, where the configuration file includes a first device set and a second device set, where the first device set is used to write the device information corresponding to all devices of the access system, and the second device set is used to write the device information corresponding to a default started device in all devices of the access system.
Illustratively, the first device set refers to a set formed by all devices that the device management system 1 can access, i.e., a set of devices that the device management system 1 can support; the second device set refers to a set formed by already connected devices, namely a device set which can be normally used after testing, and is a subset of the first device set. The information of the first device set and the second device set is stored in the configuration file respectively.
When the device management system 1 is first started, the second device set is an empty set. The first operation needs to connect with the hardware device by the administrator, then initiates the device scanning instruction through the interaction module 12, and the logic processing module 11 scans all abstract ports of the interface layer 30 to obtain the scanning result. And then, sequentially carrying out connection operation on each device in the first device set through each abstract port in the scanning result, and marking the device as a testable state under the condition of successful connection, otherwise, marking the device as a connection failure state. When connection attempts are made to all devices in the first set of devices, the administrator selects "test device" via the interaction module 12, the system will run the running instructions for each device in turn, and if the device running needs to be set, default parameters are used for setting. And adding the equipment which is successfully tested into the second equipment set according to the test result. Then, at each start-up of the system, the system automatically connects all devices in the second set of devices.
Further, the device management module 13 may also access the background device set at the server at regular time, and update the first device set based on the background device set. The background device set is all device sets that are updated in real time by an administrator on a server and that can be supported by the device management system 1. It will be appreciated that in the case where an administrator updates the background device set, for example, adds a new device, the device management module 13 may obtain the updated background device set from the server, and update the first device set according to the background device set. Therefore, the regular automatic update of all the devices accessed by the system is realized, the device management system 1 does not need to be restarted or manually updated by an administrator, the difficulty of device access is reduced, the management difficulty of the device management system 1 is reduced, and the degree of automation is improved.
In addition, the device management module 13 is also provided with a device information read-write interface, so that the logic processing module 11 can call the device information in the device management module 13. For example, when the system is started, the device information corresponding to the default started device needs to be read, and then the logic processing module 11 may directly read the device information corresponding to the device in the second device set from the configuration file of the device management module 13 through the information read-write interface.
In one embodiment, the state management module 21 employs a single instance mode and provides a unique global access point, i.e., data interworking between the logical layer 10 and the interface layer 30 is achieved by the state management module 21. The state management module 21 can realize the switching of the target equipment between other working states such as an equipment connection state and an equipment running state, and in order to avoid collision, when the logic processing module 11 generates a corresponding control instruction and controls the target equipment to switch the working state through the state management module 21, the working state of the target equipment at the moment is firstly inquired through the state management module 21, and if the current working state of the target equipment collides with the target working state, the current working state information is returned to the logic processing module 11 so that the logic processing module 11 pauses the current target operation of the target equipment; if the current working state of the target device does not conflict with the target working state, executing the control instruction sent by the logic processing module 11.
The embodiment of the application also provides a device management method, and an execution subject of the device management method of the embodiment of the application may be the device management system of the above embodiment of the application.
As shown in fig. 5, the device management method of the embodiment of the present application may include the following steps:
step S101: responding to an operation instruction initiated by a user to target equipment, generating a control instruction to the target equipment, wherein the control instruction is used for executing target operation to the target equipment;
step S102: acquiring the current occupation condition of the target equipment according to the control instruction;
step S103: executing a control instruction under the condition that the occupied condition is that the target equipment is not occupied by other users; or, if the occupation condition is that the target device is occupied by other users, feeding back the occupation condition to the logic processing module.
For example, the operational instructions may be initiated by a user through an interaction module of the logical layer. The execution body of step S101 may be a logic processing module of a logic layer. Specifically, the logic processing module is in communication with the interaction module and is used for receiving the operation instruction generated by the interaction module and generating a control instruction for the target equipment according to the operation instruction. More specifically, in the case where the operation instruction is a device scan instruction, the logic processing module generates a device connection control instruction for all devices to implement a device connection operation for all devices; under the condition that the operation instruction is a device test instruction, the logic processing module generates operation control instructions for all devices so as to realize device test operation for all the devices; when the operation instruction is a device operation instruction, the logic processing module generates an operation control instruction for the target device so as to realize device operation of the target device; and under the condition that the operation instruction is a result acquisition instruction, the logic processing module generates an acquisition control instruction for acquiring data of the target equipment.
The execution body of step S102 and step S103 may be a state management module of a protocol layer, where the state management module is respectively in communication with an abstract port of an interface layer and a logic processing module of a logic layer, and is configured to receive a control instruction generated by the logic processing module, query, based on the control instruction, a current occupation situation of a target device through the abstract port, and in a situation that the target device is currently occupied by another user, the state management module does not execute the control instruction and feeds back the current occupation situation of the target device to the logic processing module; and under the condition that the target equipment is not occupied by other users currently, the state management module executes a control instruction to switch the target equipment to a target working state. The working states of the device may include a "scanning state", a "setting state", an "operating state", and the like. .
According to the device management method, after the control instruction is generated, the occupation condition of the target device is queried by utilizing the interface layer, the control instruction is executed under the condition that the target device is not occupied by other users at present, so that the working state of the target device is converted into the target working state, and the control instruction is not executed under the condition that the target device is occupied by other users at present, therefore, under the condition that a plurality of users use the same target device accessed by the system, the conflict generated by switching of the target device under different working states can be avoided, and the device management stability and reliability are improved.
In one embodiment, step S103 may further include the steps of:
s1031: responding to a result acquisition instruction, and acquiring data acquired by the target equipment from the abstracted port;
s1032: loading a script code file corresponding to the target equipment to analyze the data so as to obtain an analysis result corresponding to the data acquired by the target equipment; the script code file is encapsulated with a data analysis protocol corresponding to the target equipment;
s1033: uploading the analysis result to a database;
step S1034: and displaying the analysis result.
Illustratively, in step S1031, in response to the result acquisition instruction, the state management module of the protocol layer acquires data acquired by the target device through the abstracted port. In step 1032, the script code file corresponding to the target device is obtained from the server through the data protocol analysis module, and the script code file corresponding to the target device is loaded to analyze the data collected by the target device, so as to obtain an analysis result corresponding to the data collected by the target device. After the analysis result is obtained, the data protocol analysis module sends the analysis result to the state management module, and the state management module sends the analysis result to the interaction module of the logic layer. In step S1023 and step S1024, the analysis result is uploaded to the database through the interaction module and the analysis result is displayed.
In the embodiment of the application, the data parsing protocol may be written in Java Script language, python language or Lua language.
According to the embodiment, the script code file is reloaded when the script code is needed to be executed each time by the data protocol analysis module, and the data protocol analysis module can configure or modify the script code file on a server under the condition that the software is not exited when one or more devices are accessed to the system by adopting an interpreter mode, so that the function of hot update is realized.
Fig. 6 shows a block diagram of a device management terminal according to an embodiment of the present application. As shown in fig. 6, the device management terminal includes: a memory 601 and a processor 602, the memory 601 storing instructions executable on the processor 602. The processor 602, when executing the instructions, implements the device management method in the above embodiment. The number of memories 601 and processors 602 may be one or more. The device management terminal is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The device management terminal may also represent various forms of mobile apparatuses such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing apparatuses. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the application described and/or claimed herein.
The device management terminal may further include a communication interface 603, configured to communicate with an external device for performing data interactive transmission. The various devices are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor 602 may process instructions executing within the device management terminal, including instructions stored in or on memory to display graphical information of a GUI on an external input/output apparatus, such as a display device coupled to an interface. In other embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, a plurality of device management terminals may be connected, each device providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in fig. 6, but not only one bus or one type of bus.
Alternatively, in a specific implementation, if the memory 601, the processor 602, and the communication interface 603 are integrated on a chip, the memory 601, the processor 602, and the communication interface 603 may perform communication with each other through internal interfaces.
It should be appreciated that the processor may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or any conventional processor or the like. It is noted that the processor may be a processor supporting an advanced reduced instruction set machine (Advanced RISC Machines, ARM) architecture.
The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, from one website, computer, training device, or data center via a wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
Computer-readable storage media, including both non-transitory and non-transitory, removable and non-removable media, may 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 physical classes 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, or other magnetic storage media that can be used to store information that can be accessed by a computing device. Computer-readable Media, as defined herein, does not include non-Transitory computer-readable Media (transmission Media), such as modulated data signals and carrier waves.
Program code for carrying out methods of the present application may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, provided that the desired results of the technical solutions of the present application are achieved, and are not limited herein. The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think of various changes or substitutions within the technical scope of the present application, and these should be covered in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (13)

1. A device management system, comprising;
an interface layer comprising at least one type of abstracted port for interacting with device data accessing the system;
the logic layer comprises a logic processing module, wherein the logic processing module is used for generating a control instruction for target equipment according to an operation instruction initiated by a user to the target equipment;
The protocol layer comprises a state management module and a data protocol analysis module, wherein the state management module is communicated with the abstract port and the logic processing module and is used for executing the control instruction under the condition that the target equipment is not occupied by other users currently according to the control instruction received from the logic processing module; the data protocol analysis module is communicated with the state management module and is used for receiving data acquired by the target equipment through the state management module and analyzing the data to obtain an analysis result.
2. The device management system of claim 1, wherein the status management module is further configured to:
responding to the control instruction, and acquiring the current occupation condition of the target equipment;
executing the control instruction under the condition that the occupied condition is that the target equipment is not occupied by other users; or feeding back the occupation condition to the logic processing module under the condition that the occupation condition is that the target equipment is occupied by other users.
3. The device management system of claim 1, wherein the data protocol parsing module is further configured to:
And loading a script code file corresponding to the target equipment to obtain an analysis result corresponding to the data, wherein the script code file encapsulates a data analysis protocol corresponding to the target equipment.
4. The device management system of claim 1, wherein the data protocol parsing module comprises a data transceiver sub-module and a parsing sub-module;
the data receiving and transmitting sub-module is communicated with the state management module and is used for receiving data acquired by the target equipment from the state management module and sending the data to the analysis sub-module, and receiving the analysis result from the analysis sub-module and sending the analysis result to the state management module;
the analysis submodule is used for loading script code files corresponding to the target equipment so as to analyze the data and obtain analysis results corresponding to the data.
5. The device management system of claim 4, wherein the parsing sub-module is further configured to:
checking and updating a device code set at a server for each interval preset time length, wherein the device code set comprises script code files corresponding to all devices accessed by the system; and under the condition that the device code set is newly added into the device, acquiring the updated device code set from the server.
6. The device management system according to claim 1, wherein the protocol layer includes a timing module, and the timing module is configured to call a callback function to switch the operation state of the target device to stop operation if the operation duration of the target device reaches a preset duration.
7. The device management system of claim 1, wherein the operation instructions include device scan instructions, device test instructions, device run instructions, and result acquisition instructions; the logic processing module is configured to:
responding to the equipment scanning instruction, and generating connection control instructions for all equipment;
responding to the equipment test instruction, and generating operation control instructions for all equipment;
generating an operation control instruction for the target device in response to the device operation instruction;
and responding to the result acquisition instruction, and generating a result acquisition control instruction for the target equipment.
8. The device management system of claim 1, wherein the logic layer further comprises an interaction module to:
generating an operation instruction initiated by a user to target equipment;
Uploading the analysis result obtained by the protocol layer to a database;
and displaying an analysis result corresponding to the data acquired by the target equipment.
9. The device management system of claim 1, wherein the logic layer further comprises a device management module for managing device information including at least one of quantity information, type information, and parameter information; the device management module is further configured to write device information into a configuration file, where the configuration file includes a first device set and a second device set, the first device set is configured to write device information corresponding to all devices accessing the system, and the second device set is configured to write device information corresponding to devices activated by default in all devices accessing the system.
10. A device management method, comprising:
responding to an operation instruction initiated by a user to target equipment, and generating a control instruction to the target equipment, wherein the control instruction is used for executing target operation to the target equipment;
acquiring the current occupation condition of the target equipment according to the control instruction;
executing the control instruction under the condition that the occupied condition is that the target equipment is not occupied by other users; or feeding back the occupation condition to a logic processing module under the condition that the occupation condition is that the target equipment is occupied by other users.
11. The device management method according to claim 10, wherein the control instruction includes a result acquisition instruction; executing the control instruction, including:
responding to the result acquisition instruction, and acquiring data acquired by the target equipment from an abstracting port;
loading a script code file corresponding to the target equipment to analyze the data to obtain an analysis result corresponding to the data acquired by the target equipment; the script code file is packaged with a data analysis protocol corresponding to the target equipment;
uploading the analysis result to a database; and displaying the analysis result.
12. A device management terminal, comprising: comprising a processor and a memory, the memory storing instructions that are loaded and executed by the processor to implement the method of claim 10 or 11.
13. A computer readable storage medium having stored therein a computer program which, when executed by a processor, implements the method of claim 10 or 11.
CN202310466485.2A 2023-04-26 2023-04-26 Device management system, method, terminal and storage medium Pending CN116506376A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310466485.2A CN116506376A (en) 2023-04-26 2023-04-26 Device management system, method, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310466485.2A CN116506376A (en) 2023-04-26 2023-04-26 Device management system, method, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN116506376A true CN116506376A (en) 2023-07-28

Family

ID=87326038

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310466485.2A Pending CN116506376A (en) 2023-04-26 2023-04-26 Device management system, method, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN116506376A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116896576A (en) * 2023-09-07 2023-10-17 天津晨星衡祥科技有限公司 Intelligent teaching method, system, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116896576A (en) * 2023-09-07 2023-10-17 天津晨星衡祥科技有限公司 Intelligent teaching method, system, equipment and storage medium
CN116896576B (en) * 2023-09-07 2023-12-26 天津晨星衡祥科技有限公司 Intelligent teaching method, system, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108037961B (en) Application program configuration method, device, server and storage medium
US7739693B2 (en) Generic application program interface for native drivers
CN111666129B (en) Container mirror image processing method, electronic device, storage medium and system
CN108628626B (en) Development environment building method, code updating method and device
CN116506376A (en) Device management system, method, terminal and storage medium
US20230350831A1 (en) Bandwidth allocation method and apparatus for pcie external plug-in card, and device and storage medium
CN111274512A (en) Page loading method, device and medium
CN115080479B (en) Transmission method, server, device, bare metal instance and baseboard management controller
CN111651169A (en) Block chain intelligent contract operation method and system based on web container
CN103595769A (en) Method and device for achieving file uploading through SDK
CN110083366B (en) Application running environment generation method and device, computing equipment and storage medium
CN112699027A (en) Interface testing method, device, equipment and readable storage medium
CN110825622A (en) Software testing method, device, equipment and computer readable medium
US20240126627A1 (en) Method and apparatus for obtaining information of stack frame in call stack, device, and medium
CN116795679A (en) Web application testing method and device, electronic equipment and storage medium
CN115309657A (en) Method, device, medium and program product for providing test case
CN115118587A (en) Method and device for creating connector
CN113391809A (en) Static resource file processing method and device, electronic equipment and storage medium
CN114003257A (en) Upgrading method and device
US10402454B1 (en) Obtaining platform-specific information in a firmware execution environment
US20240160427A1 (en) System and method of offloading and migrating management controller functionalities using containerized services and application thereof
CN111767093B (en) Data processing method, apparatus and storage medium
CN114816385B (en) Integration method, device and equipment of heterogeneous system and storage medium
CN116700827A (en) Loading method, device and medium for enumeration data
US20230102570A1 (en) System and method for scripting generators

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