Parameter storage method, related device and computer readable medium
By setting a shadow storage area in the software of the electronic system, only downloading to the hardware storage area only when the parameter value changes, the problem of downloading the parameters in the existing technology and improving the system performance.
Patent Information
- Application Number
- CN202310926041.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-26
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2043-07-26
AI Technical Summary
During the parameter download process of existing electronic systems, the amount of parameters that need to be interacted with is too large, resulting in repeated download of unchanged parameter values, which takes a long time and affects system performance.
By setting a shadow storage area in the software part, the response to the parameter changes instructions, the parameter value calculation of the specific parameter node, write into the shadow storage area, only detect the parameter value written by the shadow storage area and the parameter value of the hardware storage area. At different times, download it to the hardware storage area.
Avoid repeatedly downloading unchanged parameter values, reducing the interaction between software and hardware, and improving the overall performance of the electronic system.
Smart Images

Figure CN119376821A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a parameter storage method, a related device and a computer-readable medium. Background Art
[0002] Existing electronic systems are usually composed of software and hardware. During the operation of the electronic system, there will be a large number of parameter interactions between the software and hardware parts of the electronic system. Taking the ultrasound diagnosis system as an example, the ultrasound diagnosis system includes multiple modes such as 2D, DOP, 3D, 4D, and a combination of basic modes. When the ultrasound diagnosis system is in scenarios such as mode switching and parameter adjustment, the software part of the ultrasound diagnosis system needs to download all parameters in the currently changed mode to the storage area of the hardware part for storage.
[0003] However, in the parameter interaction process of existing electronic systems, the number of parameters that need to be interacted is too large, and some parameters whose parameter values have not changed are still repeatedly downloaded to the hardware, which leads to a long parameter download time and slow hardware processing speed, affecting the overall performance of the electronic system. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a parameter storage method, a related device and a computer-readable medium to improve the efficiency of parameter delivery.
[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0006] In a first aspect, the present application discloses a parameter storage method, which is applied to a parameter download framework of an electronic system, wherein the parameter download framework of the electronic system is set in the software part of the electronic system, and the parameter storage method comprises: in response to an instruction affecting parameter changes, calculating a parameter value of a specific parameter node to obtain the latest parameter value of the specific parameter node; wherein the instruction affecting parameter changes is an instruction affecting the parameter value change of an upper-level parameter node; the specific parameter node comprises the upper-level parameter node, and an associated parameter node of the upper-level parameter node; the associated parameter node is a parameter node affected by the parameter value change of the upper-level parameter node; the latest parameter value of the specific parameter node is written into a shadow storage area corresponding to the specific parameter node; wherein the shadow storage area is a cache area of the software part of the electronic system; the shadow storage area is used to record the parameter value of the parameter node currently stored in the hardware storage area corresponding to the shadow storage area; if it is detected that the latest parameter value written into the shadow storage area is different from the parameter value of the hardware storage area recorded before writing, the latest parameter value in the shadow storage area is downloaded to the hardware storage area corresponding to the shadow storage area.
[0007] Optionally, in the above-mentioned parameter storage method, after writing the latest parameter value of the specific parameter node into the shadow storage area corresponding to the specific parameter node, it also includes: if it is detected that the latest parameter value written into the shadow storage area is the same as the parameter value of the hardware storage area recorded before writing, the latest parameter value in the shadow storage area is not downloaded to the hardware storage area corresponding to the shadow storage area.
[0008] Optionally, in the above-mentioned parameter storage method, if it is detected that the latest parameter value written into the shadow storage area is different from the parameter value of the hardware storage area recorded before writing, the latest parameter value in the shadow storage area is downloaded to the hardware storage area corresponding to the shadow storage area, including: if it is detected that the shadow storage area has a first dirty flag set, the latest parameter value in the shadow storage area with the first dirty flag set is downloaded to the hardware storage area corresponding to the shadow storage area; wherein the first dirty flag is used to indicate that the latest parameter value currently written into the shadow storage area is different from the parameter value of the hardware storage area recorded before writing.
[0009] Optionally, in the above-mentioned parameter storage method, in response to the instruction affecting parameter change, performing parameter value calculation on a specific parameter node to obtain the latest parameter value of the specific parameter node, includes: in response to the instruction affecting parameter change, performing parameter value calculation on an upper-level parameter node according to the instruction affecting parameter change to obtain the latest parameter value of the upper-level parameter node; detecting whether the latest parameter value of the upper-level parameter node is the same as the parameter value before the upper-level parameter node is calculated; if it is detected that the latest parameter value of the upper-level parameter node is the same as the parameter value before the upper-level parameter node is calculated, then terminating the parameter value calculation for the specific parameter node; if it is detected that the latest parameter value of the upper-level parameter node is the same as the parameter value before the upper-level parameter node is calculated, then terminating the parameter value calculation for the specific parameter node; If the latest parameter value is different from the parameter value before the upper parameter node is calculated, a second dirty flag is set for the upper parameter node to trigger parameter value calculation for the output parameter node of the upper parameter node to obtain the latest parameter value of the output parameter node; wherein the output parameter node of the upper parameter node is an associated parameter node that calculates its own parameter value based on the parameter value of the upper parameter node; taking the output parameter node as a new upper parameter node, returning to the step of detecting whether the latest parameter value of the upper parameter node is the same as the parameter value before the upper parameter node is calculated, until there is no output parameter node of the upper parameter node.
[0010] Optionally, in the above-mentioned parameter storage method, writing the latest parameter value of the specific parameter node into the shadow storage area corresponding to the specific parameter node includes: filtering out parameter nodes with a second dirty flag set from the specific parameter nodes; and writing the latest parameter values of the filtered parameter nodes into the shadow storage area corresponding to the filtered parameter nodes.
[0011] Optionally, in the above-mentioned parameter storage method, the parameter download framework of the electronic system includes at least a parameter response module and a parameter linkage module; wherein, in response to the parameter change influencing instruction, parameter value calculation is performed on a specific parameter node to obtain the latest parameter value of the specific parameter node, including: the parameter response module responds to the parameter change influencing instruction, receives the parameter change influencing instruction through the upper-layer parameter change influencing interface, so as to trigger the parameter linkage module to perform parameter value calculation on the specific parameter node according to the parameter change influencing instruction, and obtain the latest parameter value of the specific parameter node.
[0012] Optionally, in the above-mentioned parameter storage method, the parameter download framework of the electronic system also includes: a download control module and a parameter mapping module; the parameter mapping module records the correspondence between the parameter nodes of the electronic system and the shadow storage area; the writing of the latest parameter value of the specific parameter node into the shadow storage area corresponding to the specific parameter node includes: the download control module obtains the latest parameter value of the specific parameter node from the parameter linkage module; the download control module writes the latest parameter value of the specific parameter node into the shadow storage area corresponding to the specific parameter node according to the correspondence between the parameter nodes of the electronic system and the shadow storage area recorded in the parameter mapping module.
[0013] Optionally, in the above-mentioned parameter storage method, the parameter mapping module also records the correspondence between the shadow storage area and the hardware storage area; wherein, if it is detected that the latest parameter value written in the shadow storage area is different from the parameter value of the hardware storage area recorded before writing, the latest parameter value in the shadow storage area is downloaded to the hardware storage area corresponding to the shadow storage area, including: if the download control module detects that the latest parameter value written in the shadow storage area is different from the parameter value of the hardware storage area recorded before writing, then according to the correspondence between the shadow storage area and the hardware storage area recorded by the parameter mapping module, the latest parameter value in the shadow storage area is downloaded to the hardware storage area corresponding to the shadow storage area.
[0014] In a second aspect, the present application discloses a parameter storage device, which is applied to a parameter download framework of an electronic system, wherein the parameter download framework of the electronic system is set in the software part of the electronic system, and the parameter storage device includes: a parameter calculation unit, which is used to calculate the parameter value of a specific parameter node in response to an instruction affecting parameter changes, and obtain the latest parameter value of the specific parameter node; wherein the instruction affecting parameter changes is an instruction that affects the parameter value change of an upper-level parameter node; the specific parameter node includes the upper-level parameter node, and an associated parameter node of the upper-level parameter node; the associated parameter node is a parameter node affected by the parameter value change of the upper-level parameter node; a first writing unit, which is used to write the latest parameter value of the specific parameter node into a shadow storage area corresponding to the specific parameter node; wherein the shadow storage area is a cache area of the software part of the electronic system; the shadow storage area is used to record the parameter value of the parameter node currently stored in the hardware storage area corresponding to the shadow storage area; a second writing unit, which is used to download the latest parameter value in the shadow storage area to the hardware storage area corresponding to the shadow storage area if it is detected that the latest parameter value written in the shadow storage area is different from the parameter value of the hardware storage area recorded before writing.
[0015] In a third aspect, the present application discloses a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any one of the first aspects above is implemented.
[0016] In a fourth aspect, the present application discloses a parameter storage device, comprising: one or more processors;
[0017] A storage device having one or more programs stored thereon; when the one or more programs are executed by the one or more processors, the one or more processors implement any method described in the first aspect above.
[0018] In a fifth aspect, the present application discloses an electronic system, comprising: an application layer, a parameter download framework and a hardware storage area; wherein the application layer and the parameter download framework are arranged in the software part of the electronic system; the application layer is used to generate instructions affecting parameter changes, and output the instructions affecting parameter changes to the parameter download framework; the parameter download framework is used to execute any method as described in the first aspect above; the hardware storage area is used to store parameter values of parameter nodes of the electronic system.
[0019] Based on the parameter storage method provided by the above-mentioned embodiment of the present invention, the method is applied to the parameter download framework of the electronic system, and the parameter download framework of the electronic system is set in the software part of the electronic system. By responding to the instruction affecting the parameter change, the parameter value of the specific parameter node is calculated to obtain the latest parameter value of the specific parameter node. Among them, the instruction affecting the parameter change is an instruction that affects the parameter value change of the upper parameter node. The specific parameter node includes the upper parameter node and the associated parameter node of the upper parameter node. Then the latest parameter value of the specific parameter node is written to the shadow storage area corresponding to the specific parameter node. If and only if it is detected that the parameter written in the shadow storage area is different from the parameter value of the hardware storage area recorded before writing, the parameter value in the shadow storage area is downloaded to the hardware storage area corresponding to the shadow storage area. After calculating the latest parameter value for a specific parameter node, the present application does not directly download the calculated latest parameter value to the hardware, but first writes the latest parameter value to the shadow storage area of the software part for cache, and then only downloads the latest parameter value written in the shadow storage area to the hardware storage area when it is detected that the latest parameter value currently written in the shadow storage area is different from the parameter value originally recorded in the hardware storage area, thereby avoiding the operation of repeatedly downloading unchanged parameter values to the hardware, reducing the interaction between the software and hardware parts in the electronic system, and improving the overall performance of the electronic system. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0021] Figure 1 A schematic diagram of the structure of an electronic system proposed in an embodiment of the present application;
[0022] Figure 2 A flow chart of a parameter storage method proposed in an embodiment of the present application;
[0023] Figure 3 A schematic diagram of a parameter mapping relationship proposed in an embodiment of the present application;
[0024] Figure 4 A flow chart of a method for determining a parameter value of a specific parameter node proposed in an embodiment of the present application;
[0025] Figure 5 A schematic diagram of the structure of another electronic system proposed in an embodiment of the present application;
[0026] Figure 6A schematic diagram of a parameter storage process proposed in an embodiment of the present application;
[0027] Figure 7 A schematic diagram of the structure of a parameter storage device proposed in an embodiment of the present application. DETAILED DESCRIPTION
[0028] 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 only 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.
[0029] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0030] See also Figure 1 , the embodiment of the present application proposes an electronic system 100, which includes an application layer 101, a parameter download framework 102 and a hardware layer 103. Among them, the electronic system 100 is a system that can be applied to a variety of different fields and needs to perform parameter interaction operations between software and hardware. For example, the electronic system 100 can be an ultrasonic diagnostic system, a vehicle control system, etc. The application layer 101 and the parameter download framework 102 are both the software part of the electronic system 100, and the hardware layer 103 is the hardware part of the electronic system 100.
[0031] The software part of the electronic system 100 includes a plurality of parameter nodes, which can be understood as nodes encapsulating the attribute information of the parameters. The attribute information of the parameters includes the information of the input parameter nodes and the output parameter nodes of the parameters, the parameter value information, etc. The input parameter node of a certain specific parameter node can be understood as a node for inputting the parameter value of the input parameter node into the specific parameter node so that the specific parameter node calculates its own parameter value according to the parameter value of the input parameter node. The output parameter node of the specific parameter node is the parameter node to which the specific parameter node outputs its own parameter value. The output parameter node needs to calculate its own parameter value according to the parameter value of the specific parameter node.
[0032] Specifically, the parameter storage process in the electronic system 100 is as follows: the application layer 101 receives the user's parameter change operation, generates a parameter change instruction, and outputs the parameter change instruction to the parameter download framework 102. The parameter download framework 102 calculates the parameter value of a specific parameter node in response to the parameter change instruction, and obtains the latest parameter value of the specific parameter node.
[0033] The parameter download framework 102 writes the latest parameter value of a specific parameter node into the shadow storage area 1021 corresponding to the specific parameter node. The shadow storage area 1021 is a cache area of the software part of the electronic system, and the shadow storage area 1021 is used to record the parameter value of the parameter node currently stored in the hardware storage area 1031 corresponding to the shadow storage area 1021. The number of shadow storage areas 1021 is not limited in this application.
[0034] Then the parameter download framework 102 detects whether the latest parameter value written in the shadow storage area 1021 is the same as the parameter value of the hardware storage area 1031 that was not recorded before writing. If the parameter download framework 102 detects that the latest parameter value written in the shadow storage area 1021 is different from the parameter value of the hardware storage area 1031 that was not recorded before writing, the latest parameter value in the shadow storage area is downloaded to the hardware storage area 1031 corresponding to the shadow storage area 1021, so as to store the latest parameter value in the hardware layer 103. If the parameter download framework 102 detects that the latest parameter value written in the shadow storage area 1021 is the same as the parameter value of the hardware storage area 1031 that was not recorded before writing, the latest parameter value in the shadow storage area 1021 is not downloaded to the hardware storage area 1031 corresponding to the shadow storage area 1021. The number of hardware storage areas 1031 is not limited in this application.
[0035] Among them, the parameter change instruction is an instruction that affects the parameter value change of the upper parameter node. The parameter change operation that affects the parameter value change of the upper parameter node is an operation that affects the parameter value change of the upper parameter node. The upper parameter node can be understood as a parameter node that is directly affected by the user operation and is located in the upper area (such as the application layer) of the software part. Taking the electronic system 100 as an ultrasonic diagnostic system as an example, the gear adjustment parameter node of the ultrasonic diagnostic system is an upper parameter node in the system, and the volume parameter node in the mobile phone system also belongs to the upper parameter node in the system. Specific parameter nodes include upper parameter nodes and associated parameter nodes of upper parameter nodes. Associated parameter nodes are parameter nodes affected by the parameter value change of the upper parameter node, and associated parameter nodes can also be understood as parameter nodes that are indirectly affected by the user operation. Among them, the hardware storage area can be a hardware device with storage function such as a memory and a register. It should be noted that the specific parameter nodes, upper parameter nodes, associated parameter nodes, input parameter nodes, and output parameter nodes mentioned in the embodiments of the present application are defined differently, but they all belong to parameter nodes of the electronic system.
[0036] In the electronic system 100 proposed in the present application, after the parameter download framework 102 calculates the latest parameter value for a specific parameter node, it does not directly download the calculated latest parameter value to the hardware layer 103, but first writes the latest parameter value to the shadow storage area 1021 of the software part for cache, and then only when it is detected that the latest parameter value currently written in the shadow storage area 1021 is different from the parameter value originally recorded in the hardware storage area 1031, the latest parameter value written in the shadow storage area 1021 is downloaded to the hardware storage area, thereby avoiding the operation of repeatedly downloading unchanged parameter values to the hardware layer 103, reducing the interaction between the software and hardware parts in the electronic system 100, and since the amount of data for sending parameters to the hardware layer is reduced and the time occupied for hardware processing is correspondingly reduced, the processing speed of the hardware is improved, thereby improving the overall performance of the electronic system.
[0037] See also Figure 2 Based on the electronic system 100 proposed in the above embodiment of the present application, the embodiment of the present application discloses a parameter storage method, which is applied to a parameter download framework of the electronic system. The parameter download framework of the electronic system is set in the software part of the electronic system. The relevant description of the parameter download framework can be found in the above Figure 1 The parameter downloading framework 102 mentioned above will not be described in detail here.
[0038] Specifically, Figure 2 The method shown includes the following steps:
[0039] S201. In response to an instruction affecting parameter changes, a parameter value calculation is performed on a specific parameter node to obtain the latest parameter value of the specific parameter node, wherein the instruction affecting parameter changes is an instruction affecting the parameter value change of an upper-level parameter node. The specific parameter node includes an upper-level parameter node and an associated parameter node of the upper-level parameter node, and the associated parameter node is a parameter node affected by the parameter value change of the upper-level parameter node.
[0040] For the related introduction of the parameters changing instructions, upper parameter nodes and associated parameter nodes, please refer to the previous introduction. Figure 1 The relevant contents of the electronic system part shown are not repeated here. The parameter change instruction may be generated by triggering the parameter change operation. The parameter change operation may be, for example, a gear condition operation, where the user adjusts the ultrasonic diagnostic system from 2D mode to 4D mode. It should be noted that there are many parameter change operations, including but not limited to those proposed in the embodiments of the present application.
[0041] The specific parameter nodes mentioned in the embodiments of the present application are a general term for all parameter nodes affected by the affected parameter change instructions. The specific number of specific parameter nodes is determined according to the number of parameter nodes actually affected by the affected parameter change instructions, and can be one or more.
[0042] The process of executing step S201 can be understood as: responding to an instruction affecting parameter changes, then parsing the instruction affecting parameter changes, determining a specific parameter node based on the linkage relationship between the parsed instruction affecting parameter changes and the parameter node, and then calculating the parameter value for the specific parameter node based on the instruction affecting parameter changes to obtain the latest parameter value of the specific parameter node.
[0043] Among them, the linkage relationship between parameter nodes can be understood as the input-output relationship (or association relationship) between parameter nodes. Specifically, the various parameter nodes in the electronic system are mutually affected. The parameter value of a certain specific parameter node is affected by the parameter value of the input parameter node of the specific parameter node. And the change of the parameter value of the specific parameter node affects the output parameter node of the specific parameter node. By establishing the linkage relationship between the various parameter nodes in the electronic system in advance, the specific parameter node affected by the affected parameter change instruction can be determined from all parameter nodes through the linkage relationship.
[0044] Specifically, the parameter change instruction indicates the change adjustment of the parameter value of the upper parameter node, and then the output parameter node of the upper parameter node (i.e., the associated parameter node affected by the parameter value of the upper parameter node) can be determined from the linkage relationship between the parameter nodes. After determining the output parameter node of the upper parameter node, the output parameter node of the output parameter node (i.e., the associated parameter node affected by the parameter value of the output parameter node) is found according to the linkage relationship between the parameter nodes. By analogy, the associated parameter nodes of all upper parameter nodes are finally found, and all specific parameter nodes are determined.
[0045] It should be noted that the storage method of the linkage relationship between parameter nodes in the electronic system is not limited in the embodiment of the present application. For example, the linkage relationship between parameter nodes can be stored in a table, a key value, a mapping relationship diagram between parameter nodes, etc.
[0046] For example, Figure 3 As shown, the association relationship between parameter nodes can be stored in a mapping relationship diagram. Figure 3 The mapping relationship diagram shown shows that parameter A (i.e. parameter node A) affects parameter C and parameter B. Parameter B affects parameter D and parameter E. When the parameter value of parameter A changes, the latest parameter value of the changed parameter A is input into parameter C and parameter B. The parameter values of parameter B and parameter C will be affected by the latest parameter value of parameter A received and will change. When the parameter value of parameter B changes, it will also affect the parameter values of parameter D and parameter E. For parameter C, parameter A is the input parameter node of parameter C, and parameter C is the output parameter node of parameter A. Similarly, for parameter B, parameter A is the input parameter node of parameter B, and parameter D and parameter E are the output parameter nodes of parameter B. When the parameter change instruction indicates to adjust the parameter value of the upper parameter node - parameter A, it can be done through Figure 3 The mapping relationship diagram shown shows that the associated parameter nodes of parameter A are parameter B, parameter C, parameter D and parameter E. Among them, parameter B and parameter C are directly affected by parameter A, while parameter D and parameter E are indirectly affected by parameter A.
[0047] It should be noted that the number of input parameter nodes of a specific parameter node may be one or more, and similarly, the number of output parameter nodes of a specific parameter node may also be one or more, and the embodiment of the present application does not impose any limitation on this.
[0048] Optionally, in a specific embodiment of the present application, the process of executing step S201 may also be: responding to an instruction affecting parameter changes, then parsing the instruction affecting parameter changes, determining a specific parameter node based on the parsed instruction affecting parameter changes, the linkage relationship between parameter nodes, and a second dirty flag used to indicate whether the parameter value of the parameter node has changed, and then calculating the parameter value for the specific parameter node to obtain the latest parameter value of the specific parameter node.
[0049] Specifically, only the parameter nodes whose parameter values have changed in the upper parameter nodes and the associated parameter nodes of the upper parameter nodes can be determined as specific parameter nodes, and then the parameter value calculation of the specific parameter nodes can be performed. From the above introduction to the linkage relationship between parameter nodes, it can be known that when and only when the parameter value of the parameter node changes, it may affect the parameter value change of its output parameter node. Therefore, in order to save the workload of parameter value calculation of specific parameter nodes, in the embodiment of the present application, among the upper parameter nodes and the associated parameter nodes of the upper parameter nodes determined by the linkage relationship between parameter nodes, only the parameter nodes whose parameter values of the input parameter nodes have changed are determined as specific parameter nodes, that is, parameter value calculation is performed on them. Parameter nodes whose parameter values have not changed in the input parameter nodes do not need to be determined as specific parameter nodes, that is, parameter value calculation does not need to be performed.
[0050] For example, see Figure 4 If a method of determining a specific parameter node is adopted based on the parsed parameter change-influencing instruction, the linkage relationship between the parameter nodes, and the second dirty flag used to indicate whether the parameter value of the parameter node has changed, an implementation method of executing step S201 may be:
[0051] S401. In response to an instruction affecting parameter change, perform parameter value calculation on an upper-layer parameter node according to the instruction affecting parameter change to obtain the latest parameter value of the upper-layer parameter node.
[0052] Specifically, in response to an instruction affecting parameter changes, the instruction affecting parameter changes is parsed to determine which upper-level parameter node the parameter value change of which needs to be affected by the instruction affecting parameter changes is, as well as a specific method of adjusting the upper-level parameter node. Then, based on the instruction affecting parameter changes, the parameter value of the upper-level parameter node indicated by the instruction affecting parameter changes can be recalculated to obtain the latest parameter value of the upper-level parameter node.
[0053] For example, when the electronic system is an ultrasonic diagnostic system, and the instruction affecting the parameter change is an instruction to convert the ultrasonic diagnostic system from 2D mode to 4D mode, the parameter value of the upper parameter node of the gear parameter node can be recalculated by parsing the instruction affecting the parameter change.
[0054] S402: Detect whether the latest parameter value of the upper-layer parameter node is the same as the parameter value of the upper-layer parameter node before calculation.
[0055] Specifically, after the calculation in step S402, the latest parameter value of the upper parameter node may have changed compared to the parameter value before executing step S401, or may not have changed (for example, the user operates to adjust the ultrasonic diagnostic system to 2D mode, and the ultrasonic diagnostic system is originally in 2D mode). Therefore, it is necessary to detect whether the latest parameter value of the upper parameter node is the same as the parameter value before the upper parameter node is calculated. If it is detected that the latest parameter value of the upper parameter node is the same as the parameter value before the upper parameter node is calculated, step S403 is executed, that is, the parameter value calculation of the specific parameter node is terminated. At this time, since the latest parameter value of the upper parameter node has not changed, it will not affect the parameter value change of the associated parameter node of the upper parameter node, so there is no need to continue to calculate the latest parameter values of the associated parameter nodes of other upper parameter nodes.
[0056] If it is detected that the latest parameter value of the upper parameter node is different from the parameter value before the upper parameter node is calculated, step S404 is executed to trigger the calculation of the output parameter node of the upper parameter node. Specifically, since the latest parameter value of the upper parameter node is different from the parameter value before the upper parameter node is calculated, it means that the latest parameter value of the upper parameter node has changed due to the influence of the parameter change instruction, which in turn affects the change of the latest parameter value of the output parameter node of the upper parameter node, so it is necessary to recalculate the parameter value of the output parameter node of the upper parameter node. The output parameter node of the upper parameter node is an associated parameter node that calculates its own parameter value based on the parameter value of the upper parameter node.
[0057] S403: End the parameter value calculation for the specific parameter node.
[0058] S404. Setting a second dirty flag for the upper parameter node to trigger parameter value calculation for the output parameter node of the upper parameter node to obtain the latest parameter value of the output parameter node, wherein the output parameter node of the upper parameter node is an associated parameter node that calculates its own parameter value based on the parameter value of the upper parameter node.
[0059] The second dirty flag is used to indicate that the latest parameter value of the parameter node is different from the parameter value before calculation. When the upper-layer parameter node is marked with the second dirty flag, the parameter download framework is automatically triggered to calculate the parameter value of the parameter node affected by the parameter value of the upper-layer parameter node (i.e., the output parameter node of the upper-layer parameter node), thereby obtaining the latest parameter value of the output parameter node of the upper-layer parameter node.
[0060] Specifically, the method of calculating the latest parameter value of the output parameter node is: according to the latest parameter value of the upper parameter node, the latest parameter value of the output parameter node is calculated.
[0061] It should be noted that the number of upper-level parameter nodes mentioned in the embodiment of the present application can be one or more, that is, the parameter change instruction can be a parameter value change that affects multiple upper-level parameter nodes, or it can only affect the parameter value change of one upper-level parameter node.
[0062] It should also be noted that the output parameter node of the upper-level parameter node can be determined by the linkage relationship between parameter nodes. For details, please refer to the above-mentioned content introducing the linkage relationship of parameter nodes, which will not be repeated here.
[0063] S405: Use the output parameter node as a new upper-layer parameter node, and return to step S402 until there is no output parameter node of the upper-layer parameter node.
[0064] After completing the parameter value calculation of the output parameter node, it is necessary to further detect whether the output parameter node of the output parameter node needs to recalculate the parameter value, that is, whether the latest parameter value after the recalculation of the output parameter node affects the changes of other associated parameter nodes. Therefore, it is necessary to use the output parameter node as a new upper-level parameter node and return to execute step S402 until all the associated parameter nodes of the upper-level parameter node are traversed, or enter step S403 to end the parameter value calculation.
[0065] For a clearer description Figure 4 The process shown below adopts Figure 3The mapping relationship diagram shown is used to illustrate the parameter value calculation process of a specific parameter node: in response to the parameter change instruction, according to the parameter change instruction, the parameter value of the upper parameter node - parameter A is calculated to obtain the latest parameter value of parameter A. It is detected that the parameter value of parameter A before the parameter value calculation is 5, and the latest parameter value after the calculation is 10, so it is determined that the latest parameter value of parameter A has changed, so the second dirty flag is set for parameter A, and then the parameter value calculation of the output parameter node of parameter A: parameter C and parameter B is triggered. After the parameter value calculation of parameter B and parameter C, the latest parameter value obtained is also different from the parameter value before the calculation, so the second dirty flag is also set for parameter B and parameter C. Then the parameter value calculation of the output parameter node of parameter B: parameter D and parameter E is triggered. After the calculation of parameter D and parameter E is completed, it is continued to detect whether the latest parameter values of parameter D and parameter E are different from those before the calculation. If it is detected that the latest parameter value of parameter D is the same, but the parameter value of parameter E is different, only the second dirty flag is set for parameter E. Since parameter E no longer has an output parameter node, the parameter value calculation process ends.
[0066] Depend on Figure 4 It can be seen from the illustrated embodiment that since the linkage relationship between each parameter node is predetermined in the embodiment of the present application, the embodiment of the present application triggers recalculation of the parameter value of the output parameter node of a specific parameter node (for example, an upper-level parameter node or an associated parameter node corresponding to the upper-level parameter node) when the parameter value of the specific parameter node changes, without affecting the parameter values of other parameter nodes. This method of calculating parameter values reduces the number of interactions of parameter nodes. Compared with the method of calculating the output parameter values of all specific parameter nodes, the parameter value calculation workload of the embodiment of the present application is less, and the calculation of the corresponding output node is triggered only when the second dirty flag is set. Therefore, the calculation workload is less, and the efficiency of calculating the parameter value is improved.
[0067] It should be noted that there are many ways to determine specific parameter nodes, and it is not necessarily necessary to determine specific parameter nodes based on the linkage relationship between parameter nodes. For example, in other embodiments, parameter nodes can be classified in advance, such as classifying parameter nodes according to gear modes. If the current parameter change instruction is used to adjust the parameter value of a parameter node in a certain gear mode, all parameter nodes in the gear mode are used as specific parameter nodes. The embodiment of the present application does not limit the specific method of determining a specific parameter node based on the parameter change instruction.
[0068] Alternatively, if Figure 5As shown, in a specific embodiment of the present application, the parameter download framework 102 may include at least a parameter response module 1022 and a parameter linkage module 1023. The parameter response module 1022 and the parameter linkage module 1023 may cooperate to perform step S201. Specifically, an implementation method of performing step S201 includes:
[0069] The parameter response module 1022 responds to the parameter change influencing instruction and receives the parameter change influencing instruction through the upper layer parameter change influencing interface to trigger the parameter linkage module 1023 to calculate the parameter value of the specific parameter node according to the parameter change influencing instruction to obtain the latest parameter value of the specific parameter node.
[0070] Specifically, the parameter response module 1022 includes an upper layer parameter change interface. The upper layer parameter change interface can receive the parameter change instruction issued by the upper layer (application layer) of the software. Then the interface outputs the parameter change instruction to the parameter linkage module 1023, and the parameter linkage module 1023 calculates the parameter value of the specific parameter node according to the parameter change instruction to obtain the latest parameter value of the specific parameter node.
[0071] Among them, the execution process and principle of the parameter linkage module calculating the parameter value of the specific parameter node according to the instruction affecting the parameter change to obtain the latest parameter value of the specific parameter node can be found in the aforementioned introduction to the parameter value calculation of the specific parameter node, which will not be repeated here.
[0072] S202. Write the latest parameter value of the specific parameter node into the shadow storage area corresponding to the specific parameter node, wherein the shadow storage area is a cache area of the software part of the electronic system, and the shadow storage area is used to record the parameter value of the parameter node currently stored in the hardware storage area corresponding to the shadow storage area.
[0073] After step S201 calculates the latest parameter value of the specific parameter node, the latest parameter value of the specific parameter node is first written into the cache in the shadow storage area corresponding to the specific parameter node. The shadow storage area is a cache area for recording the parameter value of the parameter node currently stored in the hardware storage area corresponding to the shadow storage area. The shadow storage area belongs to the software part of the electronic system. Before step S202 is executed, what is recorded in the shadow storage area is the parameter value of the parameter node currently stored in the hardware storage area corresponding to the shadow storage area.
[0074] The hardware storage area may be a hardware register, and the corresponding shadow storage area may be a shadow register. The hardware storage area may also be a hardware memory, and the corresponding shadow storage area may also be a shadow memory. The types of the hardware storage area and the shadow storage area are not limited in the embodiments of the present application.
[0075] It should be noted that the number of shadow storage areas and hardware storage areas is the same, and there is a one-to-one correspondence between shadow storage areas and hardware storage areas. The shadow storage area can be regarded as the "shadow" of the hardware storage area in the software, which records the parameter values currently stored in the hardware storage area. There is also a corresponding relationship between each parameter node and the hardware storage area. A hardware storage area can be used to store the parameter value of at least one parameter node. Similarly, there is a corresponding relationship between the parameter node and the shadow storage area. The parameter value of the parameter node recorded in the shadow storage area is the parameter value of the parameter node stored in the corresponding shadow storage area. For example, hardware storage area A is used to store the parameter values of parameter A and parameter B. The shadow storage area A corresponding to hardware storage area A is used to record the parameter values of parameter A and parameter B.
[0076] In the embodiment of the present application, the correspondence between the parameter node and the shadow storage area, and the correspondence between the shadow storage area and the hardware storage area are predetermined. After completing step S201, the latest parameter value of the specific parameter node is directly written (i.e., cached) into the shadow storage area corresponding to the specific parameter node according to the correspondence between the parameter node and the shadow storage area.
[0077] Since the parameter value of a specific parameter node has been recalculated, the latest parameter value of the specific parameter node may have changed compared to before the calculation. Therefore, the latest parameter value of the specific parameter node needs to be written to the shadow storage area cache first, so as to further determine whether the specific parameter node needs to be downloaded to the hardware storage area.
[0078] Optionally, in a specific embodiment of the present application, if Figure 4 The method shown calculates the latest parameter value of a specific parameter node, and an implementation method of executing step S202 includes:
[0079] Parameter nodes with second dirty flags set are screened out from the specific parameter nodes, and the latest parameter values of the screened out parameter nodes are written into the shadow storage area corresponding to the screened out parameter nodes.
[0080] By the aforementioned Figure 4It can be seen from the illustrated embodiment that after the parameter value is recalculated, if the new parameter value is different from the parameter value before calculation, the second dirty flag will be set for the upper-layer parameter node and the associated parameter node corresponding to the upper-layer parameter node (collectively referred to as the specific parameter node). For the specific parameter node that does not have the second dirty flag set, the parameter value does not change, and thus does not need to be sent to the hardware layer to update the parameter value. Therefore, it is only necessary to filter out the parameter nodes with the second dirty flag set from the specific parameter nodes, and only write the latest parameter values of the parameter nodes with the second dirty flag set to the shadow storage area corresponding to the filtered parameter nodes, so as to subsequently determine whether the latest parameter values of these parameter nodes need to be sent to the hardware layer for update.
[0081] Since in the embodiment of the present application, only the parameter values of the parameter nodes with the second dirty flag set are written to the shadow storage area, compared with the method of writing the parameter values of all specific parameter nodes into the shadow storage area, the amount of data processed is smaller, the amount of work required for the subsequent determination of whether to download the latest parameter value to the hardware storage area (i.e., when executing step S203) is also smaller, and the parameter download efficiency is also higher.
[0082] Optionally, continue to Figure 5 In a specific embodiment of the present application, the parameter download framework 102 of the electronic system may further include: a download control module 1024 and a parameter mapping module 1025. The download control module 1024 and the parameter mapping module 1025 may cooperate to perform step S202. Specifically, an implementation method of performing step S202 includes:
[0083] The download control module 1024 obtains the latest parameter value of the specific parameter node from the parameter linkage module 1023. Then, the download control module 1024 writes the latest parameter value of the specific parameter node into the shadow storage area corresponding to the specific parameter node according to the correspondence between the parameter node and the shadow storage area of the electronic system recorded in the parameter mapping module 1025.
[0084] Specifically, the correspondence between the parameter nodes and the shadow storage area of the electronic system is recorded in advance in the parameter mapping module 1025. After the parameter linkage module 1023 completes the calculation of the latest parameter value of the specific parameter node, the download control module 1024 obtains the latest parameter value of the specific parameter node from it, and then for each specific parameter node, finds the shadow storage area corresponding to the specific parameter node from the correspondence between the parameter node and the shadow storage area recorded by the parameter linkage module 1023, and then writes the latest parameter value of the specific parameter node into the shadow storage area corresponding to the specific parameter node.
[0085] Optionally, in another specific embodiment of the present application, an implementation of step S202 includes:
[0086] The download control module 1024 filters out parameter nodes with the second dirty flag set from the specific parameter nodes in the parameter linkage module 1023, and then the download control module 1024 writes the latest parameter values of the filtered parameter nodes into the shadow storage area corresponding to the filtered parameter nodes according to the correspondence between the parameter nodes and the shadow storage area of the electronic system recorded in the parameter mapping module 1025.
[0087] The execution process and principle of the above-mentioned download control module 1024 can refer to the relevant description of the aforementioned part of "filtering out parameter nodes with the second dirty flag set from specific parameter nodes, and writing the latest parameter values of the filtered parameter nodes into the shadow storage area corresponding to the filtered parameter nodes", which will not be repeated here.
[0088] It should be noted that, after the download control module 1024 selects the parameter node with the second dirty flag set from the specific parameter nodes in the parameter linkage module 1023, and writes the latest parameter value of the selected parameter node into the shadow storage area corresponding to the selected parameter node, the parameter linkage module 1023 can also delete the second dirty flag of the specific parameter node so as to re-execute the download control module 1024. Figure 2 In the illustrated embodiment, a second dirty flag is re-marked for a specific parameter node to complete the linked parameter value calculation between the specific parameter nodes.
[0089] Optionally, in a specific embodiment of the present application, before executing the download control module 1024 to obtain the latest parameter value of a specific parameter node from the parameter linkage module 1023, the following may also be included:
[0090] The parameter linkage module 1023 sends a notification message to the download control module 1024, wherein the notification message is used to notify the download control module 1024 that the parameter value calculation for the specific parameter node has been completed. Then the download notification module 1024 obtains the latest parameter value of the specific parameter node from the parameter linkage module 1023 in response to the notification message.
[0091] In the embodiment of the present application, the parameter linkage module 1023 notifies the download control module 1024 after completing the parameter value calculation, so that the download control module 1024 can know that the latest parameter value of the specific parameter node needs to be written into the shadow storage area. In other embodiments, the download control module 1024 can also monitor in real time whether the parameter linkage module 1023 has completed the parameter value calculation of the specific parameter node, and then write the calculated latest parameter value into the shadow storage area in time.
[0092] S203, detecting whether the latest parameter value written into the shadow storage area is the same as the parameter value of the hardware storage area recorded before writing.
[0093] As can be seen from the above introduction to the shadow storage area, the shadow storage area is used to record the parameter value of the hardware storage area corresponding to the shadow storage area. Therefore, before the parameter download framework writes the latest parameter value to the shadow storage area, the parameter value recorded in the shadow storage area is completely consistent with the parameter value stored in the hardware storage area corresponding to the current shadow storage area. After the parameter download framework writes the latest parameter value of a specific parameter node to the corresponding shadow storage area, it may cause the value in the shadow storage area to change. In some cases, the latest parameter value written in the shadow storage area may be consistent with the parameter value of the hardware storage area recorded before writing, which means that after recalculating the parameter value of the specific parameter node, its latest parameter value has not changed compared to before the calculation. Therefore, when it is detected that the latest parameter value written in the shadow storage area is the same as the parameter value of the hardware storage area originally (before writing), it means that the parameter value of the parameter node corresponding to the shadow storage area has not changed, and there is no need to download the latest parameter value in the shadow storage area to the hardware storage area corresponding to the shadow storage area, that is, execute step S204 to end the process.
[0094] However, in other cases, the latest parameter value written into the shadow storage area may be inconsistent (ie, different) with the parameter value of the hardware storage area recorded before writing, and then the latest parameter value needs to be updated into the hardware storage area. Therefore, step S205 needs to be executed.
[0095] Optionally, in a specific embodiment of the present application, an implementation of step S203 includes:
[0096] If it is detected that the shadow storage area has a first dirty flag set, the latest parameter value in the shadow storage area with the first dirty flag set is downloaded to the hardware storage area corresponding to the shadow storage area. The first dirty flag is used to indicate that the latest parameter value currently written to the shadow storage area is different from the parameter value of the hardware storage area recorded before writing.
[0097] Specifically, the function of setting the first dirty flag of the shadow storage area is pre-configured. When the shadow storage area detects that the latest parameter value currently written is different from the parameter value originally recorded in the hardware storage area, the shadow storage area will automatically set the first dirty flag, indicating that the data in the current shadow storage area has changed, which can also be understood as indicating that the latest parameter value currently written to the shadow storage area is inconsistent with the parameter value in the hardware storage area corresponding to the current shadow storage area.
[0098] When the parameter download framework detects that the latest parameter value written in the shadow storage area is different from the parameter value of the hardware storage area that has not been written before, the shadow storage area will automatically set the first dirty flag. Then the parameter download framework will detect that the shadow storage area has set the first dirty flag, which means that the latest parameter value currently written in the shadow storage area is different from the parameter value of the hardware storage area that has not been written before, so the latest parameter value in the shadow storage area with the first dirty flag set is downloaded to the hardware storage area corresponding to the shadow storage area (i.e., execute step S205). If the shadow storage area does not have the first dirty flag set, it means that the latest parameter value currently written in the shadow storage area is the same as the parameter value of the hardware storage area that has not been written before, and there is no need to download the latest parameters to the hardware storage area (i.e., execute step S204).
[0099] Optionally, the parameter download framework may detect in real time whether a shadow storage area has a first dirty flag set, or may detect periodically, and the specific detection method is not limited in this application.
[0100] Optionally, in a specific embodiment of the present application, Figure 5 The parameter mapping module 1025 shown also records the corresponding relationship between the shadow storage area and the hardware storage area. Figure 5 In the electronic system shown, step S203 can be performed by the download control module 1024 and the parameter mapping module 1025. Specifically, an implementation of step S203 includes:
[0101] If the download control module 1024 detects that the latest parameter value written to the shadow storage area is different from the parameter value of the hardware storage area recorded before writing, then according to the correspondence between the shadow storage area and the hardware storage area recorded by the parameter mapping module 1025, the latest parameter value in the shadow storage area is downloaded to the hardware storage area corresponding to the shadow storage area.
[0102] Specifically, the correspondence between the shadow storage area and the hardware storage area is pre-recorded in the parameter mapping module 1025. Then, when the download control module 1024 detects that the latest parameter value written into the shadow storage area is different from the parameter value of the hardware storage area recorded before writing, it can find the hardware storage area corresponding to the shadow storage area based on the correspondence between the shadow storage area and the hardware storage area, and then download the latest parameter value in the shadow storage area to the hardware storage area corresponding to the shadow storage area.
[0103] In other embodiments, when the download control module 1024 detects that the shadow storage area has a first dirty flag set, it downloads the latest parameter value in the shadow storage area with the first dirty flag set to the hardware storage area corresponding to the shadow storage area according to the correspondence between the shadow storage area and the hardware storage area recorded by the parameter mapping module 1025.
[0104] The execution process and principle of the download control module 1024 downloading the latest parameter value can be found in the above-mentioned related description, which will not be repeated here.
[0105] It should be noted that when the above Figure 4 When the method shown calculates parameter values, even if only the parameter value of a specific parameter node with the second dirty flag set is written into the shadow storage area, it does not mean that the latest parameter value written into the shadow storage area will definitely be different from the parameter value of the hardware storage area that was not written before. Since the linkage relationship between parameter nodes is complex, during the process of calculating parameter values according to the linkage relationship, the latest parameter value calculated by the parameter node may change multiple times, and the latest parameter value finally obtained may not change compared to the initial parameter value, but it has changed compared to the parameter value before the latest calculation, so step S203 is still needed for further detection to determine whether it needs to be downloaded to the hardware.
[0106] It should also be noted that there are many specific implementation methods for detecting whether the latest parameter value written to the shadow storage area is the same as the parameter value of the hardware storage area that was not written before. In addition to being implemented by the first dirty flag, it can also be implemented by constructing a parameter record table for the shadow storage area. By real-time statistics of the parameter values in the shadow storage area, it is detected whether the latest parameter value written to the shadow storage area is the same as the parameter value of the hardware storage area that was not written before. The specific implementation methods for executing step S203 include but are not limited to the contents proposed in this application.
[0107] S204: Do not download the latest parameter value in the shadow storage area to the hardware storage area corresponding to the shadow storage area.
[0108] Step S204 can also be understood as not performing any operation and ending the current parameter storage process. Figure 2 The process shown.
[0109] S205: Download the latest parameter value in the shadow storage area to the hardware storage area corresponding to the shadow storage area.
[0110] Among them, the latest parameter value downloaded to the hardware storage area corresponding to the shadow storage area in step S205 is the latest parameter value that is different from the parameter value currently stored in the hardware register, that is, the parameter value that must be sent from the software part to the hardware part. After executing step S205, the latest parameter value in the shadow storage area is consistent with the latest parameter value currently in the hardware storage area, and the shadow storage area has successfully recorded the current parameter value of the hardware storage area.
[0111] Optionally, if the shadow storage area indicates a change in its latest parameter value through a first dirty flag, it is necessary to delete the first dirty flag of the shadow storage area after executing step S205, thereby avoiding subsequent detection of the first dirty flag and repeatedly writing the latest parameter value to the shadow storage area.
[0112] It should be noted that Figure 2 The methods shown are all described for a single shadow storage area and a single hardware storage area, and the method is also applicable when there are multiple shadow storage areas and multiple hardware storage areas.
[0113] Optionally, step S205 may be performed by Figure 5 The download control module 1024 is shown executing.
[0114] In an embodiment of the present application, before the latest parameter value of a specific parameter node is sent to the hardware storage area, it is pre-checked whether the latest parameter value of the shadow storage area is the same as the current parameter value of the hardware storage area, thereby avoiding the situation where the latest parameter value of the shadow storage area is the same as the parameter value of the hardware storage area, and repeatedly downloading the latest parameter value to the hardware storage area.
[0115] It should be noted that, in the embodiment of the present application, steps S202 to S205 may not be executed for all specific parameter nodes whose parameter values are recalculated. For example, in some scenarios, the hardware storage area of the electronic system is designed to store only the parameter nodes of the underlying software, and the hardware storage area does not store the parameter nodes in the intermediate calculation process. Then, when executing step S202, the write operation of step S202 is only performed on the parameter nodes in the specific parameter nodes that need to be stored in the hardware storage area.
[0116] See also Figure 6 In order to make the description of the above embodiment clearer, an example of a complete parameter storage process is introduced below: the upper-layer application (i.e., the application layer mentioned above) sends an instruction affecting parameter changes to the parameter download framework, the parameter download framework responds to the instruction affecting parameter changes (referred to as parameter response), and then calculates the parameter value of a specific parameter node according to the linkage relationship between the parameters (referred to as parameter linkage).
[0117] Specifically, the parameter change instruction affects the parameter value changes of the four upper-level parameter nodes, namely, parameter A, parameter B, parameter C, and parameter D. After obtaining the latest parameter values of parameter A, parameter B, parameter C, and parameter D through parameter value calculation, parameter A, parameter B, parameter C, and parameter D are detected, and the second dirty flag is automatically set for these parameter nodes, driving the parameter value calculation of the associated parameter nodes of the upper-level parameter nodes. Specifically, the latest parameter value change of parameter A affects the parameter value of parameter E, the output node of parameter A. Parameter E calculates the latest parameter value of parameter E based on the latest parameter value of parameter A, and sets the second dirty flag of parameter E. Parameter I and parameter J, the output nodes of parameter E, are affected by parameter E. The latest parameter values of parameter I and parameter J are calculated again based on the latest parameter value of parameter E, and then the second dirty flag is set in parameter I and parameter J after detecting the latest parameter value change. After the second dirty flag of parameters I and J is set, since the shadow registers corresponding to parameters I and J are shadow registers A (i.e., one of the shadow storage areas mentioned above), the latest parameter values of parameters I and J are written into shadow register A (referred to as update mapping shadow memory operation). Shadow register A detects that the latest parameter value written is inconsistent with the parameter value originally recorded in register A (i.e., one of the hardware storage areas mentioned above), then the latest parameter value in shadow register A is downloaded to register A (referred to as parameter sending operation), completing the storage of parameters I and J. The process of transferring the remaining parameters F, G, K, L, M, N, and H from shadow registers to registers in the hardware internal address space is similar. For details, please refer to Figure 6 The above is a hint, which will not be repeated here.
[0118] The parameter storage method provided by the embodiment of the present invention is applied to the parameter download framework of the electronic system, and the parameter download framework of the electronic system is set in the software part of the electronic system. By responding to the instruction affecting the parameter change, the parameter value of the specific parameter node is calculated to obtain the latest parameter value of the specific parameter node. Among them, the instruction affecting the parameter change is an instruction that affects the parameter value change of the upper parameter node. The specific parameter node includes the upper parameter node and the associated parameter node of the upper parameter node. Then the latest parameter value of the specific parameter node is written to the shadow storage area corresponding to the specific parameter node. If and only if it is detected that the parameter written in the shadow storage area is different from the parameter value of the hardware storage area recorded before writing, the parameter value in the shadow storage area is downloaded to the hardware storage area corresponding to the shadow storage area. After calculating the latest parameter value for a specific parameter node, the present application does not directly download the calculated latest parameter value to the hardware, but first writes the latest parameter value to the shadow storage area of the software part for cache, and then only downloads the latest parameter value written in the shadow storage area to the hardware storage area when it is detected that the latest parameter value currently written in the shadow storage area is different from the parameter value originally recorded in the hardware storage area, thereby avoiding the operation of repeatedly downloading unchanged parameter values to the hardware, reducing the interaction between the software and hardware parts in the electronic system, and improving the overall performance of the electronic system.
[0119] Based on the parameter storage method proposed in the present application, the parameter storage process in the ultrasonic diagnostic system is described in detail below: When the user adjusts the ultrasonic diagnostic system to various modes such as 2D, DOP, 3D, 4D, and basic mode combinations, the application layer of the ultrasonic diagnostic system generates a corresponding parameter change-affecting instruction according to the received mode adjustment operation. The parameter change-affecting instruction is used to explain the change of the parameter value of the upper-layer parameter node affected by the mode adjustment operation.
[0120] The parameter response module in the ultrasonic diagnostic system responds to the parameter change instruction, receives the parameter change instruction through the upper parameter change interface, triggers the parameter linkage module to calculate the parameter value of the upper parameter node according to the parameter change instruction, and obtains the latest parameter value of the upper parameter node. Then the parameter linkage module detects whether the latest parameter value of the upper parameter node is the same as the parameter value before the upper parameter node is calculated. If it is detected that the latest parameter value of the upper parameter node is the same as the parameter value before the upper parameter node is calculated, the parameter value calculation is terminated. If it is detected that the latest parameter value of the upper parameter node is different from the parameter value before the upper parameter node is calculated, the second dirty flag is set for the upper parameter node. This triggers the parameter value calculation of the output parameter node of the upper parameter node to obtain the latest parameter value of the output parameter node. Among them, the output parameter node of the upper parameter node is an associated parameter node that calculates its own parameter value based on the parameter value of the upper parameter node. Similarly, the output parameter node is used as a new upper parameter node, and the process returns to the step of detecting whether the latest parameter value of the upper parameter node is the same as the parameter value before the upper parameter node is calculated, until there is no output parameter node of the upper parameter node.
[0121] The download control module obtains the latest parameter value of the specific parameter node from the parameter linkage module, and writes the latest parameter value of the specific parameter node with the second dirty flag set to the shadow storage area corresponding to the specific parameter node according to the corresponding relationship between the parameter node of the ultrasonic diagnostic system recorded in the parameter mapping module and the shadow storage area. Among them, the specific parameter node includes the upper parameter node and the associated parameter node of the upper parameter node, and the associated parameter node is the parameter node affected by the parameter value change of the upper parameter node. If the shadow storage area detects that the latest parameter value written is different from the parameter value of the hardware storage area recorded before writing, it sets itself to the first dirty flag. If the download control module detects that the shadow storage area sets the first dirty flag, the latest parameter value in the shadow storage area with the first dirty flag set is downloaded to the hardware storage area corresponding to the shadow storage area. At this time, the hardware storage area in the ultrasonic diagnostic system is written with the latest parameter value that has been affected by the mode switching operation. The software part in the subsequent ultrasonic diagnostic system completes the mode switching of the ultrasonic diagnostic system by accessing the latest parameter value recorded in the hardware storage area, and the user can use the ultrasonic diagnostic system after the mode is switched.
[0122] Since the ultrasound diagnostic system of the embodiment of the present application does not directly download the calculated latest parameter value to the hardware, but first writes the latest parameter value to the shadow storage area of the software part for cache, and then only downloads the latest parameter value written in the shadow storage area to the hardware storage area when it detects that the latest parameter value currently written in the shadow storage area is different from the parameter value originally recorded in the hardware storage area, thereby avoiding the operation of repeatedly downloading unchanged parameter values to the hardware, reducing the interaction between the software and hardware parts in the ultrasound diagnostic system, improving the overall performance of the ultrasound diagnostic system, and reducing the problem of operation response delay when users use the ultrasound diagnostic system.
[0123] It should be noted that the above is only an example of a scenario in which the method proposed in the embodiment of the present application is applied to an ultrasound diagnostic system. There are many other scenarios in which the method proposed in the embodiment of the present application can be applied, including but not limited to the contents proposed in the embodiment of the present application.
[0124] Based on the parameter storage method proposed in the above embodiment of the present application, refer to Figure 7 The embodiment of the present application discloses a parameter storage device, which is applied to a parameter download framework of an electronic system. The parameter download framework of the electronic system is set in the software part of the electronic system. The parameter storage device includes: a parameter calculation unit 701, a first writing unit 702 and a second writing unit 703.
[0125] The parameter calculation unit 701 is used to calculate the parameter value of a specific parameter node in response to the parameter change-influencing instruction to obtain the latest parameter value of the specific parameter node. The parameter change-influencing instruction is an instruction that affects the parameter value change of the upper-layer parameter node. The specific parameter node includes the upper-layer parameter node and the associated parameter node of the upper-layer parameter node. The associated parameter node is a parameter node affected by the parameter value change of the upper-layer parameter node.
[0126] The first writing unit 702 is used to write the latest parameter value of a specific parameter node into a shadow storage area corresponding to the specific parameter node. The shadow storage area is a cache area of the software part of the electronic system. The shadow storage area is used to record the parameter value of the parameter node currently stored in the hardware storage area corresponding to the shadow storage area.
[0127] The second writing unit 703 is used to download the latest parameter value in the shadow storage area to the hardware storage area corresponding to the shadow storage area if it is detected that the latest parameter value written into the shadow storage area is different from the parameter value of the hardware storage area recorded before writing.
[0128] Optionally, in a specific embodiment of the present application, the second writing unit 703 is also used to not download the latest parameter value in the shadow storage area to the hardware storage area corresponding to the shadow storage area if it is detected that the latest parameter value written to the shadow storage area is the same as the parameter value of the hardware storage area recorded before writing.
[0129] Optionally, in a specific embodiment of the present application, the second writing unit 703 includes:
[0130] The first writing subunit is used to download the latest parameter value in the shadow storage area with the first dirty flag set to the hardware storage area corresponding to the shadow storage area if it is detected that the shadow storage area has a first dirty flag set. The first dirty flag is used to indicate that the latest parameter value currently written to the shadow storage area is different from the parameter value of the hardware storage area recorded before writing.
[0131] Optionally, in a specific embodiment of the present application, the parameter calculation unit 701 includes:
[0132] The response subunit is used to respond to the parameter change influencing instruction, calculate the parameter value of the upper parameter node according to the parameter change influencing instruction, and obtain the latest parameter value of the upper parameter node.
[0133] The detection subunit is used to detect whether the latest parameter value of the upper parameter node is the same as the parameter value before the upper parameter node is calculated.
[0134] The end subunit is used to end the parameter value calculation for a specific parameter node if it is detected that the latest parameter value of the upper parameter node is the same as the parameter value before the upper parameter node is calculated.
[0135] The trigger subunit is used for setting a second dirty flag for the upper-layer parameter node to trigger parameter value calculation for the output parameter node of the upper-layer parameter node to obtain the latest parameter value of the output parameter node if it is detected that the latest parameter value of the upper-layer parameter node is different from the parameter value before the upper-layer parameter node is calculated. The output parameter node of the upper-layer parameter node is an associated parameter node that calculates its own parameter value based on the parameter value of the upper-layer parameter node.
[0136] The return subunit is used to return the output parameter node as a new upper-layer parameter node to the detection subunit.
[0137] Optionally, in a specific embodiment of the present application, the first writing unit 702 includes:
[0138] The screening subunit is used to screen out parameter nodes with a second dirty flag set from the specific parameter nodes.
[0139] The second writing subunit is used to write the latest parameter value of the filtered parameter node into the shadow storage area corresponding to the filtered parameter node.
[0140] Optionally, in a specific embodiment of the present application, the parameter calculation unit 701 includes: a parameter response module and a parameter linkage module.
[0141] The parameter response module is used to respond to the parameter change instruction, receive the parameter change instruction through the upper-level parameter change interface, trigger the parameter linkage module to calculate the parameter value of the specific parameter node according to the parameter change instruction, and obtain the latest parameter value of the specific parameter node.
[0142] The parameter linkage module is used to calculate the parameter value of a specific parameter node according to the instruction affecting the parameter change, and obtain the latest parameter value of the specific parameter node.
[0143] Optionally, in a specific embodiment of the present application, the first writing unit 702 includes:
[0144] The first recording subunit is used to record the corresponding relationship between the parameter nodes of the electronic system and the shadow storage area.
[0145] The third writing subunit is used to obtain the latest parameter value of the specific parameter node from the first recording subunit, and write the latest parameter value of the specific parameter node into the shadow storage area corresponding to the specific parameter node according to the correspondence between the parameter nodes of the recorded electronic system and the shadow storage area.
[0146] The first recording subunit is included in the parameter mapping module mentioned in the above embodiment of the present application. The second writing subunit is included in the above download control module.
[0147] Optionally, in a specific embodiment of the present application, it further includes: a second recording subunit, which is used to record the corresponding relationship between the shadow storage area and the hardware storage area. The second writing unit 703 includes:
[0148] The fourth writing sub-unit is used to download the latest parameter value in the shadow storage area to the hardware storage area corresponding to the shadow storage area according to the correspondence between the recorded shadow storage area and the hardware storage area if it is detected that the latest parameter value written into the shadow storage area is different from the parameter value of the hardware storage area recorded before writing.
[0149] The second recording subunit is included in the parameter mapping module mentioned in the above embodiment of the present application. The fourth writing subunit is included in the above download control module mentioned.
[0150] It should be noted that the execution process and principle of each unit and sub-unit in the parameter storage device mentioned in the embodiment of the present application are the same as the parameter storage method proposed in the aforementioned embodiment of the present application, which can be referred to and will not be repeated here.
[0151] An embodiment of the present application discloses a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the parameter storage method as described in any one of the present applications is implemented.
[0152] The embodiment of the present application discloses a parameter storage device, comprising: one or more processors; a storage device, on which one or more programs are stored. When the one or more programs are executed by the one or more processors, the one or more processors implement any parameter storage method described in the present application.
[0153] The embodiment of the present application discloses an electronic system, including: an application layer, a parameter download framework and a hardware storage area. The application layer and the parameter download framework are arranged in the software part of the electronic system. The application layer is used to generate an instruction affecting parameter changes, and output the instruction affecting parameter changes to the parameter download framework. The parameter download framework is used to execute any parameter storage method proposed in the present application as described above. The hardware storage area is used to store parameter values of parameter nodes of the electronic system.
[0154] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0155] Professionals may further appreciate that the units and algorithm steps 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 and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may 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.
[0156] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A parameter storage method, characterized in that: A parameter download framework applied to an electronic system, wherein the parameter download framework of the electronic system is arranged in the software part of the electronic system, and the parameter storage method comprises: In response to the parameter change influencing instruction, a parameter value calculation is performed on a specific parameter node to obtain the latest parameter value of the specific parameter node; wherein the parameter change influencing instruction is an instruction that affects the parameter value change of an upper-layer parameter node; the specific parameter node includes the upper-layer parameter node and an associated parameter node of the upper-layer parameter node; the associated parameter node is a parameter node affected by the parameter value change of the upper-layer parameter node; Writing the latest parameter value of the specific parameter node into the shadow storage area corresponding to the specific parameter node; wherein the shadow storage area is a cache area of the software part of the electronic system; the shadow storage area is used to record the parameter value of the parameter node currently stored in the hardware storage area corresponding to the shadow storage area; If it is detected that the latest parameter value written into the shadow storage area is different from the parameter value of the hardware storage area recorded before writing, the latest parameter value in the shadow storage area is downloaded to the hardware storage area corresponding to the shadow storage area.
2. The method according to claim 1, characterized in that: After writing the latest parameter value of the specific parameter node into the shadow storage area corresponding to the specific parameter node, the method further includes: If it is detected that the latest parameter value written into the shadow storage area is the same as the parameter value of the hardware storage area recorded before writing, the latest parameter value in the shadow storage area is not downloaded to the hardware storage area corresponding to the shadow storage area.
3. The method according to claim 1, characterized in that If it is detected that the latest parameter value written in the shadow storage area is different from the parameter value of the hardware storage area recorded before writing, the latest parameter value in the shadow storage area is downloaded to the hardware storage area corresponding to the shadow storage area, including: If it is detected that the shadow storage area has a first dirty flag set, the latest parameter value in the shadow storage area with the first dirty flag set is downloaded to the hardware storage area corresponding to the shadow storage area; wherein the first dirty flag is used to indicate that the latest parameter value currently written into the shadow storage area is different from the parameter value of the hardware storage area recorded before writing.
4. The method according to claim 1, characterized in that The step of calculating the parameter value of a specific parameter node in response to the parameter change-influencing instruction to obtain the latest parameter value of the specific parameter node includes: In response to the parameter change influencing instruction, performing parameter value calculation on the upper-layer parameter node according to the parameter change influencing instruction to obtain the latest parameter value of the upper-layer parameter node; Detecting whether the latest parameter value of the upper-layer parameter node is the same as the parameter value of the upper-layer parameter node before calculation; If it is detected that the latest parameter value of the upper-layer parameter node is the same as the parameter value of the upper-layer parameter node before calculation, then the parameter value calculation for the specific parameter node is terminated; If it is detected that the latest parameter value of the upper-layer parameter node is different from the parameter value before the upper-layer parameter node is calculated, a second dirty flag is set for the upper-layer parameter node to trigger parameter value calculation of the output parameter node of the upper-layer parameter node to obtain the latest parameter value of the output parameter node; wherein the output parameter node of the upper-layer parameter node is an associated parameter node that calculates its own parameter value according to the parameter value of the upper-layer parameter node; The output parameter node is used as a new upper parameter node, and the step of detecting whether the latest parameter value of the upper parameter node is the same as the parameter value before the upper parameter node is calculated is returned until there is no output parameter node of the upper parameter node.
5. The method according to claim 4, characterized in that Writing the latest parameter value of the specific parameter node into the shadow storage area corresponding to the specific parameter node includes: Filter out parameter nodes with a second dirty flag set from the specific parameter nodes; The latest parameter value of the filtered parameter node is written into the shadow storage area corresponding to the filtered parameter node.
6. The method according to any one of claims 1 to 5, characterized in that: The parameter download framework of the electronic system includes at least a parameter response module and a parameter linkage module; wherein, in response to the parameter change instruction, the parameter value calculation is performed on the specific parameter node to obtain the latest parameter value of the specific parameter node, including: The parameter response module responds to the parameter change influencing instruction and receives the parameter change influencing instruction through the upper-layer parameter change influencing interface to trigger the parameter linkage module to calculate the parameter value of the specific parameter node according to the parameter change influencing instruction to obtain the latest parameter value of the specific parameter node.
7. The method according to claim 6, characterized in that The parameter download framework of the electronic system further includes: a download control module and a parameter mapping module; the parameter mapping module records the correspondence between the parameter nodes and the shadow storage area of the electronic system; the writing of the latest parameter value of the specific parameter node to the shadow storage area corresponding to the specific parameter node includes: The download control module obtains the latest parameter value of the specific parameter node from the parameter linkage module; The download control module writes the latest parameter value of the specific parameter node into the shadow storage area corresponding to the specific parameter node according to the correspondence between the parameter nodes of the electronic system and the shadow storage area recorded in the parameter mapping module.
8. The method according to claim 7, characterized in that The parameter mapping module also records the corresponding relationship between the shadow storage area and the hardware storage area; wherein, if it is detected that the latest parameter value written in the shadow storage area is different from the parameter value of the hardware storage area recorded before writing, the latest parameter value in the shadow storage area is downloaded to the hardware storage area corresponding to the shadow storage area, including: If the download control module detects that the latest parameter value written into the shadow storage area is different from the parameter value of the hardware storage area recorded before writing, the latest parameter value in the shadow storage area is downloaded to the hardware storage area corresponding to the shadow storage area according to the correspondence between the shadow storage area and the hardware storage area recorded by the parameter mapping module.
9. A parameter storage device, characterized in that: A parameter download framework applied to an electronic system, wherein the parameter download framework of the electronic system is arranged in the software part of the electronic system, and the parameter storage device comprises: A parameter calculation unit, configured to calculate a parameter value for a specific parameter node in response to an instruction affecting parameter changes, and obtain a latest parameter value of the specific parameter node; wherein the instruction affecting parameter changes is an instruction affecting a parameter value change of an upper-layer parameter node; the specific parameter node includes the upper-layer parameter node and an associated parameter node of the upper-layer parameter node; the associated parameter node is a parameter node affected by a parameter value change of the upper-layer parameter node; A first writing unit, used to write the latest parameter value of the specific parameter node into a shadow storage area corresponding to the specific parameter node; wherein the shadow storage area is a cache area of the software part of the electronic system; the shadow storage area is used to record the parameter value of the parameter node currently stored in the hardware storage area corresponding to the shadow storage area; The second writing unit is used to download the latest parameter value in the shadow storage area to the hardware storage area corresponding to the shadow storage area if it is detected that the latest parameter value written into the shadow storage area is different from the parameter value of the hardware storage area recorded before writing.
10. A computer-readable medium, characterized in that A computer program is stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
11. A parameter storage device, characterized in that: include: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the method according to any one of claims 1 to 8.
12. An electronic system, characterized in that: include: An application layer, a parameter download framework and a hardware storage area; wherein the application layer and the parameter download framework are arranged in the software part of the electronic system; The application layer is used to generate an instruction affecting parameter changes, and output the instruction affecting parameter changes to a parameter download framework; The parameter download framework is used to execute the method according to any one of claims 1 to 8; The hardware storage area is used to store parameter values of parameter nodes of the electronic system.
Citation Information
Patent Citations
Cluster recovery method and device, equipment and storage medium
CN116107957A
Synchronization of change-tracked data store with data store having limited or no change tracking
US20080022057A1
Storage Device and Method for Updating a Shadow Master Boot Record
US20130024682A1
System and method for utilization of a data buffer
US20170123722A1