A chemical safety case configuration device, method and equipment
By designing a chemical safety use case configuration device, it automatically obtains and stores use case packages and configuration files, and automatically executes use cases according to the equipment operating environment. This solves the problem of errors caused by relying on manual operations for chemical equipment use case configuration in the existing technology, and realizes automation. The configuration reduces the error rate.
Patent Information
- Application Number
- CN202311646038.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-04
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2043-12-04
AI Technical Summary
In the prior art, the chemical safety use cases of chemical equipment mainly rely on manual operations, resulting in high error rates, especially during remote maintenance due to communication delays or failures, which leads to the use cases being untimely equipped.
Design a chemical safety use case configuration device, including a configuration unit, a storage unit, a startup unit and an execution unit. By automatically obtaining and storing the use case package and configuration file, it can determine whether the equipment operating environment meets the use case startup conditions, and automatically execute the conditions that meet the conditions. use cases.
It realizes the automatic configuration of chemical safety use cases, reduces dependence on manual operations, and reduces use case configuration execution errors caused by manual operations.
Smart Images

Figure CN117648119B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical fields of data communication, intelligent operation of equipment functions, and safety management, and in particular to a chemical safety use case configuration device, method, and equipment. Background Art
[0002] At present, for the intelligent solution of industrial equipment, the realization of various functions or services is controlled by configuring corresponding management and control programs, especially chemical equipment. Among them, the management and control programs are mostly modular structures, which is conducive to the upgrade of various modules and the addition of new modules. Based on the modular idea, corresponding to the various functions or services to be realized by the equipment, multiple use cases can be stored on the equipment, and different use cases can realize different functions or sub-functions during the operation of the equipment. These use cases include: monitoring use cases of certain actions, timed startup use cases, test use cases, data collection use cases, fault handling use cases, performance allocation use cases, master-slave switching use cases, etc.
[0003] The required use cases can be called and instantiated (instantiation means passing the corresponding parameters into the use cases) at the required time or under the required conditions by configuring chemical safety use cases, so that the equipment can execute the use cases to realize the corresponding functions. Among them, some use cases can be relatively independent and can be started and called under certain conditions to realize their functions. Among them, some use cases can also have logical associations. For example, the output of the first use case will be used as the input of the second use case. These use cases need to be configured in a certain order, and the use cases cooperate with each other to realize the desired functions.
[0004] At present, the configuration of chemical safety use cases on equipment mainly relies on manual operation. Generally, the safety manager needs to install the required use cases first. After the use cases are installed on the equipment, the safety manager can manually perform the chemical safety use case configuration work, such as manually performing the chemical safety use case configuration at a fixed time or at a fixed point according to the use case startup strategy. However, this manual operation method for chemical safety use case configuration often leads to unnecessary mistakes. For example, the safety manager fails to perform the chemical safety use case configuration at the specified time, or fails to configure multiple use cases according to the predetermined configuration strategy (such as the sequential call of multiple use cases with associated relationships). These will affect the realization of the corresponding functions of the equipment. For example, when the safety manager performs remote maintenance, the manual configuration of the use case may be delayed due to possible communication delays, failures, etc.
[0005] In view of this, how to enable the device to automatically configure use cases to reduce dependence on manual operations is a technical problem that needs to be solved. Summary of the invention
[0006] In view of the above problems in the prior art, the present application provides a chemical safety use case configuration device, method, equipment, and computing device, which can enable the device to realize automatic configuration of use cases, reduce dependence on manual operation, and reduce errors in the execution of chemical safety use case configuration caused by manual operation.
[0007] To achieve the above-mentioned objectives, the first aspect of the present application provides a chemical safety use case configuration device, including a configuration unit, a storage unit, a startup unit and an execution unit, wherein: the configuration unit is used to obtain a use case package and a corresponding configuration file, and to store the use case package together with the configuration file in the storage unit after release; wherein the content recorded in the configuration file includes the startup conditions of the use case; the startup unit is used to determine whether the operating environment of the equipment meets the startup conditions of the use case recorded in the configuration file, and send the corresponding use case information to the execution unit; the execution unit is used to execute the received use case that meets the startup conditions.
[0008] As described above, after the configuration unit obtains and stores the use case and configuration file, the startup unit can automatically start the use case to be executed, and the execution unit can execute it, thereby realizing the automation of chemical safety use case configuration and reducing dependence on manual operation, so as to reduce errors in chemical safety use case configuration execution caused by manual operation.
[0009] As a possible implementation manner of the first aspect, the content recorded in the configuration file also includes information on input parameters required by the use case; the execution unit is further used to obtain the input parameters required by the use case and load the parameters into the use case for execution.
[0010] From the above, the use case can obtain the information of the required input parameters when executing based on the records in the configuration file, so that the use case can be executed smoothly.
[0011] As a possible implementation manner of the first aspect, the content recorded in the configuration file also includes an execution mode of the use case; and the execution unit is further configured to execute the use case according to the execution mode.
[0012] From the above, based on the execution mode recorded in the configuration file, automatic execution based on the mode can be achieved. For example, the execution mode is: single execution once and then exit, single execution once and then restart after exit, execution twice with an interval of 1 minute and then exit, etc.
[0013] As a possible implementation manner of the first aspect, the execution unit is further configured to put the use case information sent by the starting unit into a task queue to execute the use case in the task queue.
[0014] As described above, the method based on task queue is conducive to the configuration of each use case to be started and executed. Among them, the types of task queues include real-time task queues and non-real-time task queues, and different task queues can be used to adopt different configuration methods for tasks in the queues.
[0015] As a possible implementation method of the first aspect, it also includes at least one of the following: a monitoring unit, used to monitor the execution process of the chemical safety use case configuration to obtain monitoring information; a log unit, used to store various execution logs generated during the execution of the configuration job.
[0016] From the above, through the monitoring unit, the execution process of the configured use case can be monitored, the operating resources and operating events occupied by the use case can be obtained, and an alarm can be issued in case of abnormality, and the alarm can be fed back to the configuration unit for processing. The information is recorded by the log unit, which is convenient for users to view these logs when needed. The log content basically includes the time and the corresponding event. In addition, different levels of detail can be recorded according to the importance of the event.
[0017] The second aspect of the present application provides a chemical safety use case configuration method, using any chemical safety use case configuration device described in the first aspect, the method comprising: a configuration unit obtains a use case package and a corresponding configuration file from a use case warehouse, and stores the use case package together with the configuration file into a storage unit after releasing it; wherein the content recorded in the configuration file includes the start-up conditions of the use case; when the start-up unit determines that the operating environment of the equipment meets the start-up conditions of the use case recorded in the configuration file, the corresponding use case information is sent to the execution unit; the execution unit executes the received use case that meets the start-up conditions.
[0018] As a possible implementation method of the second aspect, the content recorded in the configuration file also includes information on input parameters required for the use case; the execution unit executes the received use case that meets the startup conditions, including: the execution unit obtains the input parameters required for the use case according to the configuration file, loads the parameters into the use case, and executes the use case.
[0019] As a possible implementation of the second aspect, the execution unit executes the received use case that meets the startup condition, including: the execution unit puts the use case information sent by the startup unit into a task queue; the execution unit executes the use case in the task queue.
[0020] The third aspect of the present application provides a device, comprising: a chemical safety use case configuration device as described in any one of the first aspects, a data center unit, a use case management unit, and a use case warehouse, wherein: the data center unit is used to receive and inspect use case packages; the use case management unit is used to manage the use case warehouse, and the management includes: storing the use case packages that have passed the inspection of the data center unit into the use case warehouse, and reading the use case packages from the use case warehouse and providing them to the chemical safety use case configuration device.
[0021] The fourth aspect of the present application provides a computing device, comprising: a processor, and a memory, on which program instructions are stored, and when the program instructions are executed by the processor, the processor executes the chemical safety use case configuration method described in any one of the second aspects.
[0022] In a fifth aspect, the present application provides a computer-readable storage medium having program instructions stored thereon, wherein when the program instructions are executed by a computer, the computer implements any of the methods described in the first aspect above, or, when the program instructions are executed by the computer, the computer implements the chemical safety use case configuration method described in any of the second aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a schematic diagram of a chemical safety use case equipment provided in the first embodiment of the present application;
[0024] Figure 2 It is a flow chart of a chemical safety use case configuration method provided in the second embodiment of the present application;
[0025] Figure 3 It is a structural diagram of the computing device provided by this application.
[0026] It should be understood that the size and shape of each block diagram in the above structural diagram are for reference only and should not constitute an exclusive interpretation of the embodiment of the present invention. The relative position and inclusion relationship between the blocks presented in the structural diagram are only schematic representations of the structural association between the blocks, and do not limit the physical connection method of the embodiment of the present invention. DETAILED DESCRIPTION
[0027] The technical solution provided by the present application is further described below with reference to the accompanying drawings and examples. It should be understood that the system structure and business scenarios provided in the examples of the present application are mainly to illustrate the possible implementation methods of the technical solution of the present application and should not be interpreted as the only limitation on the technical solution of the present application. It is known to those of ordinary skill in the art that with the evolution of the system structure and the emergence of new business scenarios, the technical solution provided by the present application is also applicable to similar technical problems.
[0028] It should be understood that the chemical safety use case configuration scheme provided in the embodiments of the present application includes a chemical safety use case configuration device, a configuration method, and equipment applied to the configuration device or the configuration method. Since the principles of solving the problems in these technical solutions are the same or similar, some repetitions may not be repeated in the introduction of the following specific embodiments, but it should be regarded as that these specific embodiments have been referenced to each other and can be combined with each other.
[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of this application. In the event of any inconsistency, the meaning described in this specification or the meaning derived from the contents recorded in this specification shall prevail. In addition, the terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application. In order to accurately describe the technical content in this application and to accurately understand the present invention, the following explanations or definitions are given to the terms used in this specification before describing the specific embodiments:
[0030] 1) Use case: refers to executable code that can realize a certain function and is encapsulated as a module. Usually, a use case can realize one or a class of functions. Multiple use cases can be combined to realize a function. During the operation of the device, one or more use cases can be called to realize the corresponding functions. Use cases include: parameter comparison use case, test use case, data analysis use case, data conversion use case, fault handling use case, performance allocation use case, master-slave switching use case, etc.
[0031] 2) Instantiation of use cases: In this application, use cases are stored in the use case warehouse of the device in the form of file packages. The file packages of use cases can also be called use case packages. Use cases are not bound to specific input parameters, but only provide input and output interfaces for parameters. Specific input parameters are provided in the form of configuration files. The use of use cases and configuration files facilitates the sharing or reuse of use cases when implementing different functions.
[0032] In some cases, some use cases can be directly called and executed without input parameters. In some cases, some use cases need to configure input parameters to achieve a certain function on the premise of obtaining input parameters. Therefore, when calling these use cases, a configuration file must be provided at the same time. The configuration file records the relevant information of the input parameters required by the use case, such as: defining the type or name of these parameters, or defining which state quantities these parameters are generated during the operation of the device, or defining the location where the parameters are obtained (such as directory, folder, address, etc.), or defining which output of the previously run use case the parameters come from, or defining which component the parameters come from (such as a sensor), etc. The use case obtains specific parameters based on the configuration file to perform the corresponding function, that is, the use case has executable properties based on the configuration file. Here, providing the configuration file to the use case to make the use case executable is called the instantiation of the use case.
[0033] In addition, in addition to information related to input parameters, the content of the configuration file can also include other parameters required by the use case, such as the starting conditions for the execution of the use case (these can also be regarded as input parameters required by a special use case), the execution mode when the use case is executed, etc., which will be described later.
[0034] 3) Use Case Repository: In this application, it refers to the database that stores each use case. The use case repository can be located on the device, which can be called a local use case repository. The use case repository can also be located remotely from the device, such as in the cloud or on a remote server, which can be called a remote use case repository.
[0035] 4) File system: It is a technology for organizing and allocating the space of file storage devices. The functions of the file system include managing and configuring the storage space of files, providing the logical structure, physical structure and storage method of files, etc. For example, the Ext file system used by the Linux system, the NTFS file system used by the Windows system, and the HFS file system used by Apple's IOS system.
[0036] The chemical safety use case configuration scheme provided by the present application is mainly used for chemical system equipment, and the equipment automatically configures the use cases deployed on it. Among them, it can also be industrial equipment, such as mining equipment, water conservancy equipment, etc., and can also be applied to some small equipment, such as intelligent control equipment for building air ducts, etc. These devices store multiple use cases, and implement some functions or services by calling and loading use cases during operation. Through the chemical safety use case configuration scheme of the present application, these devices can automatically configure one or more use cases to implement one or a series of multiple functions or services. Below, the scheme of the present application will be introduced in detail in conjunction with the accompanying drawings.
[0037] Figure 1The schematic diagram of the structure of the first embodiment of the present application is shown. The first embodiment is a chemical safety use case configuration device. When used in a device, it can realize the automatic configuration of the device for multiple use cases to realize the functions corresponding to the use cases. The configuration device includes a configuration unit 10, a storage unit 20, a startup unit 30, an execution unit 40, a monitoring unit 50 and a log unit 60. Figure 1 The chemical safety use case equipment is introduced in detail:
[0038] The configuration unit 10 is used to obtain the required use case packages and corresponding configuration files from the outside (such as a use case warehouse) according to the series of functions to be executed or the business to be realized on the device, and release these use case packages to the storage unit 20, and store the corresponding configuration files in the storage unit 20. The released use cases and corresponding configuration files form an instantiated use case. The configuration unit 10 is also used to control the coordination of the startup unit 30, the execution unit 40, the monitoring unit 50 and the log unit 60. For example, the configuration unit 10 is also used to manage the above-mentioned contents stored in the storage unit 20, such as adding, deleting, modifying, querying, etc.
[0039] Among them, the storage unit 20 is used to store the released use cases and configuration files, wherein the configuration file may record the identifier of the use case package of the relevant use case, the information of the input parameters required for the use case, the start conditions of the use case, etc., wherein the information of the input parameters required for the use case includes the parameter type and name, the source of the parameter (for example, the location where the parameter is obtained, or which previously run use case these parameters come from), etc.
[0040] Among them, the startup unit 30 can obtain the operating environment data of the device, including data that can be monitored during the operation of the device, such as information that can be directly obtained by sensors, time information, and status information during the operation of the device. The startup unit 30 also obtains the startup conditions of each use case from the above-mentioned configuration file, and directly or indirectly determines whether the startup conditions configured for a certain use case are met based on the obtained operating environment data. When it is determined that the startup conditions are met, the information of the corresponding use case is sent to the execution unit.
[0041] Among them, the start conditions may include: time-related start conditions, such as the time required for timed start, the time interval between the periodic start and the previous start; event-related start conditions, such as whether a specific message sent by the message center is received, whether an abnormal alarm is generated, whether the equipment operating status reaches a specific state, whether the related prior use case outputs information (this information can be used as the start condition for the subsequent use case), etc.
[0042] The execution unit 40 is used to sequentially execute each use case that meets the start condition. In this example, the execution unit 40 uses a task queue to execute each use case that meets the start condition in the task queue. Specifically, the task queue stores information of the use cases that meet the start condition confirmed by the start unit 30, and the execution unit 40 sequentially executes each use case in the task queue.
[0043] Among them, the types of task queues include real-time task queues and non-real-time task queues. For real-time task queues, the use cases in the queue are executed using the configuration strategies of First Input First Output (FIFO) and priority encroachment, that is, the same priority is executed according to the first-in-first-out or time slice rotation, and different priorities are encroached; for non-real-time task queues, the use cases in the queue are executed according to the completely fair configuration method. Correspondingly, the configuration file records whether the corresponding use case belongs to a real-time task or a non-real-time task, so that it can be placed in the corresponding task queue.
[0044] When the configuration file records the information of the input parameters required by the use case (such as parameter type and name, source of parameters, etc.), the execution unit 40 also obtains these required input parameters, loads these parameters into the use case, and the use case uses these input parameters to perform its functions.
[0045] The execution unit 40 also obtains the execution mode corresponding to each use case from the configuration file stored in the storage unit 20, and the execution mode is, for example: single execution once and then exit, single execution once and then restart, execution twice with an interval of 1 minute and then exit, etc. When executing a use case, the execution unit can execute according to the execution use case configured in its configuration file.
[0046] Among them, since the storage unit 20 stores the released use cases and configuration files, the information of each use case stored in the task queue here can be a corresponding pointer pointing to the corresponding use case and configuration file in the storage unit 20.
[0047] Among them, the monitoring unit 50 is used to monitor the execution process of the chemical safety use case configuration to obtain monitoring information. For example, it includes: monitoring the execution process of the configured use case, obtaining the operating resources and operating events occupied by the use case, and generating alarm information when it is judged that the operating resources exceed the alarm threshold or the operating event contains an abnormal startup event. And the abnormal results such as alarm information can be transmitted to the configuration unit 10, so that the configuration unit 10 can terminate, restart, delete, etc. the current use case. The operation can be directly executed by the configuration unit 10, or the configuration unit 10 can control the execution unit 40 to execute.
[0048] The occupied operation resources include: CPU usage, memory usage, operation time, etc. during the operation of the configured use case. When the alarm threshold is exceeded, an alarm is written to the log. When the fatal threshold is exceeded, an alarm message is generated and transmitted to the configuration unit 10. The operation events include: whether an abnormal startup occurs, whether abnormal data is generated, whether a data acquisition error or output error occurs, etc.
[0049] The log unit 60 is used to store various execution logs generated during the execution of the configuration operation, including the monitoring information of the monitoring unit 50, the execution process information of the execution unit 40, the configuration process information of the configuration unit 10, the startup information of the startup unit 30, etc. The log content basically includes the time and the corresponding event, and different levels of detail can be recorded according to the importance of the event.
[0050] Figure 2 The flowchart of the second embodiment of the present application is shown. The second embodiment is a method for configuring a chemical safety use case, which realizes automatic configuration of the use case based on the above-mentioned chemical safety use case configuration device. Figure 2 , the chemical safety use case configuration method is described in detail, the method comprises the following steps:
[0051] S10: The configuration unit 10 obtains the use case package and the corresponding configuration file from the use case repository, and releases them to the storage unit 20.
[0052] Specifically, the configuration unit 10 obtains the required use case packages and corresponding configuration files from the use case warehouse according to the series of functions to be executed or the services to be realized on the device, releases these use case packages to the storage unit 20, and stores the corresponding configuration files in the storage unit 20. The released use cases and corresponding configuration files form instantiated use cases.
[0053] In some embodiments, the function or service to be executed on the device is derived from the service logic of the device itself. In other embodiments, the function or service to be executed on the device is derived from the user's instruction. For example, the configuration unit 10 receives the user's instruction information, which indicates the series of functions or services to be implemented by the device.
[0054] In some embodiments, the use cases and configuration files used to implement a certain function or service can be pre-configured based on the function or service identification, and this information can be stored in the database of the device. Thus, the configuration module can determine the use cases and configuration files required to implement a certain function or service based on the pre-configured information.
[0055] The use case repository may be a local use case repository or a remote use case repository.
[0056] S20: When the starting unit 30 determines that a certain use case in the storage unit 20 meets the starting condition of a certain use case, the starting unit 30 sends the information of the corresponding use case to the execution unit 40.
[0057] Specifically, the startup unit 30 obtains the above-mentioned configuration files from the storage unit 20, and parses to obtain the startup conditions of each use case configured in each configuration file. The startup unit 30 also obtains the operating environment data of the device in real time, and determines whether the startup conditions of a certain use case are met based on the obtained operating environment data. When the startup conditions are met, the information of the corresponding use case is sent to the execution unit 40.
[0058] In some embodiments, the operating environment data of the device includes data that can be monitored during the operation of the device, such as information that can be directly obtained by sensors, time information, and status information of the device during operation.
[0059] In some embodiments, the start conditions may include: time-related start conditions, such as the time required for a scheduled start, the time interval between a periodic start and the previous start; event-related start conditions, such as whether a specific message sent by a message center is received, whether an abnormal alarm is generated, whether the equipment operating status reaches a specific status, whether the relevant prior use case outputs information, etc.
[0060] Among them, the starting conditions of different use cases may be different, and the starting condition may be the union or intersection of multiple conditions.
[0061] S30: The execution unit 40 receives the information of the use case and puts it into the task queue, and executes the use case in the task queue.
[0062] Specifically, the execution unit 40 receives the use case information sequentially sent by the start unit 30 through a task queue. For example, a FIFO task queue may be used to receive each use case information, and each use case in the task queue is executed sequentially.
[0063] The use case information in the task queue may be a corresponding pointer to each use case, and the pointer points to a corresponding use case and configuration file in the storage unit.
[0064] When the execution unit executes a use case, it can locate the corresponding use case and configuration file in the storage unit according to the pointer, load the configuration file for the use case, and run the use case.
[0065] S40: The monitoring unit 50 is used to monitor the execution process of the chemical safety use case configuration to obtain monitoring information, and when an abnormality is detected, it reports it to the configuration unit 10 according to a pre-configured strategy so that the configuration unit 10 can perform corresponding processing.
[0066] For example, this step may include: monitoring the execution process of the configured use case, obtaining the operating resources and operating events occupied by the use case, and generating alarm information to the configuration unit when it is determined that the operating resources exceed the alarm threshold or the operating events include abnormal startup events.
[0067] The configuration unit 10 performs corresponding processing including: terminating, restarting, deleting, and other operations on the current use case.
[0068] Furthermore, in each of the above steps, the execution logs generated during the configuration job execution are stored by the log unit 60, including log records of the processing process of the configuration unit 10, the execution process of the execution unit 40, and the like.
[0069] The third embodiment of the present application also provides a device, which includes the above-mentioned chemical safety use case configuration device. The device can realize corresponding functions or services by automatically configuring use cases. The implementation process of the function or service does not require the user to manually configure the corresponding use case.
[0070] The device includes: a use case service unit, a use case management unit, a chemical safety use case equipment and configuration device, a data center unit, and a local use case warehouse and database built on its underlying file system. Among them, the use case service unit, the use case management unit, the chemical safety use case equipment and configuration device, and the data center unit can communicate through the data bus (DATA BUS) to transmit instructions and data. The use case management unit can access the local use case warehouse or access the remote use case warehouse at the far end of the device. The data center unit can access the database. The use case service unit can communicate with the remote agent unit at the far end of the device, and the remote agent unit can be deployed on the remote user terminal to enable the user to remotely access the device. The following is a detailed introduction to the relevant units:
[0071] Among them, the use case management unit is used to manage the use case warehouse, including updating (such as adding, deleting, modifying) use cases, corresponding query and providing use cases, etc. For example, according to the function of the equipment or the needs of the business, the use case that realizes the corresponding function or business is read from the use case warehouse and provided to the chemical safety use case configuration device, or in response to the chemical safety use case configuration device or safety management instructions, the use case is read from the use case warehouse and provided to the chemical safety use case configuration device. For another example, in response to the instructions of the data center unit, the new use case package provided by the data center unit is stored in the use case warehouse.
[0072] The data center unit is used to receive external use case package data, and can call the database coupled to it to perform a validity check on the use case package, and instruct the use case management unit to store the use case package in the use case warehouse when it is determined to be legal. The database coupled to the data center stores verification information, which is used to verify the integrity, legality, and executableness of the use case package. For example, the verification information may include an MD5 algorithm for verifying integrity, an authentication algorithm for verifying legality, a verification environment and a verification instance for verifying executableness, and the like.
[0073] The use case service unit can be used to communicate with the remote agent unit at the far end of the device through its designated interface. The remote agent unit can be located at the user terminal side at the far end, such as a program unit of the security management application on the user terminal. Thus, the device can communicate with the user terminal at the far end through the use case service unit, and realize the user's remote access, maintenance and other operations on the device. Such operations can include related operations on the chemical safety use case configuration device, such as sending instructions such as functions and services to be performed by the device so that the chemical safety use case configuration device responds to the instructions, and querying or adding and deleting use cases corresponding to a certain function or service that have been arranged in the chemical safety use case configuration device. Such operations can also include related operation instructions on the use case package in the use case warehouse, such as query, modification, etc., wherein the use case management unit will respond to the relevant operation instructions, scope the use case warehouse and feedback the user with relevant results.
[0074] The following are some examples of interfaces of some use case service units:
[0075] The first type of interface receives instructions mainly related to the working status of the chemical safety use case equipment, such as the following examples 1)-2):
[0076] 1) Start the background service interface to receive the startup instruction of the device for the chemical safety use case input by the user;
[0077] 2) Stop background service interface, used to receive the stop instruction input by the user for the chemical safety use case configuration device;
[0078] The second type of interface receives instructions mainly related to operations on the use case package, such as the following examples 3)-7):
[0079] 3) Obtaining a software package interface for receiving a use case package for creating a configuration job sent by a remote agent unit;
[0080] 4) Use case package upload interface, used to upload the acquired use case package;
[0081] 5) View the use case package information interface, which is used to query the name, label, update and addition time, entry file or configuration strategy of the use case package;
[0082] 6) Delete use case package interface, used to receive use case package deletion instructions;
[0083] 7) The interface for storing and loading use case packages is used to receive instructions for storing and loading use case packages;
[0084] The third type of interface, the received instructions mainly involve the management of configuration operations in the configuration device of the chemical safety use case, such as the following examples 8)-12):
[0085] 8) Start the use case package instance interface to receive job configuration instructions;
[0086] 9) View the use case operation information interface, which is used to receive the operation status query instruction input by the user for the created configuration job;
[0087] 10) Pause the use case instance running interface, used to receive the pause instruction for the configuration operation input by the user;
[0088] 11) The running instance interface of the use case reply is used to receive the recovery instructions for the configuration job input by the user;
[0089] 12) Delete the use case running instance, which is used to receive the deletion instruction for the configuration job input by the user.
[0090] The present application also provides an embodiment in which a user uploads a use case package to a use case warehouse of a device. In this embodiment, the use case service unit obtains the use case package from the remote agent unit and saves the use case package to the use case warehouse, and the use case management unit needs to perform statistics and record the stored use case package for subsequent management and use. This embodiment includes the following process:
[0091] First, the remote proxy unit will link with the use case service unit, the use case service unit will receive the use case package sent by the remote proxy unit with which the link relationship is established, and send the use case package to the data center unit.
[0092] Secondly, the data center unit will call the relevant verification information in the database to verify the integrity, legality, and executableness of the use case package.
[0093] Again, after the inspection is passed, the data center unit sends an inspection pass indication to the use case management unit.
[0094] Afterwards, the use case management unit creates a storage path in the local use case repository for the use case package, and saves the use case package to the local use case repository of the file system. The use case package can be saved in the form of a mirror file.
[0095] After that, the file system feedback use case management unit is loaded after the save is completed.
[0096] Afterwards, the use case management unit will register the loading result of the use case package and feed back the loading operation result to the remote agent unit through the use case service unit.
[0097] It should be noted that after the use case package is loaded, the use case service unit can also receive management instructions for the use case package and transmit the management instructions to the use case management unit so that the use case package stored in the local use case repository can be deleted or modified through the use case management unit. The specific operation method is roughly the same as the loading process of the use case report, and will not be repeated in this implementation.
[0098] The use case service unit in this embodiment can also receive the startup instruction for the chemical safety use case configuration device sent by the remote agent unit, and send the startup instruction to the chemical safety use case configuration device. The chemical safety use case configuration device switches from the sleep state to the startup state according to the startup instruction.
[0099] Figure 3 6 is a schematic structural diagram of a computing device 600 provided in an embodiment of the present application. The computing device may be the above method or its various optional embodiments, and the computing device may be a terminal, or a chip or chip system inside the terminal. Figure 3 As shown, the computing device 600 includes: a processor 610 , a memory 620 , and a communication interface 630 .
[0100] It should be understood that Figure 3 The communication interface 630 in the computing device 600 shown may be used to communicate with other devices, and may specifically include one or more transceiver circuits or interface circuits.
[0101] The processor 610 may be connected to a memory 620. The memory 620 may be used to store the program code and data. Therefore, the memory 620 may be a storage unit inside the processor 610, or an external storage unit independent of the processor 610, or a component including a storage unit inside the processor 610 and an external storage unit independent of the processor 610.
[0102] Optionally, the computing device 600 may further include a bus. The memory 620 and the communication interface 630 may be connected to the processor 610 via the bus. The bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3A line without an arrow is used to represent the bus, but this does not mean that there is only one bus or one type of bus.
[0103] It should be understood that in the embodiment of the present application, the processor 610 can adopt a central processing unit (CPU). The processor can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. Or the processor 610 uses one or more integrated circuits to execute related programs to implement the technical solutions provided in the embodiments of the present application.
[0104] The memory 620 may include a read-only memory and a random access memory, and provides instructions and data to the processor 610. A portion of the processor 610 may also include a nonvolatile random access memory. For example, the processor 610 may also store information on the device type.
[0105] When the computing device 600 is running, the processor 610 executes the computer-executable instructions in the memory 620 to perform any operation step of the above method and any optional embodiment thereof.
[0106] It should be understood that the computing device 600 according to the embodiment of the present application can correspond to the corresponding subjects in the methods according to the embodiments of the present application, and the above-mentioned and other operations and / or functions of each module in the computing device 600 are respectively for implementing the corresponding processes of each method of the present embodiment. For the sake of brevity, they will not be repeated here.
[0107] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0108] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0109] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0110] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0111] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0112] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0113] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, it is used to execute the above method, which includes at least one of the solutions described in the above embodiments.
[0114] The computer storage medium of the embodiment of the present application can adopt any combination of one or more computer-readable media. Computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples (non-exhaustive lists) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing programs, which can be used by instruction execution systems, devices or devices or used in combination with them.
[0115] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0116] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0117] Computer program code for performing the operation of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0118] In addition, the words "first, second, third, etc." or module A, module B, module C and other similar terms in the specification and claims are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that the specific order or sequence can be interchanged where permitted so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0119] In the above description, the numbers representing the steps, such as S110, S120, etc., do not necessarily mean that the steps will be executed in this manner. If permitted, the order of the steps can be interchanged or they can be executed simultaneously.
[0120] The term "comprising" as used in the description and claims should not be interpreted as being limited to what is listed thereafter; it does not exclude other elements or steps. Therefore, it should be interpreted as specifying the presence of the features, integers, steps or components mentioned, but does not exclude the presence or addition of one or more other features, integers, steps or components and groups thereof. Therefore, the expression "a device comprising means A and B" should not be limited to a device consisting of components A and B only.
[0121] References to "one embodiment" or "an embodiment" in this specification mean that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in at least one embodiment of the present application. Therefore, the phrases "in one embodiment" or "in an embodiment" appearing in various places in this specification do not necessarily refer to the same embodiment, but may refer to the same embodiment. In addition, in one or more embodiments, the particular features, structures, or characteristics can be combined in any appropriate manner, as would be apparent to one of ordinary skill in the art from this disclosure.
[0122] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may also include more other equivalent embodiments without departing from the concept of the present application, all of which belong to the scope of protection of the present application.
Claims
1. A chemical safety application device, characterized in that: It includes a configuration unit, a storage unit, a startup unit and an execution unit, wherein: The configuration unit is used to obtain a use case package and a corresponding configuration file from a use case warehouse, and store the use case package together with the configuration file in the storage unit after release; wherein the content recorded in the configuration file includes the start condition of the use case and the information of the input parameters required by the use case; The use case is not bound to a specific input parameter, but only provides an input and output interface for the parameter. The information of the input parameter required by the use case is provided in the form of the configuration file, so as to be shared or reused by the use case when implementing different functions. The information of the required input parameter includes: the type or name of the parameter, which state quantity the parameter is generated during the operation of the device, the location where the parameter is obtained, the output of which previously run use case the parameter comes from, or which component the parameter comes from. The startup unit is used to determine that the operating environment of the device meets the startup conditions of the use case recorded in the configuration file, and send the corresponding use case information to the execution unit; wherein the startup condition includes at least one of the following: a startup condition related to time, including the time required for the timed startup and the time interval between the previous time and the periodic startup; a startup condition related to an event, including whether a predetermined message sent by a message center is received, whether an abnormal alarm is generated, whether the operating state of the device reaches a predetermined state, and whether the previous use case outputs information; The execution unit is used to execute the received use case that meets the startup condition, and is also used to obtain information of input parameters required for the use case from the configuration file, and obtain the parameters and load them into the use case for execution.
2. The device according to claim 1, characterized in that The content recorded in the configuration file also includes the execution mode of the use case; The execution unit is further configured to execute the use case according to the execution mode.
3. The device according to claim 2, characterized in that The execution unit is further used to put the use case information sent by the startup unit into a task queue to execute the use cases in the task queue.
4. The device according to claim 1, characterized in that Also includes at least one of the following: A monitoring unit, used to monitor the execution process of the chemical safety use case configuration and obtain monitoring information; The log unit is used to store various execution logs generated during the execution of the configuration job.
5. A chemical safety use case configuration method, characterized in that: Using the chemical safety test case configuration device according to any one of claims 1 to 4, the method comprises: The configuration unit obtains the use case package and the corresponding configuration file from the use case warehouse, and stores the use case package together with the configuration file into the storage unit after releasing it; wherein the content recorded in the configuration file includes the start-up conditions of the use case and the information of the input parameters required by the use case; wherein the use case is not bound to specific input parameters, but only provides the input and output interface of the parameters, and the information of the input parameters required by the use case is provided in the form of the configuration file, so as to be shared or reused by the use case when implementing different functions; wherein the information of the required input parameters includes: the type or name of the parameter, which state quantities the parameter is generated during the operation of the device, the location where the parameter is obtained, the output of which previously run use case the parameter comes from, or which component the parameter comes from; When the startup unit determines that the operating environment of the device meets the startup conditions of the use case recorded in the configuration file, the corresponding use case information is sent to the execution unit; wherein the startup condition includes at least one of the following: a startup condition related to time, including the time required for the timed startup and the time interval between the previous time and the periodic startup; a startup condition related to an event, including whether a predetermined message sent by a message center is received, whether an abnormal alarm is generated, whether the operating state of the device reaches a predetermined state, and whether the previous use case outputs information; The execution unit executes the received use case that meets the startup condition, including: the execution unit obtains information of input parameters required by the use case according to the configuration file, obtains the parameters and loads them into the use case, and executes the use case.
6. The method according to claim 5, characterized in that The execution unit executes the received use case that meets the start condition, including: The execution unit puts the use case information sent by the startup unit into a task queue; The execution unit executes the use cases in the task queue.
7. A device, characterized in that: include: The chemical safety use case equipment, data center unit, use case management unit, and use case warehouse according to any one of claims 1 to 4, wherein: The data center unit is used to receive and inspect the use case package; The use case management unit is used to manage the use case warehouse, and the management includes: storing the use case packages that have passed the inspection of the data center unit into the use case warehouse, and reading the use case packages from the use case warehouse and providing them to the chemical safety use case equipment.
8. A computing device, characterized in that include: processor, and A memory having program instructions stored thereon, wherein when the program instructions are executed by the processor, the processor executes the chemical safety use case configuration method described in claim 5 or 6.
Citation Information
Patent Citations
System and method of automated test on concurrency performance of transcoding server
CN108304286A