A control method based on Mine Hong configuration system
Through the control method based on the Minhong configuration system, the problems of low efficiency and poor stability of Minhong equipment communication control are solved, high flexibility, stability and reusability are achieved, and development and maintenance costs are reduced.
Patent Information
- Application Number
- CN202410645515.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-05-23
AI Technical Summary
The development efficiency of Minhong Equipment Communication Control is low, the flexibility is insufficient, the stability is poor, the development cycle is long, and the development cost is high.
The control method based on the Minhong configuration system is adopted, and the device information and data frames are loaded by reading the configuration file, the device is started, the query instructions are generated and executed, the instruction results are processed and assigned to the application memory variables.
It achieves high flexibility, stability and reusability, reduces development and maintenance costs, and supports simultaneous control of multiple communication protocols and equipment.
Smart Images

Figure CN118535212B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology for mining equipment, and in particular to a control method based on a mining configuration system. Background Art
[0002] Currently, device communication in mining applications is often custom-developed. Device connections are typically achieved by temporarily creating device connection objects in the code, requiring each application to adjust its code based on the number of devices and their parameters. This results in low development efficiency and inflexibility for mining application and device communication control, hindering the improvement of data interaction efficiency and reusability between mining applications and mining devices. Furthermore, the development cycle for communication between mining applications and mining devices is long and costly. Summary of the Invention
[0003] The purpose of this invention is to address the problems of low development efficiency, insufficient flexibility, poor stability, long development cycle, and high development cost in the communication control of mining equipment in the background technology, and to propose a control method based on the mining configuration system.
[0004] The technical solution of this invention: a control method based on a mining configuration system, comprising the following steps:
[0005] D01. Read the configuration file to load the mining device information and data frames into the cache. The mining application reads the configuration file of the mining device.
[0006] D02. Load the configuration information of the MiningHong application cache variables into the MiningHong application cache;
[0007] D03. Start the mining device based on the cache device information;
[0008] D04. Generate a query command for the mining frame data and place it in the execution queue;
[0009] D05. Pop instructions from the execution queue and execute them in descending order of their permissions;
[0010] D06. Place the result of the instruction execution into the instruction result queue;
[0011] D07. Parse the instruction result and assign the value to the corresponding mining application memory variable.
[0012] Preferably, in D01, the parameters of the mining device include: the mining terminal serial number of the device, the IP address of the device, the port number, the permission configuration, the baud rate, the valid bits, the verification method, and the communication configuration parameters of the mining communication protocol. The mining data frame information contains the starting address and data length of each request to the mining device and is the unit object for data query.
[0013] Preferably, in D04, the data access frequency and range of the mining equipment are determined by the data frame. The mining data frame is converted into a corresponding data frame object, and the data frame object is converted into an execution instruction object and placed into the instruction execution queue.
[0014] Preferably, in D05, the execution instruction queue includes read instructions and modify instructions. Modify instructions are transmitted from events on the interface, while read instructions are converted from frame objects.
[0015] Preferably, in D07, an object is popped from the instruction execution result queue, parsed according to the object's sending instruction attribute, the corresponding variable set is found according to the sending instruction start address and offset, and the value retrieved from the instruction execution result is assigned to the corresponding variable set.
[0016] Compared with the prior art, the present invention has the following beneficial technical effects:
[0017] I. Powerful Functionality: The configuration mode of the mining equipment control supports multiple communication protocols for mining equipment, and can support the simultaneous management and control of multiple devices with different protocols. It adopts scientific and systematic algorithms to rationally schedule and manage equipment resources.
[0018] Second, it offers high flexibility. Traditionally, communication access to devices requires creating objects in the code based on needs. This approach requires recompiling and re-releasing the software for upgrades and maintenance, resulting in poor flexibility. This invention only requires setting the parameters of the mining devices to be connected in the configuration interface, without the need for recompilation.
[0019] Third, it boasts high stability. This invention employs a dual-decoupled queue model for processing instruction execution results. During instruction execution, there are execution order rules and targeted waiting times, preventing instruction backlog and blocking. Execution results undergo various validity checks, eliminating the possibility of erroneous data causing incorrect processing.
[0020] Fourth, the configuration mode offers lower costs. Testing has shown that accessing mining devices is significantly improved and optimized in various dimensions compared to the traditional mode, greatly reducing workload from both development and maintenance perspectives. Therefore, the cost is substantially lower than the traditional coding mode. Attached Figure Description
[0021] Figure 1 This is a schematic diagram illustrating the communication between the mining application configuration mode and mining equipment.
[0022] Figure 2 This is a flowchart illustrating the conversion of mining equipment frame objects into a global frame data object array.
[0023] Figure 3 The flowchart shows how to convert a mining frame data object into a read instruction and push it into the instruction execution queue.
[0024] Figure 4 This is a flowchart illustrating how UI events are converted into modification commands and placed into the command execution queue.
[0025] Figure 5 A flowchart for periodically popping up and executing instructions.
[0026] Figure 6 This is a flowchart illustrating the parsing and processing of the results of the mining command execution.
[0027] Figure 7 This is a UML class diagram of the relevant core class information in this invention.
[0028] Figure 8 This is a schematic diagram illustrating the process of generating, executing, and parsing mining instructions in this invention. DETAILED DESCRIPTION
[0029] Example 1
[0030] like Figure 1 As shown, the present invention proposes a control method based on a mining configuration system, comprising the following steps:
[0031] D01. The mining application reads the configuration file to load mining device information and data frames into the cache. This configuration file contains relevant device parameters, including the mining terminal serial number, IP address, port number, permission configuration, baud rate, valid bits, checksum, and other communication configuration parameters for various mining communication protocols. The mining data frame information contains the starting address and data length for each request to the mining device; it is the unit object for data querying. The device information and data frame objects are loaded into a memory object array. (Reference) Figure 7 The UML class diagram shows the class models for Device (mining equipment), Frame (mining data frame), and FrameReadCmd (mining frame read command). The initialization process for the frame read command is described in reference [reference needed]. Figure 2 ;
[0032] D02. Load the configuration information of the mining application cache variable into the mining application cache: The mining application cache variable information is the medium object in the configuration application development. It is associated with the physical value of the device and also with the user-facing operation interface. The variable information contains the device information of the mining device and is associated with the address offset corresponding to a certain mining data frame of a certain mining data source. Each variable is associated with the register of a specific location of a specific mining device.
[0033] D03. Start the mining device based on the cache device information: Based on the memory device object initialized in stage D02, dynamically create a connection object to access the mining device according to the device parameters, and start the mining device connection object.
[0034] D04. Generate query instructions from the mining frame data and place them in the execution queue; the data access frequency and range of the mining equipment are determined by the data frame. The mining data frame will be converted into a corresponding data frame object, and the data frame object will be converted into an execution instruction object and placed in the instruction execution queue. (Refer to...) Figure 7 The executable instruction objects in the UML class diagram refer to the CommandModel (execution instruction) and CommandQueue (instruction execution queue) class diagrams. The processing procedure for this process is described in [reference needed]. Figure 3 ;
[0035] D05. Pop instructions from the execution queue and execute them in descending order of their permissions. The execution instruction queue contains read instructions and modify instructions. Modify instructions are transmitted from events on the interface, while read instructions are converted from frame objects. When popping instructions from the queue, modify instructions take priority. If a modify instruction exists in the queue, it is executed first. After the modify instruction is executed, the read instruction is executed. Refer to the process of converting interface events into modify instructions. Figure 4 ;
[0036] D06. Place the instruction execution result into the instruction result queue: After instruction execution, the result is converted into an instruction execution result object and placed into the execution result queue. Refer to [reference needed] for this process. Figure 5 ,refer to Figure 7 The UML class diagram shows ReadCmdResultModel (instruction execution result object) and ReadCommandQueue (instruction execution result queue);
[0037] D07. Parse the instruction results and assign the values to the corresponding application memory variables; pop objects from the instruction execution result queue, parse them according to the sent instruction attributes, find the corresponding variable set based on the sent instruction's starting address and offset, and assign the values retrieved from the instruction execution results to the corresponding variable sets. The assignment rules differ depending on the variable type, specifically Boolean, integer, and decimal types. (Refer to [reference needed] for this process.) Figure 6 ;
[0038] Please refer to the timeline flow of the generation, storage, execution, and processing of control commands for mining equipment. Figure 8 .
[0039] In summary, the configuration method based on the mining network system provided by this invention enables communication with mining network equipment. Compared with traditional data methods in mining network applications, it achieves high flexibility, high stability, high reusability, and low cost, as detailed below:
[0040] I. Powerful Functionality: The configuration mode of the mining equipment control supports multiple communication protocols for mining equipment, and can support the simultaneous management and control of multiple devices with different protocols. It adopts scientific and systematic algorithms to rationally schedule and manage equipment resources.
[0041] Second, it offers high flexibility. Traditionally, communication access to devices requires creating objects in the code based on needs. This approach requires recompiling and re-releasing the software for upgrades and maintenance, resulting in poor flexibility. This invention only requires setting the parameters of the mining devices to be connected in the configuration interface, without the need for recompilation.
[0042] Third, it boasts high stability. This invention employs a dual-decoupled queue model for processing instruction execution results. During instruction execution, there are execution order rules and targeted waiting times, preventing instruction backlog and blocking. Execution results undergo various validity checks, eliminating the possibility of erroneous data causing incorrect processing.
[0043] Fourth, the configuration mode offers lower costs. Testing has shown that accessing mining devices is significantly improved and optimized in various dimensions compared to the traditional mode, greatly reducing workload from both development and maintenance perspectives. Therefore, the cost is substantially lower than the traditional coding mode.
[0044] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited thereto. Various changes can be made within the scope of knowledge possessed by those skilled in the art without departing from the spirit of the present invention.
Claims
1. A control method based on the mine configuration system, characterized in that: The following steps are involved: D01. Read the configuration file to load the Kuanghong device information and data frame into the cache. The Kuanghong application reads the configuration file of the Kuanghong device, which contains the relevant parameters of the device; The parameters of the Kuanghong device include: the Kuanghong terminal serial number of the device, the IP address of the device, the port number, the permission configuration, the baud rate, the valid bit, the check method and the communication configuration parameters of the Kuanghong communication protocol; the Kuanghong data frame information contains the starting address and data length of each request to the Kuanghong device, which is the unit object of data query, and loads the device information and data frame object into the memory object array; D02. Load the mining application cache variable configuration information into the mining application cache; the mining application cache variable information is a media object in the configuration application development, which is associated with the physical value of the device and the user-oriented operation interface. The variable information contains the device information of the mining device and is associated with the address offset corresponding to a mining data frame of a mining data source. Each variable is associated with a register at a specific location of a specific mining device; D03, start the mining device according to the cache device information; according to the memory device object initialized in the D02 stage, dynamically create a connection object to access the mining device according to the device parameters, and start the mining device connection object; D04, putting the query instruction for generating the mining frame data into the execution queue; D05. Pop out the instructions in the execution queue and execute them in the order of the highest and lowest authority; D06, put the result of instruction execution into the instruction result queue; D07. Parse the instruction result and assign the value to the corresponding Mine Application memory variable.
2. The control method based on the mine configuration system according to claim 1 is characterized in that: In D04, the data access frequency and range of the Mine Hong device are determined by the data frame. The Mine Hong data frame will be converted into the corresponding data frame object, and the data frame object will be converted into an execution instruction object and placed in the instruction execution queue.
3. The control method based on the mine configuration system according to claim 1 is characterized in that: In D05, the execution instruction queue includes read instructions and modify instructions. The modify instructions are transmitted by the events on the interface, and the read instructions are converted by the frame objects.
4. The control method based on the mine configuration system according to claim 1 is characterized in that: In D07, an object is popped from the instruction execution result queue, parsed according to the sending instruction attribute of the object, the corresponding variable set is found according to the starting address and offset of the sending instruction, and the value queried from the instruction execution result is assigned to the corresponding variable set.
Citation Information
Patent Citations
Method and device for transplanting swan gap system, electronic equipment and readable medium
CN115291946A
Method and device for updating swan project file, computer equipment and storage medium
CN117389579A