Input-output relationship configuration processing method and system, and storage medium
By using a data structure and configuration data package with piecewise linear input-output relationships, the problem of needing to modify code to configure input-output relationships in embedded systems is solved, enabling flexible adjustment of input-output relationships and simplifying the configuration process.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2026-03-26
AI Technical Summary
The existing configuration method for input-output relationships in embedded systems requires code modification, making it inconvenient to adjust input-output relationships that change frequently.
A piecewise linear input-output relationship data structure and configuration data package are used. Flexible configuration of the input-output relationship is achieved through data structure update processing, avoiding code changes.
It enables flexible configuration of the input-output relationship of embedded systems, simplifies the modification process, requires no changes to the application code, and ensures a linear relationship between the input signal data and the output target data.
Smart Images

Figure CN2024120643_26032026_PF_FP_ABST
Abstract
Description
Input-output relationship configuration processing method and system, storage medium TECHNICAL FIELD
[0001] The present application relates to the technical field of embedded systems, and particularly relates to an input-output relationship configuration processing method, system and storage medium. BACKGROUND
[0002] An embedded system is a special-purpose computer system that is application-centered and based on modern computer technology, and can flexibly tailor software and hardware modules according to user requirements (function, reliability, cost, size, power consumption, environment, etc.). In a traditional embedded system in which a single input determines an output, the configuration of the input-output relationship is implemented by code in the design and cannot be changed. If the configuration mode of the input-output relationship of the system needs to be changed, the code needs to be changed. For an embedded system in which the input-output relationship needs to be frequently changed, the code of the configuration mode of the input-output relationship of the system needs to be correspondingly changed, which is very inconvenient.
[0003] SUMMARY TECHNICAL PROBLEM
[0004] The present application provides an input-output relationship configuration processing method, system and storage medium, which can solve the problem that, for an embedded system in which the input-output relationship needs to be frequently changed, the code of the configuration mode of the input-output relationship of the system needs to be correspondingly changed, which is very inconvenient. TECHNICAL SOLUTION
[0005] The present application provides an input-output relationship configuration processing method, which comprises the following steps:
[0006] Obtaining a data structure of a segmented linear input-output relationship of a configured object;
[0007] Obtaining a configuration data packet of the configured object, and updating the data structure according to the configuration data packet;
[0008] Sampling and sending input signal data of the configured object to the data structure, and obtaining output target data of the configured object.
[0009] Optionally, the step of obtaining the data structure of the segmented linear input-output relationship of the configured object comprises the following steps:
[0010] Establishing a data structure of a segmented linear input-output relationship of a configured object;
[0011] According to the obtained data structure, the data structure is initialized.
[0012] Optionally, the step of obtaining the configuration data packet of the configured object comprises the following steps:
[0013] obtaining a configuration data packet of a piecewise linear input-output relationship of the configured object;
[0014] checking the correctness of the configuration data packet by checking data;
[0015] checking the completeness of input signal data in the configuration data packet.
[0016] Optionally, the updating of the data structure according to the configuration data packet comprises:
[0017] updating the data structure of the piecewise linear input-output relationship of the configured object according to the obtained configuration data packet;
[0018] converting data in fractional form in the configuration data packet into corresponding system input data format, and updating members of the corresponding data structure to form threshold data for input searching.
[0019] Optionally, the sampling of input signal data of the configured object and the sending of the input signal data to the data structure, and the obtaining of output target data of the configured object comprise:
[0020] sampling input signal data of the configured object;
[0021] searching for a linear input-output segment function of a piecewise linear input-output function of a piecewise linear input-output relationship corresponding to the input signal data;
[0022] calculating output percentage data of the configured object by using a slope constant a and an intercept constant b of the linear input-output segment function;
[0023] converting the output percentage data of the configured object into output target data of the configured object.
[0024] Optionally, before the obtaining of the data structure of the piecewise linear input-output relationship of the configured object, the method further comprises:
[0025] obtaining a required input-output relationship of the configured object;
[0026] linearizing the required input-output relationship to obtain a corresponding piecewise linear input-output curve;
[0027] obtaining a corresponding piecewise linear input-output function according to the piecewise linear input-output curve;
[0028] the piecewise linear input-output function is as follows:
[0029] a1, b1 are respectively a first slope constant and a first intercept constant of a first linear input-output segment function of the piecewise linear input-output function f(x);
[0030] min1, max1 are respectively a first function minimum input value and a first function maximum input value of the first linear input-output segment function of the piecewise linear input-output function f(x);
[0031] a2, b2 are respectively a second slope constant and a second intercept constant of a second linear input-output segment function of the piecewise linear input-output function f(x);
[0032] min2, max2 are respectively a second function minimum input value and a second function maximum input value of the second linear input-output segment function of the piecewise linear input-output function f(x);
[0033] a n , b n are respectively an nth slope constant and an nth intercept constant of an nth linear input-output segment function of the piecewise linear input-output function f(x);
[0034] min n , max n are respectively an nth function minimum input value and an nth function maximum input value of the nth linear input-output segment function of the piecewise linear input-output function f(x);
[0035] n is an integer greater than or equal to 1.
[0036] Optionally, the obtaining of the configuration data packet of the configured object further comprises:
[0037] According to the obtained piecewise linear input-output function, each linear input-output segment function of the piecewise linear input-output function is determined.
[0038] The slope constant a n , the intercept constant b n , the function minimum input value min n , and the function maximum input value max n of each linear input-output segment function are converted to obtain a corresponding fractional form data set; wherein n is an integer greater than or equal to 1.
[0039] According to the obtained fractional form data set, a data packet of the piecewise linear input-output relationship of the configured object is obtained, and the data packet is set as the configuration data packet.
[0040] In addition, the present application also proposes an input-output relationship configuration processing system, comprising:
[0041] The data structure acquisition module is configured to acquire a data structure of a piecewise linear input-output relationship of the configured object;
[0042] The data structure updating module is configured to acquire a configuration data packet of the configured object and update the data structure according to the configuration data packet.
[0043] The input-output control module is configured to sample and send input signal data of the configured object to the data structure and acquire output target data of the configured object.
[0044] In addition, the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement all or part of the method steps of the input-output relationship configuration processing method.
[0045] In addition, the present application further provides an electronic device, which comprises a memory and a processor, and the memory stores a computer program running on the processor, and the processor implements all or part of the method steps of the input-output relationship configuration processing method when executing the computer program. Advantages
[0046] The technical scheme provided by the present application has the following advantages:
[0047] The system input-output relationship required by the configured object is processed into a piecewise linear input-output relationship, and a corresponding data structure of the piecewise linear input-output relationship is obtained, and then the configuration data packet required by the configured object is processed into a configuration data packet corresponding to the piecewise linear input-output relationship; after updating the data structure according to the configuration data packet corresponding to the piecewise linear input-output relationship, the input signal data and the output target data of the configured object are in a linear relationship; according to the piecewise linear input-output relationship, the input signal data is input into the updated data structure of the configured object, and the corresponding linearly related output target data is obtained.
[0048] Therefore, for the embedded system which needs to frequently change the input-output relationship, when the configuration mode of the input-output relationship of the configured object needs to be changed, only the data structure corresponding to the piecewise linear input-output relationship needs to be constructed, and the configuration data packet corresponding to the piecewise linear input-output relationship needs to be sent to the data structure, so that the configuration mode of the input-output relationship of the configured object can be changed, and the configured object can output the required output target data, which is simple and convenient, and does not need to change the application code. BRIEF DESCRIPTION OF DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced. Obviously, the drawings in the following description only constitute some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort.
[0050] Fig. 1 is a schematic diagram of steps of the input-output relationship configuration processing method according to an embodiment of the present application;
[0051] Fig. 2 is a schematic diagram of the input-output relationship configuration processing method according to an embodiment of the present application, in which the embedded system is a motor frequency conversion control system;
[0052] Fig. 3 is a schematic diagram of input-output setting relationship of the motor frequency conversion control system according to an embodiment of the present application;
[0053] Fig. 4 is a schematic diagram of input-output setting relationship of the motor frequency conversion control system according to an embodiment of the present application;
[0054] Fig. 5 is a schematic diagram of structure of the input-output relationship configuration processing system according to an embodiment of the present application. Embodiments of the present application
[0055] In order to make the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without any creative effort fall within the scope of protection of the present application.
[0056] As shown in Fig. 1, the present application provides an input-output relationship configuration processing method applied to an embedded system which needs to frequently change input-output relationship. Specifically, the input-output relationship configuration processing method can include the following steps:
[0057] S100, obtaining a data structure of segmented linear input-output relationship of a configured object;
[0058] S200, obtaining a configuration data packet of the configured object, and updating the data structure according to the configuration data packet;
[0059] S300, sampling and sending input signal data of the configured object to the data structure, and obtaining output target data of the configured object.
[0060] The system input and output relationship required by the configured object is processed as a segmented linear input and output relationship, and a data structure corresponding to the segmented linear input and output relationship is obtained, and then the configuration data packet required by the configured object is processed as a configuration data packet corresponding to the segmented linear input and output relationship; after the data structure is updated according to the configuration data packet corresponding to the segmented linear input and output relationship, the input signal data of the configured object and the output target data are in a linear relationship; according to the segmented linear input and output relationship, the input signal data is input into the updated data structure of the configured object, and the corresponding linearly related output target data is obtained.
[0061] Therefore, for the embedded system which needs to frequently change the input and output relationship, when the configuration mode of the input and output relationship of the configured object needs to be changed, only the data structure corresponding to the segmented linear input and output relationship needs to be constructed, and the configuration data packet corresponding to the segmented linear input and output relationship is sent to the data structure, so that the configuration mode of the input and output relationship of the configured object can be changed, and the configured object can output the required output target data, which is simple and convenient, and does not need to change the application code.
[0062] Further, before the data structure of the segmented linear input and output relationship of the configured object is obtained in step S100, the following steps are further included:
[0063] S102, obtaining a required input and output relationship of the configured object;
[0064] S104, linearizing the required input and output relationship to obtain a corresponding segmented linear input and output curve;
[0065] S106, obtaining a corresponding segmented linear input and output function according to the segmented linear input and output curve.
[0066] By linearizing the required input and output relationship of the configured object, the nonlinear required input and output relationship can be converted into a linear multi-segment curve (i.e. a segmented linear input and output curve). For example, the AD segmented calculation method can be used to linearize the required input and output relationship, or the segmented linear approximation method can be used for linearization, and other methods can also be used for linearization.
[0067] Further, the segmented linear input and output curve obtained by linearizing the required input and output relationship of the configured object is calculated in the rectangular coordinate system, and the linear input and output segment function composed of multiple segments is obtained. Specifically, the segmented linear input and output function can be as follows:
[0068] Wherein, a1 and b1 are respectively the first slope constant and the first intercept constant of the first linear input-output segment function of the piecewise linear input-output function f(x);
[0069] min1 and max1 are respectively the first function minimum input value and the first function maximum input value of the first linear input-output segment function of the piecewise linear input-output function f(x);
[0070] a2 and b2 are respectively the second slope constant and the second intercept constant of the second linear input-output segment function of the piecewise linear input-output function f(x);
[0071] min2 and max2 are respectively the second function minimum input value and the second function maximum input value of the second linear input-output segment function of the piecewise linear input-output function f(x);
[0072] a n and b n are respectively the nth slope constant and the nth intercept constant of the nth linear input-output segment function of the piecewise linear input-output function f(x);
[0073] min n and max n are respectively the nth function minimum input value and the nth function maximum input value of the nth linear input-output segment function of the piecewise linear input-output function f(x);
[0074] n is an integer greater than or equal to 1.
[0075] Further, in step S100, the data structure of the piecewise linear input-output relationship of the configured object is obtained, including:
[0076] S110, the data structure of the piecewise linear input-output relationship of the configured object is established.
[0077] Wherein, the data structure can be divided into two layers, the first layer is the definition of the structure of the linear input-output segment function of each segment of the piecewise linear input-output function f(x) corresponding to the piecewise linear input-output relationship, and the second layer is the definition of the structure of the piecewise linear input-output relationship.
[0078] Further, the definition of the structure of the linear input-output segment function of each segment is as follows:
[0079] Typedef struct {
[0080] Int Numerator_a; / / a numerator
[0081] Int Denominator_a; / / a denominator
[0082] Int Numerator_b; / / b's numerator
[0083] Int Denominator_b; / / b's denominator
[0084] Int Numerator_min; / / min's numerator
[0085] Int Denominator_min; / / min's denominator
[0086] Int Numerator_max; / / max's numerator
[0087] Int Denominator_max; / / max's denominator
[0088] Unsigned int min; / / input min value of this section
[0089] Unsigned int max; / / input max value of this section
[0090] } section_func_stru;
[0091] Further, the definition of the second layer, the structure body of the segmented linear input-output relationship, is as follows:
[0092] Typedef struct {
[0093] Unsigned char Section_Num; / / total section number
[0094] section_func_stru section_func_data[sec_max]; / / maximum support sec_max sections, sec_max can be defined according to needs
[0095] } input_output_stru;
[0096] S120, according to the obtained data structure, initializing the data structure. By initializing the data structure, it is convenient to subsequently transport the configuration data packet of the configured object into the data structure, update the configuration of the data structure, so as to change the input-output relationship of the configured object.
[0097] In addition, before obtaining the configuration data packet of the configured object in step S200, the following steps can be further included:
[0098] S202, according to the obtained segmented linear input-output function, determining each linear input-output section function of the segmented linear input-output function;
[0099] S204, the slope constant a of each linear input-output segment function n , the intercept constant b n , the minimum input value min of the function n , the maximum input value max of the function n , the maximum input value max of the function
[0100] S206, obtaining the data communication package of the segmented linear input-output relationship of the configured object according to the obtained fractional form data set, and setting the data communication package as the configuration data package.
[0101] It can be known that the data communication package of the segmented linear input-output relationship of the configured object can include the following contents:
[0102] Data package header identification;
[0103] Data length;
[0104] The number n of linear input-output segment functions of the segmented linear input-output function;
[0105] The numerator and denominator of the first slope constant a1 of the first linear input-output segment function after fractional processing, the numerator and denominator of the first intercept constant b1 after fractional processing, the numerator and denominator of the first minimum input value min1 after fractional processing, and the numerator and denominator of the first maximum input value max1 after fractional processing;
[0106] The numerator and denominator of the second slope constant a2 of the second linear input-output segment function after fractional processing, the numerator and denominator of the second intercept constant b2 after fractional processing, the numerator and denominator of the second minimum input value min2 after fractional processing, and the numerator and denominator of the second maximum input value max2 after fractional processing;
[0107] …
[0108] The numerator and denominator of the nth slope constant a of the nth linear input-output segment function after fractional processing, the numerator and denominator of the nth intercept constant b after fractional processing, the numerator and denominator of the nth minimum input value min after fractional processing, and the numerator and denominator of the nth maximum input value max after fractional processing; n n n n
[0109] Check data.
[0110] Moreover, in step S200, obtaining the configuration data package of the configured object can further include the following steps:
[0111] S210, obtaining the configuration data packet of the piecewise linear input-output relationship of the configured object. As described above, the corresponding piecewise linear input-output function can be obtained according to the piecewise linear input-output relationship of the configured object, and the corresponding configuration data packet can be obtained according to the piecewise linear input-output function.
[0112] S220, checking the correctness of the configuration data packet by checking data. That is, in the received configuration data packet, there is a special data segment, which is checking data, used to check whether the configuration data packet is correct.
[0113] S230, checking the completeness of the input signal data in the configuration data packet. That is, the checking data can be used to check whether the input signal data in the configuration data packet contains complete range.
[0114] Further, in step S200, the updating process of the data structure according to the configuration data packet can further include the following steps:
[0115] S240, updating the data structure of the piecewise linear input-output relationship of the configured object according to the obtained configuration data packet.
[0116] That is, according to the obtained configuration data packet of the piecewise linear input-output relationship of the configured object, the data in the original data structure of the piecewise linear input-output relationship is replaced to obtain a new data structure.
[0117] S250, converting the fractional form data in the configuration data packet into the corresponding system input data format, and updating the members of the corresponding data structure to form the threshold data of input search.
[0118] That is, the minimum input value min n and the maximum input value max n of the function in the configuration data packet are converted from the fractional form to the system input data format; in addition, other data (such as the slope constant a n , the intercept constant b n , etc.) in the configuration data packet can also be converted from the fractional form to the system data format. After converting the data in the configuration data packet from the fractional form to the system data format, the corresponding data of the data structure is updated. In addition, the minimum input value min n and the maximum input value max n of the function converted to the system input data format are used as the search range data (i.e. threshold data) of the input signal data.
[0119] Further, in step S300, sampling and sending the input signal data of the configured object to the data structure body, obtaining the output target data of the configured object, can further include the following steps:
[0120] S310, sampling the input signal data of the configured object. That is, the input signal data can be acquired by the embedded controller of the configured object.
[0121] S320, searching for the linear input-output segment function of the piecewise linear input-output function corresponding to the piecewise linear input-output relationship of the input signal data.
[0122] According to the function minimum input value min of the system input data format obtained in the above steps n , the function maximum input value max n , and according to the collected input signal data, the function minimum input value min n and the function maximum input value max n corresponding to the input signal data can be determined, and according to the function minimum input value min n and the function maximum input value max n , a linear input-output segment function corresponding to the piecewise linear input-output function can be determined.
[0123] S330, using the slope constant a and the intercept constant b of the corresponding linear input-output segment function, calculating the output percentage data of the configured object.
[0124] After obtaining the linear input-output segment function of the piecewise linear input-output function corresponding to the piecewise linear input-output relationship of the input signal data, the slope constant a and the intercept constant b corresponding thereto can be determined, and the corresponding output percentage data can be obtained.
[0125] S340, converting the output percentage data of the configured object into the output target data of the configured object.
[0126] According to the preset conversion relationship, the output percentage data of the configured object can be converted into the output target data of the configured object.
[0127] For example, as shown in FIG. 2, an embedded system requiring frequently changed input-output relationship can be set as a motor variable frequency control system. The motor variable frequency control system can include a microprocessor (i.e., an embedded controller), a motor drive module connected to the microprocessor, and a motor connected to the motor drive module. The microprocessor can be the set object, and the data structure and the data configuration package corresponding to the segmented linear input-output relationship formed by the segmented linear input-output function f(x) can be configured in the microprocessor, so that the microprocessor controls the motor drive module to drive the motor according to the input signal data, and the motor output speed of the motor reaches the output target speed (i.e., the output target data).
[0128] In the motor variable frequency control system, the output target speed (i.e., the output target data) of the motor is determined by the motor input signal. The types of motor input signals are commonly VSP (voltage control speed), PWM (duty ratio), and frequency. The segmented linear input-output relationship between these motor input signals and the motor output speed is usually a fixed and relatively simple relationship. As shown in the following example (X axis is input and Y axis is output, both in %), the following is an example of VSP (voltage control speed): assuming that 100% of the input corresponds to an A / D value of 1023, and 100% of the output speed is 3000 RPM, the results of example one and example two are shown in FIGS. 3 and 4 when the system input signal A / D values are 200 and 700, respectively.
[0129] Specifically, in example one, as shown in FIG. 3, the number of linear input-output segment functions of the segmented linear input-output function is 3; the numerator of the first slope constant a1 of the first linear input-output segment function after fractional processing is 0, and the denominator is 1; the numerator of the numerical value of the first intercept constant b1 in fractional form is 0, and the denominator is 1; the numerator of the numerical value of the first function minimum input value min1 in fractional form is 0, and the denominator is 1; the numerator of the numerical value of the first function maximum input value max1 in fractional form is 1, and the denominator is 10;
[0130] The numerator of the second slope constant a2 of the second linear input-output segment function after fractional processing is 17, and the denominator is 16; the numerator of the numerical value of the second intercept constant b2 in fractional form is 3, and the denominator is 20; the numerator of the numerical value of the second function minimum input value min2 in fractional form is 1, and the denominator is 10; the numerator of the numerical value of the second function maximum input value max2 in fractional form is 9, and the denominator is 10;
[0131] The numerator of the third slope constant a3 of the third linear input-output segment function after fractionalization processing is 0, and the denominator is 1; the numerator of the fractional form of the numerical value of the third intercept constant b3 is 1, and the denominator is 1; the numerator of the fractional form of the numerical value of the minimum input value min3 of the third function is 9, and the denominator is 10; and the numerator of the fractional form of the numerical value of the maximum input value max3 of the third function is 1, and the denominator is 1.
[0132] At this time, the piecewise linear input-output function f(x) corresponding to the piecewise linear input-output relationship between the motor input signal and the motor output speed is shown in FIG. 3, where the X axis is the input and the Y axis is the output, and the units are %. When the input X = 200 / 1023 = 19.55%, the corresponding function segment is the second linear input-output segment function, the formula of the second linear input-output segment function is f(x) = 17 / 16*(x-1 / 10) + 3 / 20 = 25.15%, and the output target speed = 3000*25.15% = 754.5 RPM; when the input X = 700 / 1023 = 68.43%, the corresponding function segment is the second linear input-output segment function, the formula of the second linear input-output segment function is f(x) = 17 / 16*(x-1 / 10) + 3 / 20 = 77.08%, and the output target speed = 3000*77.08% = 2313.4 RPM.
[0133] In addition, in Example Two, as shown in FIG. 4, the number of linear input-output segment functions of the piecewise linear input-output function is 4; the numerator of the first slope constant a1 of the first linear input-output segment function after fractionalization processing is 0, and the denominator is 1; the numerator of the fractional form of the numerical value of the first intercept constant b1 is 0, and the denominator is 1; the numerator of the fractional form of the numerical value of the minimum input value min1 of the first function is 0, and the denominator is 1; the numerator of the fractional form of the numerical value of the maximum input value max1 of the first function is 1, and the denominator is 10;
[0134] The numerator of the second slope constant a2 of the second linear input-output segment function after fractionalization processing is 3, and the denominator is 2; the numerator of the fractional form of the numerical value of the second intercept constant b2 is 3, and the denominator is 20; the numerator of the fractional form of the numerical value of the minimum input value min2 of the second function is 1, and the denominator is 10; the numerator of the fractional form of the numerical value of the maximum input value max2 of the second function is 2, and the denominator is 5;
[0135] The numerator of the third slope constant a3 of the third linear input-output segment function after fractionalization processing is 8, and the denominator is 11; the numerator of the fractional form of the numerical value of the third intercept constant b3 is 3, and the denominator is 5; the numerator of the fractional form of the numerical value of the minimum input value min3 of the third function is 2, and the denominator is 5; and the numerator of the fractional form of the numerical value of the maximum input value max3 of the third function is 19, and the denominator is 20.
[0136] The numerator of the fractionized fourth slope constant a1 of the fourth linear input-output segment function is 0, and the denominator is 1; the numerator of the fraction form of the fourth intercept constant b1 is 1, and the denominator is 1; the numerator of the fraction form of the minimum input value min1 of the fourth function is 19, and the denominator is 20; and the numerator of the fraction form of the maximum input value max1 of the fourth function is 1, and the denominator is 1;
[0137] At this time, the piecewise linear input-output relationship between the motor input signal and the motor output speed corresponds to the piecewise linear input-output function f(x) as shown in FIG. 4, where the X axis is the input, and the Y axis is the output, and the units are %. When the input X = 200 / 1023 = 19.55%, the corresponding function segment is the second linear input-output segment function, the formula of the second linear input-output segment function is f(x) = 3 / 2*(x-1 / 10) + 3 / 20 = 29.33%, and the output target speed = 3000*29.33% = 879.9 RPM; when the input X = 700 / 1023 = 68.43%, the corresponding function segment is the third linear input-output segment function, the formula of the second linear input-output segment function is f(x) = 8 / 11*(x-2 / 5) + 3 / 5 = 80.68%, and the output target speed = 3000*80.68% = 2420.4 RPM.
[0138] In addition, the present application also provides an input-output relationship configuration processing system 100, which is applied to an embedded system that needs to frequently change the input-output relationship. Specifically, as shown in FIG. 5, the input-output relationship configuration processing system 100 can include:
[0139] a data structure acquisition module 110, configured to acquire a data structure of the piecewise linear input-output relationship of the configured object;
[0140] a data structure updating module 120, configured to acquire a configuration data packet of the configured object, and update the data structure according to the configuration data packet;
[0141] an input-output control module 130, configured to sample and send the input signal data of the configured object to the data structure, and acquire the output target data of the configured object.
[0142] The input-output relationship configuration processing system 100 described in the embodiment corresponds to the input-output relationship configuration processing method described above, and the functions of each module in the input-output relationship configuration processing system 100 are described in detail in the corresponding method embodiment, which will not be described herein again.
[0143] Based on the same inventive concept, the embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement all method steps or part of method steps in the input / output relationship configuration processing method.
[0144] The present application can implement all or part of the above method, and can also be completed by a computer program instructing related hardware. The computer program can be stored in a computer readable storage medium, and the computer program can implement the steps of the above method embodiments when executed by a processor. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms. The computer readable medium can include any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content of the computer readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
[0145] Based on the same inventive concept, the embodiment of the present application further provides an electronic device, which includes a memory and a processor, and the memory stores a computer program running on the processor, and the processor implements all method steps or part of method steps in the input / output relationship configuration processing method when executing the computer program.
[0146] The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. The processor is the control center of the computer device, and connects all parts of the computer device through various interfaces and lines.
[0147] The memory can be used to store a computer program and / or a model, and the processor implements various functions of the computer device by running or executing the computer program and / or the model stored in the memory, and calling data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application program (such as a sound playing function, an image playing function, etc.) required by a function; and the data storage area can store data (such as audio data, video data, etc.) created according to the use of the mobile phone. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state memory devices.
[0148] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, a server or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage, etc.) containing computer-usable program code.
[0149] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), servers and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device that implements the functions specified in one or more flows in the flowcharts and / or one or more blocks in the block diagrams.
[0150] These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction devices that implement the functions specified in one or more flows in the flowcharts and / or one or more blocks in the block diagrams.
[0151] These computer program instructions can also be loaded into a computer or other programmable data processing devices, so that a series of operational steps are performed on the computer or other programmable devices to generate computer-implemented processes, so that the instructions executed on the computer or other programmable devices provide steps for implementing the functions specified in one or more flows in the flowchart and / or one or more blocks in the block diagram.
[0152] Obviously, various modifications and changes can be made to the present application by those skilled in the art without departing from the spirit and scope of the application. Accordingly, it is intended that the present application embrace all such modifications and changes as fall within the scope of the appended claims and their equivalents.
Claims
1. An input-output relationship configuration processing method characterized by comprising: The method comprises: obtaining a data structure of a segmented linear input-output relationship of a configured object; obtaining a configuration data packet of the configured object, and updating the data structure according to the configuration data packet; sampling and sending input signal data of the configured object to the data structure, and obtaining output target data of the configured object.
2. The input / output relationship configuration processing method according to claim 1, characterized by, The data structure of the segmented linear input-output relationship of the configured object comprises: establishing a data structure of a segmented linear input-output relationship of a configured object; initializing the data structure according to the obtained data structure.
3. The input / output relationship configuration processing method according to claim 2, characterized by, The configuration data packet of the configured object comprises: obtaining a configuration data packet of a segmented linear input-output relationship of the configured object; checking the correctness of the configuration data packet through verification data; checking the completeness of input signal data in the configuration data packet.
4. The input / output relationship configuration processing method according to claim 3, characterized by, The updating of the data structure according to the configuration data packet comprises: updating the data structure of the segmented linear input-output relationship of the configured object according to the obtained configuration data packet; converting data in fractional form in the configuration data packet into corresponding system input data format, updating corresponding members of the data structure, and forming threshold data for input retrieval.
5. The input / output relationship configuration processing method according to claim 4, characterized by, The sampling and sending of the input signal data of the configured object to the data structure, and the obtaining of the output target data of the configured object, comprise: sampling the input signal data of the configured object; retrieving a linear input-output segment function of a segmented linear input-output function corresponding to the input signal data; calculating output percentage data of the configured object by using a slope constant a and an intercept constant b of the linear input-output segment function; converting the output percentage data of the configured object into the output target data of the configured object.
6. The input / output relationship configuration processing method according to claim 1, characterized by, Before the obtaining of the data structure of the segmented linear input-output relationship of the configured object, the method further comprises: obtaining a required input-output relationship of the configured object; linearizing the required input-output relationship to obtain a corresponding segmented linear input-output curve; obtaining a corresponding segmented linear input-output function according to the segmented linear input-output curve; The piecewise linear input-output function is as follows: wherein a1 and b1 are respectively a first slope constant and a first intercept constant of a first linear input-output segment function of the segmented linear input-output function f(x); min1 and max1 are respectively a first function minimum input value and a first function maximum input value of the first linear input-output segment function of the segmented linear input-output function f(x); a2 and b2 are respectively a second slope constant and a second intercept constant of a second linear input-output segment function of the segmented linear input-output function f(x); min2 and max2 are respectively a second function minimum input value and a second function maximum input value of the second linear input-output segment function of the segmented linear input-output function f(x); a n , b n are the nth slope constant and the nth intercept constant, respectively, of the nth linear input-output segment function of the piecewise linear input-output function f(x). min n 、max n are the nth function minimum input value and the nth function maximum input value of the nth linear input-output segment function of the piecewise linear input-output function f(x), respectively. n is an integer greater than or equal to 1.
7. The input / output relationship configuration processing method according to claim 6, characterized by, The obtaining of the configuration data packet of the configured object further comprises: determining each linear input-output segment function of the piecewise linear input-output function according to the obtained piecewise linear input-output function; a slope constant a of each of the linear input-output segment functions n a intercept constant b of each of the linear input-output segment functions n a minimum input value min of each of the linear input-output segment functions n a maximum input value max of each of the linear input-output segment functions n converts to obtain a corresponding score form data set; wherein n is an integer greater than or equal to 1. obtaining a data package of the piecewise linear input-output relationship of the configured object according to the obtained fractional form data set, and setting the data package as a configuration data package.
8. An input-output relationship configuration processing system characterized by comprising: comprising: a data structure obtaining module, configured to obtain a data structure of a piecewise linear input-output relationship of a configured object; a data structure updating module, configured to obtain a configuration data package of the configured object, and perform updating processing on the data structure according to the configuration data package; an input-output control module, configured to sample and send input signal data of the configured object to the data structure, and obtain output target data of the configured object.
9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer program, and the computer program is executed by the processor to implement all method steps or part of the method steps in the input-output relationship configuration processing method according to any one of claims 1 to 7.
10. An electronic device, comprising: The memory and the processor are included, and the memory stores a computer program running on the processor, and the processor implements all method steps or part of the method steps in the input-output relationship configuration processing method according to any one of claims 1 to 7 when executing the computer program.
Citation Information
Patent Citations
Method and device for configuring relations of data
CN103605699A
A WEB-based development method and system of a configurable form application front end
CN109918370A
Embedded system configuration data generation method
CN111679867A
Neural network model training method, data processing method and device
CN115906995A
Meteorological index-based resident living electricity consumption forecasting method and equipment
CN117522075A