Design method of system framework for reuse and assembly of instrument components
By designing a system framework for instrument component reuse and assembly, the problem of interface incompatibility between instrument components is solved, efficient instrument software development and stable system operation are achieved, and the universality and interoperability of components are improved.
Patent Information
- Application Number
- CN202510477220.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-08-01
AI Technical Summary
The interface incompatibility problem between instrument components in the prior art makes it difficult to achieve seamless connection and interoperability, affecting system stability, and high software development costs, long cycles and unstable quality.
Design a system framework for instrument component reuse and assembly. By defining instrument component specifications and system frameworks, ensure interface compatibility between components, adopt modular design, polymorphism, clarify functional boundaries and interfaces, and use hierarchical design and dependency injection to manage dependencies to achieve interoperability of components.
It improves the efficiency and quality of instrument software development, reduces maintenance costs, and ensures the normal operation and interoperability of components in the system.
Smart Images

Figure CN120406934A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial automation instrument software, and particularly to a design method for a system framework for instrument component reuse and assembly. Background Art
[0002] With the exponential growth of software complexity, traditional development models face problems such as high costs, long cycles, and unstable quality. Software reuse technology has become a solution by reducing repetitive labor, and its economic benefits are significant: reusing existing components can increase development efficiency by 30% - 50% and reduce maintenance costs by 40% - 60%. However, in actual software development, the problem of incompatible interfaces between components is very prominent, making it difficult to achieve seamless connection and interoperability during assembly. There may be complex dependencies between components, which may lead to compatibility problems and further affect the stability of the entire system. How to ensure the normal operation of components in the system and guide standardized operations has become an urgent problem to be solved. Summary of the Invention
[0003] The present invention aims to at least solve the technical problems existing in the prior art, and particularly innovatively proposes a design method for a system framework for instrument component reuse and assembly.
[0004] To achieve the above object of the present invention, the present invention provides a design method for a system framework for instrument component reuse and assembly, including the following steps:
[0005] S1. Use the default password of the instrument component reuse and assembly system and the system username set by the administrator of the unit in the instrument component reuse and assembly system to enter the instrument component reuse and assembly system;
[0006] S2. After entering the instrument component reuse and assembly system, perform design operations for instrument component reuse and assembly in the instrument component reuse and assembly system.
[0007] In a preferred embodiment of the present invention, step S1 includes the following steps:
[0008] S11. The login designer tells the desired system username to the system administrator;
[0009] S12. After the system administrator gets the desired system username of the login designer, store the desired system username of the login designer in the system as the system username of the login designer;
[0010] After the system administrator stores the desired system username of the login designer in the system, at this time, the system default password and the system username stored by the system administrator form an authentication user password pair;
[0011] S13. The system administrator tells the login designer the system username that the designer wants and the system default password corresponding to the system username.
[0012] S14. After obtaining the system username and the system default password, the login designer uses the system username and the system default password to enter the instrument component reuse and assembly system.
[0013] In a preferred embodiment of the present invention, the notification method is one of or any combination of WeChat, QQ, text message, phone call, and email for notification.
[0014] Or / and after step S14, it further includes changing the system default password. The method for changing the system default password is as follows:
[0015] Enter the desired new password in the first new password box and enter the desired new password in the second new password box. The system will determine whether it receives a save trigger signal:
[0016] If the system receives the save trigger signal, it will obtain the desired new password entered by the designer in the first new password box and the desired new password entered by the designer in the second new password box. If the desired new password entered in the first new password box is the same as the desired new password entered in the second new password box, the password change is completed.
[0017] If the desired new password entered in the first new password box is not the same as the desired new password entered in the second new password box, it will prompt to enter the desired new password in the first new password box and the desired new password in the second new password box to be the same. If the system does not receive the save trigger signal, it will wait for the designer to click the save virtual key.
[0018] In a preferred embodiment of the present invention, when the password change is completed, the system default password stored in the system is not the desired new password entered by the login designer in the first new password box or / and the desired new password entered by the designer in the second new password box, but will perform corresponding processing on the desired new password entered by the designer in the first new password box or / and the desired new password entered by the designer in the second new password box to ensure the security of the password desired by the designer.
[0019] In a preferred embodiment of the present invention, in step S2, it includes using the form of boxes, arrows, and text for frame design.
[0020] It further includes color adjustment of the boxes, arrows, and text using different colors.
[0021] In a preferred embodiment of the present invention, during the design process, it includes:
[0022] Defining the design specifications of the instrument components and using a unified standard to design the instrument components.
[0023] Build a system framework from the perspective of instrument component specifications, enabling components that conform to the instrument component specifications to be reused within this system framework;
[0024] Define the interoperability method between each instrument component based on the system framework to achieve component assembly.
[0025] In a preferred embodiment of the present invention, the design specifications of the instrument component include one or any combination of the following:
[0026] 1) The instrument component adopts a modular design;
[0027] 2) The instrument component uses polymorphism;
[0028] 3) The instrument component clearly defines the functional boundary;
[0029] 4) The instrument component has clear interfaces;
[0030] 5) The instrument component defines exception codes;
[0031] Or / and the system framework design includes one or any combination of the following:
[0032] 1) The system framework adopts a layered design to provide basic support;
[0033] 2) The system framework can reuse instrument components;
[0034] 3) The system framework uses dependency injection to manage the dependency relationships between components;
[0035] 4) The system framework defines exception codes;
[0036] Or / and the interoperability method between instrument components includes one or any combination of the following:
[0037] 1) The instrument components use a common data format to achieve heterogeneous data exchange;
[0038] 2) The instrument components use parameter passing to transfer information;
[0039] 3) The instrument components only call standardized interfaces;
[0040] 4) The instrument components communicate through a message middleware.
[0041] In a preferred embodiment of the present invention, the design specifications of the instrument component further include one or any combination of the following:
[0042] 1) The modular design means that the internal functions of the instrument component are closely related, achieving a single responsibility, and adopting data coupling;
[0043] 2) Polymorphism means that by encapsulating data and operation interfaces in a structure, using function pointers to point to different implementations, and calling the corresponding functions according to the actual type at runtime;
[0044] 3) Defining clear functional boundaries means using local variables within the functions of instrument components, restricting the visibility of internal functions through the static keyword, and avoiding direct external calls;
[0045] 4) Clear interfaces mean that the interfaces need to clearly define input / output parameters, exception handling, and pre / post conditions;
[0046] 5) Exception codes mean defining an enumeration to implement a standardized classification of error codes to distinguish functional-level errors;
[0047] Or / and the system framework design also includes one or any combination of the following:
[0048] 1) Layered design means the hardware driver layer, functional module layer, application interface layer, business logic layer, and system application layer;
[0049] 2) Reuse means through a combination rather than inheritance;
[0050] 3) Dependency injection means passing in dependency parameters in the form of a union pointer;
[0051] 4) Exception codes mean defining an enumeration to implement a standardized classification of error codes to distinguish system-level errors;
[0052] Or / and the interoperability methods between instrument components also include one or any combination of the following:
[0053] 1) General data format means using a union to implement polymorphic data storage, supporting storing different types of data in the same memory area;
[0054] 2) Parameter passing means passing through pointers and cooperating with mutexes;
[0055] 3) Standardized interfaces mean interfaces that conform to the design specifications of instrument components;
[0056] 4) Message middleware means a queue mechanism that implements one-to-one reliable transmission.
[0057] The present invention also discloses a computer system, including:
[0058] A processor;
[0059] A memory for storing executable instructions of the processor;
[0060] Wherein, the processor is configured to execute the design method of the system framework for instrument component reuse and assembly when executing the executable instructions.
[0061] The present invention also discloses a computer-readable storage medium, comprising:
[0062] a memory storing a computer program thereon;
[0063] a processor configured to execute the program in the memory to implement the design method of the system framework for instrument component reuse and assembly as described above.
[0064] In summary, due to the adoption of the above technical solution, the present invention solves the interface compatibility problem through a standardized guide, making it possible to reuse and assemble components, overcoming the limitations of existing systems, improving the generality and interoperability of instrument components, and thus improving the efficiency and quality of instrument software development.
[0065] Additional aspects and advantages of the present invention will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] The above and / or additional aspects and advantages of the present invention will become apparent and be readily understood from the following description of the embodiments in conjunction with the accompanying drawings, wherein:
[0067] Figure 1 is a flowchart of the present invention.
[0068] Figure 2 is a schematic diagram of the whole of the present invention.
[0069] Figure 3 is a schematic diagram of the standard design of the instrument components of the present invention.
[0070] Figure 4 is a schematic diagram of the design of the system framework of the present invention.
[0071] Figure 5 is a schematic diagram of the interoperability mode between the instrument components of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0072] The embodiments of the present invention will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary only for explaining the present invention and should not be construed as limiting the present invention.
[0073] The present invention discloses a design method for a system framework for instrument component reuse and assembly, as Figure 1 shown, comprising the following steps:
[0074] S1. Use the default password of the instrument component reuse and assembly system and the system username set by the administrator of the unit in the instrument component reuse and assembly system to enter the instrument component reuse and assembly system;
[0075] S2. After entering the instrument component reuse and assembly system, perform design operations for instrument component reuse and assembly in the instrument component reuse and assembly system.
[0076] In a preferred embodiment of the present invention, step S1 includes the following steps:
[0077] S11. The login designer tells the desired system username to the system administrator;
[0078] S12. After the system administrator gets the desired system username of the login designer, store the desired system username of the login designer in the system as the system username of the login designer;
[0079] After the system administrator stores the desired system username of the login designer in the system, at this time, the system default password and the system username stored by the system administrator form an authentication user password pair;
[0080] S13. The system administrator tells the desired system username of the login designer and the system default password corresponding to the system username to the login designer;
[0081] S14. After the login designer gets the system username and the system default password, use the system username and the system default password to enter the instrument component reuse and assembly system.
[0082] In a preferred embodiment of the present invention, the way of telling is one or any combination of WeChat, QQ, SMS, phone call, and email for telling;
[0083] Or / and after step S14, it further includes changing the system default password. The method of changing the system default password is:
[0084] Enter the desired new password in the first new password box and enter the desired new password in the second new password box. The system will judge whether it receives a save trigger signal:
[0085] If the system receives a save trigger signal, obtain the desired new password entered by the designer in the first new password box and the desired new password entered by the designer in the second new password box. If the desired new password entered in the first new password box is the same as the desired new password entered in the second new password box, the password change is completed;
[0086] If the new password entered in the first new password box is inconsistent with the new password entered in the second new password box, it is prompted that the new password entered in the first new password box and the new password entered in the second new password box need to be consistent; if the system does not receive the save trigger signal, wait for the designer to click the save virtual key.
[0087] In a preferred embodiment of the present invention, when the password change is completed, the system default password stored in the system is not the new password entered by the logged-in designer in the first new password box or / and the new password entered in the second new password box, but will perform corresponding processing on the new password entered in the first new password box or / and the new password entered in the second new password box to ensure the security of the password desired by the designer. Specifically:
[0088] First step, obtain the new password entered in the first new password box or the new password entered in the second new password box;
[0089] Second step, after obtaining the new password entered in the first new password box or the new password entered in the second new password box, use the digest algorithm SHA-3(512) to calculate the digest value of the new password entered in the first new password box and the new password entered in the second new password box:
[0090] zyz1 = SHA-3(512){mima1},
[0091] zyz1 is the first digest value obtained by calculating the digest value of the new password entered in the first new password box using the digest algorithm SHA-3(512);
[0092] SHA-3(512){} is the digest algorithm SHA-3(512);
[0093] mima1 is the new password entered in the first new password box;
[0094] zyz2 = SHA-3(512){mima2},
[0095] zyz2 is the second digest value obtained by calculating the digest value of the new password entered in the second new password box using the digest algorithm SHA-3(512);
[0096] SHA-3(512){} is the digest algorithm SHA-3(512);
[0097] mima1 is the new password entered in the second new password box;
[0098] Third step, combine the first digest value and the second digest value to obtain a digest combination value:
[0099]
[0100] zyz j is the j-th digit in the summary combination value;
[0101] zyz1 j is the j-th digit in the first summary value;
[0102] zyz2 512-j is the (512 - j)-th digit in the second summary value;
[0103] ∪ is the operator for calculating the first summary value and the second summary value;
[0104] j = 1, 2, 3, ……, 512;
[0105] zyz = zyz1zyz2zyz3…zyz 512 ;
[0106] zyz1 is the 1st digit in the summary combination value;
[0107] zyz2 is the 2nd digit in the summary combination value;
[0108] zyz3 is the 3rd digit in the summary combination value;
[0109] zyz 512 is the 512th digit in the summary combination value;
[0110] zyz is the summary combination value;
[0111] In the fourth step, store and replace the summary combination value as the password for changing the system default password.
[0112] Assume that the designer enters the desired new password in the first new password box and the desired new password in the second new password box as zkbw520, then:
[0113] zyz1 = SHA-3(512){zkbw520} = 000001100001111111110000000010011111011010100110011011010111001011011000111110001011100001111001101010101100110001101011011001011101010000000111100110100000011110010110101110010100111110010011 01000111110000111101110001010001100011110100010001010110100011111111000010100100100010010101101010111100011101100100110001000000100000111000111100000100001011111110001101100010000011100000110011010011010110011111000101001001111111010000010110111010000100101000000100100000101000001001001010111010111000000001111100001001;
[0114] zyz2 = SHA-3(512){zkbw520} = 00000110000111111111000000001001111101101010011001101101011100101101100011111000101110000111100110101010110011000110101101100101110101000000011110011010000001111001011010111001010011111001001101000111110000111101110001010001100011110100010001010110100011111111000010100100100010010101101010111100011101100100110001000000100000111000111100000100001011111110001101100010000011100000110011010011010110011111000101001001111111010000010110111010000100101000000100100000101000001001001010111010111000000001111100001001;
[0115] zyz = 10010110111001111111011101010100101111111010001101101001111100111001000010100101000110001100011000111000010000111111000110101110111001000111011111011100110000000110001010011001101111100101001001000101111100011011001001101100110101011101010101110011100000000000000111001110101010111010101100110110010011011000111110100010010010100111110110011001010001100000001100111011111011100010011101110101100011111100001000011100011000110001100010100101000010011100111110010110110001011111110100101010111011111110011101101001;
[0116] Since the abstract combination value is too long, it can be rewritten and stored in hexadecimal (0 - 9 and A - F) representation: 96E7F754BFA369F390A518C63843F1AEE477DCC06299BE5245F1B26CD5D5738001CEABAB364D8FA24A7D9946033BEE27758FC21C6318A509CF96C5FD2AEFE769.
[0117] Correspondingly, the login after changing the system default password is as follows:
[0118] First step, obtain the username and password entered in the username box and password box;
[0119] Second step, after obtaining the password entered in the password box, calculate the digest value:
[0120] zyz3 = SHA - 3(512){mima3},
[0121] zyz3 is the third digest value obtained by calculating the digest of the password entered in the password box using the digest algorithm SHA - 3(512);
[0122] SHA-3(512) {} is the digest algorithm SHA-3(512);
[0123] mima3 is the password entered in the password box;
[0124] In the third step, combine the third digest value and the fourth digest value to obtain a new digest combination value:
[0125]
[0126] zyz′ j is the j-th digit in the new digest combination value;
[0127] zyz3 j is the j-th digit in the third digest value;
[0128] zyz4 512-j is the (512 - j)-th digit in the fourth digest value; The fourth digest value is the same as the third digest value;
[0129] ∪ is the operator for calculating the third digest value and the fourth digest value;
[0130] j = 1, 2, 3,..., 512;
[0131] zyz′ = zyz′1zyz′2zyz′3…zyz′ 512 ;
[0132] zyz′1 is the 1st digit in the new digest combination value;
[0133] zyz′2 is the 2nd digit in the new digest combination value;
[0134] zyz′3 is the 3rd digit in the new digest combination value;
[0135] zyz′ 512 is the 512th digit in the new digest combination value;
[0136] zyz′ is the new digest combination value;
[0137] Rewrite the new digest combination value as a hexadecimal password;
[0138] In the fourth step, check whether the username obtained in the first step and the hexadecimal password obtained in the third step are the same as the username stored in the system and the system default password:
[0139] If they are the same, enter the instrument component reuse and assembly system;
[0140] If they are not the same, it fails.
[0141] In a preferred embodiment of the present invention, in step S2, it includes using the form of boxes, arrows, and text for framework guidance design;
[0142] It also includes using different colors to adjust the colors of the boxes, arrows, and text. For example, the boxes can be filled with blue, the large arrows can be filled with black, the small arrows can be filled with light blue, and the text can be filled with white or black;
[0143] In a preferred embodiment of the present invention, during the design process, it should follow including:
[0144] S1: Define the design specifications of the instrument components and design the instrument components using a unified standard;
[0145] S2: Build the system framework from the perspective of the instrument component specifications so that the components that meet the instrument component specifications can be reused within this system framework;
[0146] S3: Define the interoperability method between each instrument component based on the system framework to achieve component assembly.
[0147] In this application, a design method for a system framework for instrument component reuse and assembly,
[0148] The design specifications of the instrument components are as follows:
[0149] 1) The instrument components adopt modular design;
[0150] 2) The instrument components use polymorphism;
[0151] 3) The instrument components have clear function boundaries;
[0152] 4) The interfaces of the instrument components are clear;
[0153] 5) The instrument components define exception codes.
[0154] The design of the system framework is as follows:
[0155] 1) The system framework adopts a layered design to provide basic support;
[0156] 2) The system framework can reuse instrument components;
[0157] 3) The system framework uses dependency injection to manage the dependency relationships between components;
[0158] 4) The system framework defines exception codes.
[0159] The interoperability method between the instrument components is as follows:
[0160] 1) The instrument components use a common data format to achieve heterogeneous data exchange;
[0161] 2) Information is passed between instrument components using parameters;
[0162] 3) Only standardized interfaces are called between instrument components;
[0163] 4) Instrument components communicate through a message middleware.
[0164] The design specifications of the said instrument components include:
[0165] 1) Modular design means that the internal functions of the instrument components are closely related, achieving a single responsibility, and using data coupling;
[0166] 2) Polymorphism means that by encapsulating data and operation interfaces in a structure, using function pointers to point to different implementations, and calling the corresponding functions according to the actual type at runtime;
[0167] 3) Defining clear functional boundaries means using local variables within the functions of the instrument components, restricting the visibility of internal functions through the static keyword, and avoiding direct external calls;
[0168] 4) Clear interfaces mean that the interfaces need to clearly define input / output parameters, exception handling, and pre / post conditions;
[0169] 5) Exception codes mean defining an enumeration to implement standardized error code classification to distinguish functional-level errors.
[0170] The system framework design includes:
[0171] 1) Layered design means the hardware driver layer, function module layer, application interface layer, business logic layer, and system application layer;
[0172] 2) Reuse means through a combination rather than inheritance approach;
[0173] 3) Dependency injection means passing dependency parameters in the form of a union pointer;
[0174] 4) Exception codes mean defining an enumeration to implement standardized error code classification to distinguish system-level errors.
[0175] The interoperability methods between the components include:
[0176] 1) The general data format means using a union to implement polymorphic data storage, supporting the storage of different types of data in the same memory area;
[0177] 2) Parameter passing means passing through pointers and coordinating with mutexes;
[0178] 3) Standardized interfaces mean interfaces that conform to the design specifications of the instrument components;
[0179] 4) Message middleware means a queue mechanism that implements one-to-one reliable transmission.
[0180] As Figure 2 shown, the instrument components are designed based on the design specifications of the instrument components, and component interoperability is achieved on the basis of the system framework. As Figures 3 to 5 shown, the following should be followed during the design process: modular design is adopted to make the internal functions of the instrument components closely related, achieving single responsibility, and data coupling is used to keep the instrument components independent and minimize the coupling degree; by encapsulating data and operation interfaces in a structure body, using function pointers to point to different implementations, and calling corresponding functions according to the actual type during runtime to achieve polymorphism; local variables are used within the functions of the instrument components, and the visibility of internal functions is restricted by the static keyword to avoid direct external calls and clarify the functional boundaries of the instrument components; clarify the input / output parameters, exception handling, and pre / post conditions of the instrument component interfaces, and distinguish functional-level errors through exception codes.
[0181] The system framework adopts a layered design of a hardware driver layer, a functional module layer, an application interface layer, a business logic layer, and a system application layer. The instrument components are reused through a combination method, and the dependent parameters defined by the union are passed into the interface that conforms to the design specifications of the instrument components in the form of a structure pointer in cooperation with a mutex. The queue mechanism of one-to-one reliable transmission is used to ensure communication between instrument components, and system-level errors are distinguished through exception codes.
[0182] The present invention also discloses a computer system, including:
[0183] A processor;
[0184] A memory for storing executable instructions of the processor;
[0185] Wherein, the processor is configured to implement the design method of the system framework for instrument component reuse and assembly when executing the executable instructions.
[0186] The present invention also discloses a computer-readable storage medium, including:
[0187] A memory having a computer program stored thereon;
[0188] A processor for executing the program in the memory to implement the design method of the system framework for instrument component reuse and assembly.
[0189] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the claims and their equivalents.
Claims
1. A design method for a system framework for instrument component reuse and assembly, characterized in that, It includes the following steps: S1. Enter the instrument component reuse and assembly system by using the default password of the instrument component reuse and assembly system and the system username set by the administrator of the unit in the instrument component reuse and assembly system; S2. After entering the instrument component reuse and assembly system, perform design operations for instrument component reuse and assembly in the instrument component reuse and assembly system.
2. The design method of the system framework for instrument component reuse and assembly according to claim 1, characterized in that In step S1, it includes the following steps: S11. The login designer tells the desired system username to the system administrator; S12. After the system administrator gets the desired system username of the login designer, store the desired system username of the login designer in the system as the system username of the login designer; After the system administrator stores the desired system username of the login designer in the system, at this time, the system default password and the system username stored by the system administrator form an authentication user password pair; S13. The system administrator tells the desired system username of the login designer and the system default password corresponding to the system username to the login designer; S14. After the login designer gets the system username and the system default password, enter the instrument component reuse and assembly system by using the system username and the system default password.
3. The design method of the system framework for instrument component reuse and assembly according to claim 1, characterized in that The way of notification is one or any combination of WeChat, QQ, text message, phone call, and email for notification; Or / and after step S14, it also includes changing the system default password. The method of changing the system default password is: Enter the desired new password in the first new password box and enter the desired new password in the second new password box. The system will judge whether it receives a save trigger signal: If the system receives a save trigger signal, obtain the desired new password entered by the designer in the first new password box and the desired new password entered by the designer in the second new password box. If the desired new password entered in the first new password box is the same as the desired new password entered in the second new password box, the password change is completed; If the desired new password entered in the first new password box is different from the desired new password entered in the second new password box, prompt that the desired new password entered in the first new password box needs to be the same as the desired new password entered in the second new password box; If the system does not receive a save trigger signal, wait for the designer to click the save virtual key.
4. The design method of the system framework for instrument component reuse and assembly according to claim 1, characterized in that, When the password change is completed, the system default password stored in the system is not the desired new password entered by the login designer in the first new password box or / and the desired new password entered by the designer in the second new password box, but will perform corresponding processing on the desired new password entered by the designer in the first new password box or / and the desired new password entered by the designer in the second new password box to ensure the security of the password desired by the designer.
5. The design method of the system framework for instrument component reuse and assembly according to claim 1, characterized in that, In step S2, it includes performing frame design in the form of boxes, arrows, and text; It also includes performing color adjustment on the boxes, arrows, and text by using different colors.
6. The design method of the system framework for instrument component reuse and assembly according to claim 5, characterized in that, During the design process, it includes: Defining the design specifications of instrument components and designing instrument components by using a unified standard; Building a system framework from the perspective of instrument component specifications so that components that meet the instrument component specifications can be reused within this system framework; Defining the interoperability method between each instrument component based on the system framework to achieve component assembly.
7. The design method of the system framework for instrument component reuse and assembly according to claim 6, characterized in that, The design specifications of the instrument components include one or any combination of the following: 1) The instrument components adopt modular design; 2) The instrument components use polymorphism; 3) The instrument components define clear functional boundaries; 4) The interfaces of the instrument components are clear; 5) The instrument components define exception codes; Or / and the system framework design includes one or any combination of the following: 1) The system framework adopts a layered design to provide basic support; 2) The system framework can reuse instrument components; 3) The system framework uses dependency injection to manage the dependencies between components; 4) The system framework defines exception codes; Or / and the interoperability methods between instrument components include one or any combination of the following: 1) The instrument components use a common data format to achieve heterogeneous data exchange; 2) The instrument components pass information using parameters; 3) The instrument components only call standardized interfaces; 4) The instrument components communicate through a message middleware.
8. The design method of the system framework for instrument component reuse and assembly according to claim 1, characterized in that, The design specifications of the instrument components also include one or any combination of the following: 1) Modular design means that the internal functions of the instrument components are closely related, achieving a single responsibility, and using data coupling; 2) Polymorphism means that by encapsulating data and operation interfaces in a structure, using function pointers to point to different implementations, and calling the corresponding functions according to the actual type at runtime; 3) Defining clear functional boundaries means using local variables in the functions of the instrument components, restricting the visibility of internal functions through the static keyword, and avoiding direct external calls; 4) Clear interfaces mean that the interfaces need to clarify input / output parameters, exception handling, and pre / post conditions; 5) Exception codes mean defining an enumeration to implement a standardized classification of error codes to distinguish functional-level errors; Or / and the system framework design also includes one or any combination of the following: 1) Layered design means the hardware driver layer, function module layer, application interface layer, business logic layer, and system application layer; 2) Reuse means in a way of combination rather than inheritance; 3) Dependency injection means passing dependency parameters in the form of a union pointer; 4) Exception codes mean defining an enumeration to implement a standardized classification of error codes to distinguish system-level errors; Or / and the interoperability methods between instrument components also include one or any combination of the following: 1) The common data format means using a union to achieve polymorphic data storage, supporting storing different types of data in the same memory area; 2) Parameter passing means passing through a pointer and cooperating with a mutex; 3) Standardized interfaces mean interfaces that conform to the design specifications of the instrument components; 4) Message middleware means a queue mechanism that implements one-to-one reliable transmission.
9. A computer system, characterized in that, Include: A processor; A memory for storing executable instructions of the processor; Wherein, when the processor is configured to execute the executable instructions, it implements the design method of the system framework for instrument component reuse and assembly according to one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, Include: A memory, on which a computer program is stored; A processor, for executing the program in the memory to implement the design method of the system framework for instrument component reuse and assembly according to one of claims 1 to 8.
Citation Information
Patent Citations
Method for constructing real-time embedded type 3D (three-dimensional) digital instrument
CN102541559A
Behavior-based instrument component interface packaging system and method
CN117319840A
Design method of bus instrument component based on OOP
CN118245024A