User programmable method for mapping address of multi-channel instrument communication register
Through the combination of user-programmable multi-channel instrument communication register mapping address and machine learning algorithm, the problem of low data acquisition efficiency and insufficient flexibility caused by fixed mapping address is solved, and an efficient and personalized communication solution is realized, which improves the industry Performance and response speed of automation systems.
Patent Information
- Application Number
- CN202411128621.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-12-10
AI Technical Summary
In the prior art, fixed communication register mapping addresses lead to low data acquisition efficiency and insufficient flexibility, especially in multi-loop instrument applications, which leads to cumbersome and time-consuming communication process, affecting system performance.
User programmable method that uses multi-channel instrument communication register mapping addresses, integrates multiple data requests into fewer communication instructions through user-defined dynamic mapping addresses, and uses machine learning algorithms to analyze user operating habits and automatically recommends data items. and sequence, optimize the communication process.
It significantly improves data acquisition efficiency, reduces communication delays, and realizes a more efficient and personalized communication solution, meets users' needs for real-time and personalization, and improves the response speed and coordination of industrial automation systems.
Smart Images

Figure CN119105803A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of multi-channel data access, and in particular to a user programmable method for multi-channel instrument communication register mapping addresses. Background Art
[0002] In the rapid development of industrial automation and intelligent manufacturing, communication register mapping addresses, as a key technology, ensure the standardization and reliability of data exchange between devices. In the prior art, communication register mapping addresses are usually pre-set and fixed, providing a stable and predictable communication mode for devices. This design facilitates the rapid development and deployment of products by equipment manufacturers, and also simplifies the integration process with other systems. However, with the diversification and complexity of industrial applications, fixed mapping addresses have gradually shown their limitations. When users use these industrial devices, especially when facing multi-loop instruments with multiple data collection points, they often need to retrieve and obtain the required data one by one from many fixed communication registers. This process not only increases the complexity of programming, but also prolongs the communication time, because each data item needs to be requested through a separate communication instruction. In some application scenarios with high real-time requirements, this inefficient communication method may cause delays in data processing, which in turn affects the response speed and performance of the entire system.
[0003] Although fixed communication register mapping addresses provide a standardized communication solution for industrial equipment, its shortcomings are lack of flexibility and efficiency. In actual operation, users often need to filter and sort data items from numerous communication registers according to specific application requirements. This process is not only time-consuming and labor-intensive, but also prone to errors. Especially in the application of multi-loop instrumentation, users often need to send a large number of communication instructions in order to obtain a complete data set, which not only increases the complexity of communication, but also prolongs the time of data acquisition. In addition, fixed mapping addresses also limit users' personalized configuration of data access and cannot meet users' special needs for data acquisition order and priority. As industrial automation develops towards a higher level of intelligence and personalization, this inflexible communication method is increasingly difficult to adapt to the changing needs of industrial applications. A more efficient and flexible communication solution is urgently needed to improve the efficiency of data acquisition and meet users' needs for personalization and real-time performance.
[0004] In view of this, a user programmable method for multi-channel instrument communication register mapping addresses is needed. Summary of the invention
[0005] In view of the problem that the fixed communication register mapping address method in the prior art limits the flexibility and efficiency of users in acquiring data, and in multi-loop instruments, the communication process is cumbersome and time-consuming, affecting the overall system performance, the present invention provides a user-programmable method for the communication register mapping address of a multi-channel instrument, which can break the traditional fixed mapping address mode and allow users to personalize the communication register mapping address of the multi-channel instrument according to their specific needs. Through the user-defined dynamic mapping address, the system can intelligently integrate multiple data requests into fewer communication instructions, thereby significantly reducing the number of communication instructions. This optimization not only improves the efficiency of data acquisition, but also reduces the delay caused by communication, making the entire industrial control system more agile and efficient. Users can now enjoy a smoother communication experience, and the time for data acquisition and processing is greatly shortened, making the entire industrial automation process more close and coordinated. This intelligent communication method not only improves the performance of a single device, but also provides strong support for building more complex and larger-scale automation systems. The specific technical solution is as follows:
[0006] A user programmable method for mapping addresses of multi-channel instrument communication registers, comprising the following steps:
[0007] Assign a fixed communication register address to the data of each channel;
[0008] The user selects the data items to be obtained from the instrument in the host computer software and defines the priority and order of these data items;
[0009] The host computer software sorts the fixed communication register addresses assigned to the channel data according to the read and write data sequence requirements, and sends them to the MCU through instrument communication;
[0010] The MCU writes this data into the ROM, generates a new mapping address table after the device is powered on, and writes it into the RAM for dynamic calling by the MCU during the communication process;
[0011] When the user sends a read or write instruction, the MCU calls the new mapping address table to transfer data.
[0012] Preferably, the method further comprises the following steps:
[0013] Collect real-time data during user operations, and use machine learning algorithms to analyze user operating habits and communication patterns, and then train a user-personalized data recommendation model to analyze user operations in real time and automatically recommend data items and sequences.
[0014] Preferably, the process of acquiring the user personalized data recommendation model is as follows:
[0015] Data collection: Determine the type of data that needs to be collected, including communication frequency, data access mode, and user operation log. Collect data in real time during user operation through the instrument's MCU or host computer software;
[0016] Data preprocessing: remove invalid or erroneous data records, fill missing values, and extract useful features from the raw data, including the most frequently accessed data items and operation time intervals;
[0017] Select Model: Choose a machine learning model, including decision tree, random forest, gradient boosting machine, or neural network;
[0018] Training data preparation: Divide the collected data into training sets and test sets, and standardize or normalize the features to meet the input requirements of the model;
[0019] Model training: Use the training set data to train the model and adjust the model parameters to obtain the best performance;
[0020] Model evaluation: Use the test set to evaluate the accuracy and generalization ability of the model, and adjust the model structure or parameters based on the evaluation results;
[0021] Integrate the trained model into the user interface and MCU.
[0022] Preferably, the method further comprises the following steps:
[0023] Taking minimizing data access delay as the objective function, and taking uniqueness constraint and access frequency constraint as constraint conditions, a linear programming or certificate programming solver is used to solve and obtain the optimal mapping address arrangement scheme, wherein the uniqueness constraint is that each mapping address can only appear once, and the access frequency constraint is that items with high access frequency correspond to lower delays.
[0024] Preferably, the objective function is as follows:
[0025]
[0026] Among them, C i is the latency cost of accessing data item i, x i is the i-th element in the mapping address arrangement scheme.
[0027] Preferably, the uniqueness constraint is as follows:
[0028]
[0029] Among them, x i is the i-th element in the mapping address arrangement scheme, j is data item j, and i is data item i;
[0030] The access frequency constraints are as follows:
[0031]
[0032] Among them, F i is the historical access frequency of data item i, k is a constant, C i is the latency cost of accessing data item i.
[0033] Preferably, the constraint condition also includes a sequence constraint, wherein the sequence constraint is specifically: if data item i is accessed before data item j, then x i Should be x j Before the arrangement, the formula is as follows:
[0034]
[0035] Among them, x i is the i-th element in the mapping address arrangement scheme, x j The jth element in the mapping address permutation scheme.
[0036] Preferably, the constraint condition also includes a device capacity constraint, which is specifically: if the data item i exceeds the maximum access rate of the device, an additional delay cost must be allocated, and the formula is as follows:
[0037] C i ≥C max if i exceeds device capacity
[0038] Among them, C i is the latency cost of accessing data item i, C max is the maximum latency cost of access.
[0039] A computer-readable storage medium includes a stored program, wherein when the program is run, the device where the computer-readable storage medium is located is controlled to execute the user-programmable method of mapping addresses of multi-channel instrument communication registers as described above.
[0040] A processor, the processor is used to run a program, wherein when the program is run, the user programmable method of mapping addresses of multi-channel instrument communication registers as described above is executed
[0041] Compared with the prior art, the present invention has the following beneficial effects:
[0042] 1. The present invention develops a user-programmable communication method that completely changes the way industrial equipment acquires data. This method allows users to personalize the communication register mapping address of multi-channel instruments according to their specific needs. Through user-defined programming, the traditional fixed communication register mapping address is converted to a user-defined dynamic mapping address. This flexibility greatly reduces the number of communication instructions, because users can only request necessary data according to their needs and ignore other irrelevant data items. In this way, not only the efficiency of data acquisition is improved, but also the time consumption in the communication process is reduced, making the entire industrial control system more agile and responsive. Users can now enjoy a smoother communication experience, and the time for data acquisition and processing is greatly shortened, making the entire industrial automation process more compact and coordinated.
[0043] 2. Based on the user-programmable communication method, the present invention further incorporates a machine learning algorithm to analyze the user's operating habits and communication patterns, bringing about a deeper level of optimization. This intelligent algorithm can identify the data items and access patterns that users access most frequently, and automatically adjust the mapping addresses of communication registers to adapt to the user's usage habits. For example, if the machine learning algorithm finds that the user frequently accesses specific data items within a certain time period, the system will automatically map the addresses of these data items to a more optimal communication sequence. Such adaptive adjustments not only further improve communication efficiency, but also reduce the need for manual configuration by users, achieving true intelligence and personalization. Through continuous learning and optimization of machine learning algorithms, the system can continue to provide more accurate and efficient communication solutions to meet the ever-changing needs of users;
[0044] 3. Based on the user-programmable communication method, the present invention defines minimizing the total data access delay as the objective function, and introduces a series of constraints to solve the optimal mapping address arrangement scheme, thereby maximizing communication efficiency. These constraints include uniqueness constraints, which ensure that the mapping address of each data item is unique; order constraints, which arrange data items according to the priority and order defined by the user; access frequency constraints, which prioritize mapping data items with high access frequency; and device capacity constraints, which ensure that the mapping of data items does not exceed the processing capacity of the device. Through these constraints, the system can generate an optimal mapping address arrangement scheme to minimize the total delay of data access. This method not only takes into account the user's operating habits and communication mode, but also takes into account the real-time nature of data access and the processing capacity of the device, achieving an optimal balance between communication efficiency and system performance. Users can therefore obtain faster data access speeds, shorter response times, and a more efficient industrial automation experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for the specific embodiments or the description of the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual scale.
[0046] Figure 1 The present invention is a flow chart of the method. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0049] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0050] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0051] Embodiment 1:
[0052] This embodiment provides a user programmable method for mapping addresses of multi-channel instrument communication registers, comprising the following steps:
[0053] 1. Assign a fixed communication register address to the data of each channel;
[0054] 2. The user selects the data items that need to be obtained from the instrument in the host computer software and defines the priority and order of these data items;
[0055] 3. The host computer software sorts the fixed communication register addresses assigned to the channel data according to the read and write data sequence requirements, and sends them to the MCU through instrument communication;
[0056] 4. MCU writes these data into ROM, generates a new mapping address table after the device is powered on, and writes it into RAM for dynamic calling by MCU during communication;
[0057] In this step, by storing the sorting information in ROM, the user-defined configuration can be ensured to be persistent and secure. Storing the mapping address table in RAM allows the device to use the latest configuration every time it boots, while providing fast access to optimize communication performance. This separation storage strategy is designed to balance persistence, flexibility, and performance.
[0058] 5. When the user sends a read or write instruction, the MCU calls the new mapping address table to transfer data.
[0059] The specific operation process of the method of this embodiment is further demonstrated below with reference to specific examples.
[0060] Suppose there is a multi-channel temperature monitoring instrument with a total of 8 temperature sensor channels, and the data of each channel needs to be obtained through communication.
[0061] By default, the data of each channel corresponds to a fixed communication register address, and the user needs to send 8 independent communication instructions to obtain the temperature data of all channels.
[0062] Using this solution, the user first analyzes his needs through the host computer software and decides to only care about the temperature data of channels 1, 3, 5, and 7, and hopes to obtain the data of channel 7 first, then channel 1, and so on.
[0063] The implementation steps are as follows:
[0064] Step 1: The user selects the required channel in the host computer software and defines the data acquisition order. The main procedures are as follows:
[0065]
[0066] Step 2: The host computer software sends the user's programming data to the MCU through the instrument communication. The main procedures are as follows:
[0067]
[0068]
[0069] Step 3: MCU writes these data into ROM and generates a new mapping address table after the device is powered on, such as: `[7,1,5,3]`, and then writes it into RAM. The main program reference is as follows:
[0070]
[0071] Step 4: The user sends a command to read the data of all channels of interest. According to the mapping address table in the RAM, the MCU only needs to send one command to obtain data from channel 7 to channel 3 in sequence, and package it and send it to the user. The main program reference is as follows:
[0072]
[0073]
[0074] Please note that the functions in the above examples such as receive_data, write_to_rom, write_to_ram, read_sensor_data, send_data_to_user, and wait_for_user_command are pseudo functions, which need to be implemented according to the actual hardware interface and communication protocol. In addition, error handling, data checking and other edge cases are necessary in real systems, but they are not shown in this example because they are common methods in this field.
[0075] Through the above steps, users can obtain all the data they are concerned about through one instruction, which greatly reduces the number of communications and improves efficiency. In actual applications, by comparing the number of communications and data acquisition time before and after optimization, it can be clearly seen that the communication efficiency has been improved. For example, before optimization, 8 instructions and 80ms of communication time were required, while after optimization, only 1 instruction and 10ms of communication time are required. In short, through this solution, users can flexibly configure the communication register mapping address according to their actual needs to achieve efficient and personalized device communication.
[0076] Embodiment 2:
[0077] The following steps are involved:
[0078] S1: Assign a fixed communication register address to the data of each channel;
[0079] S2: Collect real-time data during user operations, and use machine learning algorithms to analyze user operating habits and communication patterns, and then train a user-personalized data recommendation model to analyze user operations in real time and automatically recommend data items and sequences;
[0080] S3: Based on the automatically recommended data items and order, the user selects the data items that need to be obtained from the instrument in the upper computer software, and defines the priority and order of these data items; in this step, the user can directly select the automatically recommended data items and order, or can add or delete or make some conditions on the basis of the automatically recommended data items and order, or can directly ignore the automatically recommended data items and order and define a new data item and definition. That is, the automatically recommended data items and order obtained in step 2 here serve as a reference and facilitate the user to directly select the operation.
[0081] S4: The host computer software sorts the fixed communication register addresses assigned to the channel data according to the read and write data sequence requirements, and sends them to the MCU through instrument communication;
[0082] S5: MCU writes these data into ROM, generates a new mapping address table after the device is powered on, and writes it into RAM for dynamic calling by MCU during communication;
[0083] S6: When the user sends a read or write instruction, the MCU calls the new mapping address table to transfer data.
[0084] Wherein, step S2 is specifically as follows:
[0085] Step 1: Data collection: including defining data types and implementing data collection, as follows:
[0086] Define data types: Determine the type of data that needs to be collected, such as communication frequency, data access mode, user operation log, etc.
[0087] Implement data collection: collect data in real time during user operation through the instrument's MCU or host computer software.
[0088] Step 2: Data preprocessing: including data cleaning and feature extraction, as follows:
[0089] Clean data: remove invalid or erroneous data records and fill in missing values.
[0090] Feature extraction: Extract useful features from raw data, such as the most frequently accessed data items, operation time intervals, etc.
[0091] Step 3. Choose an appropriate machine learning model such as decision tree, random forest, gradient boosting machine, or neural network based on the nature of the problem.
[0092] Step 4: Divide the collected data into training sets and test sets, and standardize or normalize the features to meet the input requirements of the model.
[0093] Step 5: Select an appropriate training algorithm based on the model type, train the model using the training set data, and adjust the model parameters to obtain the best performance.
[0094] Step 6: Use the test set to evaluate the accuracy and generalization ability of the model, and adjust the model structure or parameters based on the evaluation results.
[0095] Step 7: Integrate the trained model into the user interface and MCU. During implementation, the model analyzes user operations in real time and automatically recommends data items and sequences.
[0096] Step 8: Users can confirm or modify the recommendation results, and then continuously iterate and optimize the model based on user feedback.
[0097] A specific example is given below to further illustrate the technical solution of this embodiment.
[0098] Assume that a user manages an automated production line that contains multiple sensors and actuators.
[0099] Input data:
[0100] - The user's operation log for the past month, including the timestamp and frequency of access to each sensor and actuator.
[0101] - Communication records, including the data items requested and the time of communication.
[0102] Model training:
[0103] -Use random forest model to analyze user operation habits.
[0104] -Training data includes sensor access frequency, communication frequency, and production line status changes.
[0105] -The model output is a list of data items that the user may be interested in and the recommended access order.
[0106] Model training process:
[0107] 1. Extract features from the operation log, such as the average access frequency and access time distribution of each sensor.
[0108] 2. Train a random forest model using these features as input and sensor importance as output.
[0109] 3. Adjust model parameters such as the number and depth of trees through cross-validation.
[0110] Model output:
[0111] -The model outputs a recommendation list, sorting the sensor and actuator data items according to the user's possible needs.
[0112] User Action:
[0113] -The user logs into the production line monitoring system and the system automatically displays the recommended data items and sequence.
[0114] -Users can quickly configure communication instructions based on recommendations, or adjust them according to their own needs.
[0115] Model iteration:
[0116] -After the user operates on the recommendation results, the system records the user's confirmation or modification as new feedback.
[0117] -Use this feedback data to further train and optimize the model.
[0118] In this way, the system can learn users' operating habits and communication patterns, and provide personalized data item recommendations and sequences, thereby improving users' work efficiency and satisfaction.
[0119] Embodiment three:
[0120] The following steps are involved:
[0121] S01: Assign a fixed communication register address to the data of each channel;
[0122] S02: The user selects the data items to be obtained from the instrument in the host computer software and defines the priority and order of these data items;
[0123] S03: The host computer software sorts the fixed communication register addresses assigned to the channel data according to the read and write data sequence requirements, and sends them to the MCU through instrument communication;
[0124] In this step, the fixed communication register addresses allocated to the channel data are sorted by defining an objective function and constraint conditions to thereby solve an optimal mapping address arrangement scheme.
[0125] S04: MCU writes these data into ROM, generates a new mapping address table after the device is powered on, and writes it into RAM for dynamic calling by MCU during communication;
[0126] S05: When the user sends a read or write instruction, the MCU calls the new mapping address table to transfer data.
[0127] In the above step S03, the process of obtaining the optimal mapping address arrangement scheme is as follows:
[0128] S031: With the goal of minimizing data access latency, define the objective function, the expression is as follows:
[0129]
[0130] Among them, C i is the latency cost of accessing data item i, x i is the i-th element in the mapping address arrangement scheme;
[0131] S032: Define constraint conditions, which include uniqueness constraint, access frequency constraint, sequence constraint and device capacity constraint.
[0132] The uniqueness constraint means that each mapping address can only appear once. The specific expression is as follows:
[0133]
[0134] Among them, x i is the i-th element in the mapping address arrangement scheme, j is data item j, and i is data item i;
[0135] In the above uniqueness constraint, j represents an index of a data item, which can be any element in the data item set. Here, i and j are both indexes used to traverse the data item set, and the constraint ensures that each data item appears only once in the mapping address arrangement scheme. In other words, this constraint means that for the sum of any two different data items, their values (i.e., their positions in the mapping address arrangement scheme) cannot be 1 at the same time (or cannot be selected at the same time). In other words, each data item can only be mapped once in the arrangement scheme.
[0136] For example, if there are 4 data items, then x1 = 4, and the indexes i and j can be 1, 2, 3, and 4. For any two different i and j, such as i = 1 and j = 2, the constraint will ensure that x1 and x2 cannot be 1 at the same time. This ensures that there will be no duplicate data items in the mapping address arrangement scheme.
[0137] The access frequency constraints are as follows:
[0138]
[0139] Among them, F i is the historical access frequency of data item i, k is a constant, C i is the latency cost of accessing data item i.
[0140] The order constraint is as follows: if data item i is accessed before data item j, then x i Should be x j Before the arrangement, the formula is as follows:
[0141]
[0142] Among them, xi is the i-th element in the mapping address arrangement scheme, x j The jth element in the mapping address permutation scheme.
[0143] The device capacity constraint is: if data item i exceeds the maximum access rate of the device, an additional delay cost must be allocated, and the formula is as follows:
[0144] C i ≥C max if i exceeds device capacity
[0145] Among them, C i is the latency cost of accessing data item i, C max is the maximum latency cost of access.
[0146] S303: Based on the objective function and the constraints, a linear programming or certificate programming solver is used to solve the problem and obtain an optimal mapping address arrangement scheme.
[0147] In summary, the present invention develops a user-programmable communication method that completely changes the way industrial equipment acquires data. This method allows users to personalize the communication register mapping address of multi-channel instruments according to their specific needs. Through user-defined programming, the traditional fixed communication register mapping address is converted to a user-defined dynamic mapping address. This flexibility greatly reduces the number of communication instructions, because users can only request necessary data according to their needs and ignore other irrelevant data items. In this way, not only the efficiency of data acquisition is improved, but also the time consumption in the communication process is reduced, making the entire industrial control system more agile and responsive. Users can now enjoy a smoother communication experience, and the time for data acquisition and processing is greatly shortened, making the entire industrial automation process more compact and coordinated.
[0148] Moreover, based on the user-programmable communication method, the present invention further incorporates a machine learning algorithm to analyze the user's operating habits and communication patterns, bringing about a deeper level of optimization. This intelligent algorithm can identify the data items and access patterns that users access most frequently, and automatically adjust the mapping addresses of communication registers to adapt to the user's usage habits. For example, if the machine learning algorithm finds that the user frequently accesses specific data items within a certain time period, the system will automatically map the addresses of these data items to a more optimal communication sequence. Such adaptive adjustments not only further improve communication efficiency, but also reduce the need for manual configuration by users, achieving true intelligence and personalization. Through continuous learning and optimization of machine learning algorithms, the system can continue to provide more accurate and efficient communication solutions to meet the ever-changing needs of users;
[0149] In addition, based on the user-programmable communication method, the present invention defines minimizing the total data access delay as the objective function, and introduces a series of constraints to solve the optimal mapping address arrangement scheme, thereby maximizing communication efficiency. These constraints include uniqueness constraints, which ensure that the mapping address of each data item is unique; order constraints, which arrange data items according to the priority and order defined by the user; access frequency constraints, which prioritize mapping data items with high access frequency; and device capacity constraints, which ensure that the mapping of data items does not exceed the processing capacity of the device. Through these constraints, the system can generate an optimal mapping address arrangement scheme to minimize the total delay of data access. This method not only takes into account the user's operating habits and communication mode, but also takes into account the real-time nature of data access and the processing capacity of the device, achieving an optimal balance between communication efficiency and system performance. Users can therefore obtain faster data access speeds, shorter response times, and a more efficient industrial automation experience.
[0150] Those of ordinary skill in the art will appreciate that the units of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition of each example has been generally described in terms of function in the above description. 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 the present invention.
[0151] In the embodiments provided by the present invention, it should be understood that the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units can be combined into one unit, one unit can be split into multiple units, or some features can be ignored, etc.
[0152] In addition, each functional unit in each embodiment of the present invention 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0153] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which 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 method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-0nlyMemory), random access memory (RAM, RandomAccessMemory), mobile hard disk, magnetic disk or optical disk, etc., which can store program code.
[0154] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.
Claims
1. A user programmable method for mapping addresses of multi-channel instrument communication registers. It is characterized in that The following steps are involved: Assign a fixed communication register address to the data of each channel; The user selects the data items to be obtained from the instrument in the host computer software and defines the priority and order of these data items; The host computer software sorts the fixed communication register addresses assigned to the channel data according to the read and write data sequence requirements, and sends them to the MCU through instrument communication; The MCU writes this data into the ROM, generates a new mapping address table after the device is powered on, and writes it into the RAM for dynamic calling by the MCU during the communication process; When the user sends a read or write instruction, the MCU calls the new mapping address table to transfer data.
2. A user programmable method for mapping addresses of multi-channel instrument communication registers according to claim 1, It is characterized in that The following steps are also included: Collect real-time data during user operations, and use machine learning algorithms to analyze user operating habits and communication patterns, and then train a user-personalized data recommendation model to analyze user operations in real time and automatically recommend data items and sequences.
3. A user programmable method for mapping addresses of multi-channel instrument communication registers according to claim 2, It is characterized in that The process of obtaining the user personalized data recommendation model is as follows: Data collection: Determine the type of data that needs to be collected, including communication frequency, data access mode, and user operation log. Collect data in real time during user operation through the instrument's MCU or host computer software; Data preprocessing: remove invalid or erroneous data records, fill missing values, and extract useful features from the raw data, including the most frequently accessed data items and operation time intervals; Select Model: Choose a machine learning model, including decision tree, random forest, gradient boosting machine, or neural network; Training data preparation: Divide the collected data into training sets and test sets, and standardize or normalize the features to meet the input requirements of the model; Model training: Use the training set data to train the model and adjust the model parameters to obtain the best performance; Model evaluation: Use the test set to evaluate the accuracy and generalization ability of the model, and adjust the model structure or parameters based on the evaluation results; Integrate the trained model into the user interface and MCU.
4. A user programmable method for mapping addresses of multi-channel instrument communication registers according to claim 1, It is characterized in that The following steps are also included: Taking minimizing data access delay as the objective function, and taking uniqueness constraint and access frequency constraint as constraint conditions, a linear programming or certificate programming solver is used to solve and obtain the optimal mapping address arrangement scheme, wherein the uniqueness constraint is that each mapping address can only appear once, and the access frequency constraint is that items with high access frequency correspond to lower delays.
5. A user programmable method for mapping addresses of multi-channel instrument communication registers according to claim 4, It is characterized in that The objective function is as follows: Among them, C i is the latency cost of accessing data item i, x i is the i-th element in the mapping address arrangement scheme.
6. A user programmable method for mapping addresses of multi-channel instrument communication registers according to claim 4, It is characterized in that The uniqueness constraints are as follows: Among them, x i is the i-th element in the mapping address arrangement scheme, j is data item j, and i is data item i; The access frequency constraints are as follows: Among them, F i is the historical access frequency of data item i, k is a constant, C i is the latency cost of accessing data item i.
7. A user programmable method for mapping addresses of multi-channel instrument communication registers according to claim 4, It is characterized in that The constraints also include order constraints, which are specifically: if data item i is accessed before data item j, then x i Should be in x j Before the arrangement, the formula is as follows: Among them, x i is the i-th element in the mapping address arrangement scheme, x j The jth element in the mapping address permutation scheme.
8. A user programmable method for mapping addresses of multi-channel instrument communication registers according to claim 4, It is characterized in that The constraints also include device capacity constraints. The device capacity constraints are as follows: if data item i exceeds the maximum access rate of the device, an additional delay cost must be allocated. The formula is as follows: C i ≥C max if i exceeds device capacity Among them, C i is the latency cost of accessing data item i, C max is the maximum latency cost of access.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the user-programmable method for mapping addresses of multi-channel instrument communication registers according to any one of claims 1 to 8.
10. A processor, It is characterized in that The processor is used to run a program, wherein the program executes the user programmable method for mapping addresses of multi-channel instrument communication registers as claimed in any one of claims 1 to 8 when the program is run.
Citation Information
Cited By
Address mapping configuration method for Modbus function register of precision pump equipment
CN120010917A
