Method, device and equipment for correcting energy level based on logic or condition and storage medium
By comparing the energy level difference value and correction amount array in parallel, the corrected energy level of condensed matter materials is determined, which solves the problem of inaccurate energy level correction in the prior art, and improves the accuracy and efficiency of simulation results.
Patent Information
- Application Number
- CN202411268738.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-12-13
AI Technical Summary
The prior art cannot accurately and efficiently correct the energy level of condensed matter materials, resulting in inaccurate simulation results.
The parallel comparison method is adopted to obtain the energy level difference value array and the energy level correction array of the material to be simulated, and the corrected energy level is determined, which improves the efficiency of energy level correction.
The efficiency of energy level correction is improved, and the problem of inability to accurately and efficiently correct energy levels in the prior art is solved, ensuring the accuracy of simulation results.
Smart Images

Figure CN119132474A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular, to a method, apparatus, device and storage medium for correcting energy levels based on logic or conditions. Background Art
[0002] In the process of studying condensed materials, it is necessary to simulate the materials, and simulating the energy level of condensed materials is a key step in material simulation. Energy level refers to the distribution of electrons outside the nucleus according to different orbits according to different energies, that is, electrons move in specific, independent orbits, and these atoms have discrete energies. These fixed energy values are called energy levels. If the simulated energy level is different from the actual energy level, it will affect the research results of condensed materials. When determining the energy level of condensed materials, the energy level needs to be corrected. When correcting the energy level, you can use logic or conditions to determine whether the energy level meets the requirements. For example, when condition 1 (condition1) is met or condition 2 (condition2) is met, the corresponding action is executed, otherwise it is not executed. Its form can be summarized as ifcondition1|condition2 action;end.
[0003] However, the prior art performs operations on logic or conditions in a serial manner. Since there are too many energy levels to be corrected, this method cannot efficiently correct the energy levels. Summary of the invention
[0004] The present invention provides a method, device, equipment and storage medium for correcting energy levels based on logic or conditions, so as to solve the problem that the energy levels cannot be corrected accurately and efficiently in the prior art.
[0005] According to one aspect of the present invention, there is provided a method for modifying energy levels based on logic or conditions, the method comprising:
[0006] Obtaining an energy level correction condition in a logical OR condition, wherein the energy level correction condition includes an energy level difference array and an energy level correction amount array of a material to be simulated;
[0007] By comparing the data in the energy level difference array and the energy level correction amount array in parallel, a comparison result of the energy level correction condition is obtained;
[0008] According to the comparison result, corresponding data are selected from the corrected energy level correction value array and the uncorrected energy level correction value array to obtain a compared mixed array of the energy level correction conditions;
[0009] The compared mixed array is used as the corrected energy level of the material to be simulated.
[0010] According to another aspect of the present invention, there is provided a device for modifying energy levels based on logic or conditions, the device comprising:
[0011] An acquisition module, used for acquiring an energy level correction condition in a logical OR condition, wherein the energy level correction condition includes an energy level difference array and an energy level correction amount array of a material to be simulated;
[0012] A comparison module, used for obtaining a comparison result of the energy level correction condition by comparing the data in the energy level difference array and the energy level correction amount array in parallel;
[0013] A determination module, used for selecting corresponding data from the corrected energy level correction amount array and the uncorrected energy level correction amount array according to the comparison result, to obtain a compared mixed array of the energy level correction conditions;
[0014] An output module is used to use the compared mixed array as the corrected energy level of the material to be simulated.
[0015] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising: at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the method for modifying energy levels based on logic or conditions as described in any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method of modifying energy levels based on logic or conditions as described in any embodiment of the present invention when executed.
[0019] The method, device, equipment and storage medium for correcting energy levels based on logical or conditions of the embodiments of the present invention include: obtaining energy level correction conditions in the logical or conditions, wherein the energy level correction conditions include an energy level difference array and an energy level correction amount array of the material to be simulated; obtaining a comparison result of the energy level correction conditions by comparing the data in the energy level difference array and the energy level correction amount array in parallel; selecting corresponding data from the corrected energy level correction amount array and the uncorrected energy level correction amount array according to the comparison result to obtain a compared mixed array of the energy level correction conditions; and using the compared mixed array as the corrected energy level of the material to be simulated. The method obtains the energy level correction conditions that need to be judged in the logical or conditions, determines the energy level that needs to be corrected in the energy level correction conditions by parallel comparison, and then selects corresponding data from the corrected energy level correction amount array to obtain the corrected energy level of the material to be simulated, thereby improving the efficiency of energy level correction and solving the problem that the energy level cannot be corrected accurately and efficiently in the prior art.
[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 A flowchart of a method for correcting energy levels based on logic or conditions provided in Embodiment 1 of the present invention;
[0023] Figure 2 A flow chart of a method for correcting energy levels based on logic or conditions provided in Embodiment 2 of the present invention;
[0024] Figure 3 A schematic diagram of a method for correcting energy levels based on logic or conditions provided by an embodiment of the present invention;
[0025] Figure 4 A schematic diagram of the structure of a device for correcting energy levels based on logic or conditions provided in Embodiment 3 of the present invention;
[0026] Figure 5 Schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only an embodiment of a part of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work should belong to the scope of protection of the present invention. It should be understood that the various steps recorded in the method implementation of the present invention can be performed in different orders and / or in parallel. In addition, the method implementation may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0028] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, any variations of the terms "including" and "having" are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0031] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.
[0032] Embodiment 1
[0033] Figure 1A flow chart of a method for correcting energy levels based on logic or conditions is provided for Embodiment 1 of the present invention. The method can be applied to the situation where the energy level of a material to be simulated is corrected when simulating the material. The method can be performed by a device for correcting energy levels based on logic or conditions, wherein the device can be implemented by software and / or hardware and is generally integrated on an electronic device. In this embodiment, the electronic device includes but is not limited to: computers and other devices.
[0034] like Figure 1 As shown, a method for correcting energy levels based on logic or conditions provided in Embodiment 1 of the present invention includes the following steps:
[0035] S110, obtaining an energy level correction condition in a logical OR condition, wherein the energy level correction condition includes an energy level difference array and an energy level correction amount array of a material to be simulated.
[0036] Among them, the logic or condition can be a condition for judging whether at least one of multiple conditions is true. The energy level correction condition can be a condition for judging whether the energy level of the material to be simulated meets the requirements. The material to be simulated can be a material that needs to be simulated, and the material to be simulated can be a condensed material. Condensed material refers to a relatively ordered structure formed by atoms, molecules or ions through interaction forces in solid or liquid state. Condensed materials usually include two main states of matter: crystals and non-crystals (or amorphous materials). The study of condensed materials is an important branch of multiple disciplines such as materials science, physics and chemistry, covering various technologies and applications. The energy level difference array and the energy level correction array can include multiple data.
[0037] In this embodiment, when studying condensed materials, it is usually necessary to simulate the properties of condensed materials. During the simulation, it is necessary to optimize the Hamiltonian diagonalization process and correct the energy level of the condensed materials. Therefore, this embodiment can determine whether the energy level meets the requirements through logic or conditions.
[0038] In one embodiment, the data in the energy level difference array represents the difference between the iterative value and the initial value of different energy levels of the material to be simulated, the iterative value is the energy level obtained after each energy level correction of the material to be simulated, and the initial value is the energy level of the material to be simulated before the energy level correction.
[0039] The iteration value may be the energy level of the material to be simulated after correction at the current iteration number, and the initial value may be the energy level of the material to be simulated before the first iteration without any correction.
[0040] In this embodiment, in the process of determining the energy level of the material to be simulated, multiple iterations are required, and the energy level needs to be corrected in each iteration until the energy level obtained meets the requirements, and then the energy level correction is completed. In other words, in each iteration, it is necessary to determine whether the energy level correction condition in the logical or condition meets the requirements. The specific iterative process can be determined according to the actual situation, and this embodiment does not limit this.
[0041] S120, obtaining a comparison result of the energy level correction condition by comparing the data in the energy level difference array and the energy level correction amount array in parallel.
[0042] The comparison result can be used to indicate the size relationship between the data in the energy level difference array and the data in the energy level correction array. Parallel comparison refers to simultaneously determining the size relationship between the data in the two arrays, and the parallel comparison can be achieved through an electronic medium with this function.
[0043] In this embodiment, the number of data in the energy level difference array and the energy level correction amount array is the same. This embodiment compares the data in the energy level difference array and the energy level correction amount array in a parallel comparison manner to obtain a comparison result of the energy level correction condition. This embodiment can speed up the comparison by parallel comparison.
[0044] S130. Select corresponding data from the corrected energy level correction amount array and the uncorrected energy level correction amount array according to the comparison result to obtain a compared mixed array of the energy level correction conditions.
[0045] The data in the corrected energy level correction amount array refers to the value that can be used as the corrected energy level when it is determined that the energy level does not meet the requirements, and the data in the uncorrected energy level correction amount array can be the value when the energy level does not need to be corrected. The mixed array after comparison can be the set of all energy levels obtained after the energy level is corrected.
[0046] In this embodiment, whether the energy level needs to be corrected can be determined based on the comparison results. When the energy level needs to be corrected, the corresponding data is selected from the corrected energy level correction amount array. When the energy level does not need to be corrected, the corresponding data is selected from the uncorrected energy level correction amount array, thereby obtaining a compared mixed array of energy level correction conditions.
[0047] S140, using the compared mixed array as the corrected energy level of the material to be simulated.
[0048] In this embodiment, the data in the mixed array after comparison can be used as the corrected energy level of the material to be simulated.
[0049] A method for correcting energy levels based on logic or conditions provided in the first embodiment of the present invention includes: obtaining energy level correction conditions in the logic or conditions, wherein the energy level correction conditions include an energy level difference array and an energy level correction amount array of the material to be simulated; obtaining a comparison result of the energy level correction conditions by comparing the data in the energy level difference array and the energy level correction amount array in parallel; selecting corresponding data from the corrected energy level correction amount array and the uncorrected energy level correction amount array according to the comparison result to obtain a compared mixed array of the energy level correction conditions; and using the compared mixed array as the corrected energy level of the material to be simulated. The method obtains the energy level correction conditions that need to be judged in the logic or conditions, determines the energy level that needs to be corrected in the energy level correction conditions by parallel comparison, and then selects corresponding data from the corrected energy level correction amount array to obtain the corrected energy level of the material to be simulated, thereby improving the efficiency of energy level correction and solving the problem that the energy level cannot be corrected accurately and efficiently in the prior art.
[0050] Based on the above embodiment, a variant embodiment of the above embodiment is proposed. It should be noted that in order to make the description concise, only the differences from the above embodiment are described in the variant embodiment.
[0051] In one embodiment, the logic OR condition includes two conditions, and obtaining the energy level correction condition in the logic OR condition includes: selecting one condition from the logic OR condition as the energy level correction condition.
[0052] In this embodiment, the logical OR condition may include two energy level correction conditions. Therefore, when comparing the arrays in the energy level correction conditions in parallel, one condition may be selected from the two energy level correction conditions in sequence as the energy level correction condition. After processing the first energy level correction condition, the second energy level correction condition may be processed.
[0053] The two energy level correction conditions in this embodiment can be the conditions of the material to be simulated at different energy levels. For example, the two energy level correction conditions can be DELTA_k>=eta and DELTA_k_1>=eta. DELTA_k represents the difference between the iterative value and the initial value of the kth energy level of the material to be simulated, and DELTA_k_1 represents the difference between the iterative value and the initial value of the k+1th energy level of the material to be simulated. The range of k can be determined according to the scale of the material to be simulated; eta represents the correction amount to the energy level.
[0054] In one embodiment, before using the compared mixed array as the corrected energy level of the material to be simulated, the method also includes: using the other condition remaining in the logical OR condition as the current condition to be judged; using the compared mixed array of the energy level correction condition as the new uncorrected energy level correction amount array, performing the step of determining the compared mixed array on the current condition to be judged to obtain the compared mixed array of the current condition to be judged; and using the compared mixed array of the current condition to be judged as the new compared mixed array.
[0055] In this embodiment, after judging the first energy level correction condition in the logical OR condition, it is also necessary to judge another condition in the logical OR condition. At this time, the remaining other condition in the logical OR condition can be used as the current condition to be judged, and the compared mixed array of the first energy level correction condition can be used as the new uncorrected energy level correction amount array to judge the current condition to be judged, and obtain the compared mixed array of the current condition to be judged, and use the compared mixed array of the current condition to be judged as the energy level after correction of the material to be simulated after this iteration.
[0056] Embodiment 2
[0057] Figure 2 This is a flow chart of a method for correcting energy levels based on logic or conditions provided in the second embodiment of the present invention. The second embodiment is optimized on the basis of the above embodiments. For details not yet provided in this embodiment, please refer to the first embodiment.
[0058] like Figure 2 As shown, a method for correcting energy levels based on logic or conditions provided in Embodiment 2 of the present invention includes the following steps:
[0059] S210, obtaining an energy level correction condition in a logical OR condition, wherein the energy level correction condition includes an energy level difference array and an energy level correction amount array of a material to be simulated.
[0060] S220. Based on a specified judgment format, the energy level difference array and the energy level correction amount array are respectively used as a first array and a second array; wherein the specified judgment format is that the first array is greater than the second array.
[0061] The specified judgment format is that the first array is greater than the second array.
[0062] In this embodiment, after converting the energy level correction condition into a specified judgment format according to the specified judgment format, the two arrays in the energy level correction condition are respectively used as the first array and the second array according to the size relationship to be judged. Exemplarily, if the energy level correction condition is A > B, the array A can be directly used as the first array and the array B as the second array; if the energy level correction condition is B < A, it needs to be converted to A > B, and the array A is used as the first array and the array B as the second array.
[0063] S230. Compare the magnitudes of the data in the first array and the data in the second array in parallel to obtain the comparison result of the energy level correction condition.
[0064] In this embodiment, the magnitudes of the data in the first array and the data in the second array can be compared in parallel to obtain the comparison result.
[0065] S240. Select the corresponding data from the corrected energy level correction amount array and the uncorrected energy level correction amount array according to the comparison result to obtain the mixed array after comparison of the energy level correction condition.
[0066] S250. Use the mixed array after comparison as the energy level of the material to be simulated after correction.
[0067] A method for correcting an energy level based on a logical OR condition provided in the second embodiment of the present invention specifically obtains the comparison result of the energy level correction condition by comparing the data in the energy level difference array and the energy level correction amount array in parallel, and includes: based on a specified judgment format, using the energy level difference array and the energy level correction amount array as the first array and the second array respectively; wherein, the specified judgment format is that the first array is greater than the second array; comparing the magnitudes of the data in the first array and the data in the second array in parallel to obtain the comparison result of the energy level correction condition. This method can improve the efficiency of obtaining the corrected energy level through parallel comparison.
[0068] In one embodiment, the comparing the magnitudes of the data in the first array and the data in the second array in parallel to obtain the comparison result of the energy level correction condition includes: when the data in the first array is greater than the data at the same position in the second array, recording the comparison result of the data as true; when the data in the first array is less than the data at the same position in the second array, recording the comparison result of the data as false; using the comparison results of all the data in the first array and the second array as the comparison result of the energy level correction condition.
[0069] In this embodiment, for the first array A and the second array B, the data at the same positions in the two arrays are compared in parallel, and the comparison results are recorded. For example, to determine A > B, if A[0] > B[0], the comparison result at this position is recorded as true; if A[1] < B[1], the comparison result at this position is recorded as false.
[0070] In one embodiment, the step of selecting corresponding data from the corrected energy level correction amount array and the uncorrected energy level correction amount array according to the comparison results to obtain the comparison mixed array of the energy level correction conditions includes: when the position in the comparison results is recorded as true, selecting the data at the corresponding position in the corrected energy level correction amount array as the data at this position in the comparison mixed array; when the position in the comparison results is recorded as false, selecting the data at the corresponding position in the uncorrected energy level correction amount array as the data at this position in the comparison mixed array.
[0071] In this embodiment, after obtaining the comparison results, corresponding data can be selected from the corrected energy level correction amount array and the uncorrected energy level correction amount array. When a certain position in the comparison results is recorded as true, it means that the energy level at this position needs to be modified, and the data at the corresponding position in the corrected energy level correction amount array is used as the data at this position in the comparison mixed array; when a certain position in the comparison results is recorded as false, it means that the energy level at this position does not need to be modified, and the data at the corresponding position in the uncorrected energy level correction amount array is used as the data at this position in the comparison mixed array.
[0072] Based on the technical solutions of the above embodiments, the embodiments of the present invention provide a specific implementation manner. Figure 3 FIG. is a schematic diagram of a method for correcting an energy level based on a logical or condition provided by an embodiment of the present invention. As a specific implementation manner of this embodiment, the data type of the array can be double-precision floating-point data. The first energy level correction condition includes an energy level difference array A, an energy level correction amount array B. Array A includes data (a1, a2, a3,..., an), array B includes data (b1, b2, b3,..., bn), the corrected energy level correction amount array C includes data (c1, c2, c3,..., cn), and the uncorrected energy level correction amount array D includes data (d1, d2, d3,..., dn). If the positions of the first array and the second array of the electronic medium with parallel comparison functions are used to store the two arrays to be compared, and the positions of the third array and the fourth array are used to store the results to be selected after comparison. Then array A and array B can be respectively stored in the positions of the first array and the second array, and array C and array D can be respectively stored in the positions of the third array and the fourth array. As Figure 3As shown, the mixed array after comparison obtained after the first energy level correction condition is (c1, c2, d3, d4, c5, c6, c7, c8). When judging the second energy level correction condition, the mixed array after comparison can be used as a new uncorrected energy level correction amount array to determine a new mixed array after comparison. Through the parallel comparison process, as long as one of the two energy level comparison conditions is met, the energy level of the corresponding position needs to be corrected.
[0073] Embodiment 3
[0074] Figure 4 A schematic diagram of the structure of a device for correcting energy levels based on logic or conditions provided in Example 3 of the present invention, wherein the device can be used to correct the energy level of a material to be simulated when simulating the material, wherein the device can be implemented by software and / or hardware and is generally integrated on an electronic device.
[0075] like Figure 4 As shown, the device comprises:
[0076] An acquisition module 310 is used to acquire an energy level correction condition in a logical OR condition, wherein the energy level correction condition includes an energy level difference array and an energy level correction amount array of a material to be simulated;
[0077] A comparison module 320, configured to obtain a comparison result of the energy level correction condition by comparing the data in the energy level difference array and the energy level correction amount array in parallel;
[0078] A determination module 330 is used to select corresponding data from the corrected energy level correction amount array and the uncorrected energy level correction amount array according to the comparison result to obtain a compared mixed array of the energy level correction conditions;
[0079] The output module 340 is used to use the compared mixed array as the corrected energy level of the material to be simulated.
[0080] The third embodiment provides a device for correcting energy levels based on logic or conditions, including: an acquisition module, used to acquire energy level correction conditions in the logic or conditions, wherein the energy level correction conditions include an energy level difference array and an energy level correction amount array of the material to be simulated; a comparison module, used to obtain the comparison result of the energy level correction conditions by comparing the data in the energy level difference array and the energy level correction amount array in parallel; a determination module, used to select corresponding data from the corrected energy level correction amount array and the uncorrected energy level correction amount array according to the comparison result to obtain a compared mixed array of the energy level correction conditions; and an output module, used to use the compared mixed array as the corrected energy level of the material to be simulated. By acquiring the energy level correction conditions that need to be judged in the logic or conditions, determining the energy level that needs to be corrected in the energy level correction conditions through parallel comparison, and then selecting corresponding data from the corrected energy level correction amount array, the corrected energy level of the material to be simulated is obtained, thereby improving the efficiency of energy level correction and solving the problem that the energy level cannot be corrected accurately and efficiently in the prior art.
[0081] Furthermore, the logic or condition includes two conditions, and the acquisition module 310 includes:
[0082] Select a condition from the logical OR conditions as the energy level modification condition.
[0083] Furthermore, the determination module 330 is further configured to:
[0084] The remaining condition in the logical OR condition is used as the current condition to be judged;
[0085] The compared mixed array of the energy level correction condition is used as a new uncorrected energy level correction amount array, and the step of determining the compared mixed array is performed on the current condition to be determined to obtain the compared mixed array of the current condition to be determined;
[0086] The compared mixed array of the current condition to be determined is used as a new compared mixed array.
[0087] Furthermore, the comparison module 320 includes:
[0088] Based on a specified judgment format, the energy level difference array and the energy level correction amount array are respectively used as a first array and a second array; wherein the specified judgment format is that the first array is greater than the second array;
[0089] The size relationship between the data of the first array and the data of the second array is compared in parallel to obtain a comparison result of the energy level correction condition.
[0090] Furthermore, the parallel comparison of the size relationship between the data of the first array and the data of the second array to obtain the comparison result of the energy level correction condition includes:
[0091] When the data in the first array is greater than the data at the same position in the second array, recording the comparison result of the data as true;
[0092] When the data in the first array is smaller than the data at the same position in the second array, recording the comparison result of the data as false;
[0093] The comparison result of all the data of the first array and the second array is used as the comparison result of the energy level correction condition.
[0094] Furthermore, the selecting corresponding data from the corrected energy level correction value array and the uncorrected energy level correction value array according to the comparison result to obtain the compared mixed array of the energy level correction conditions includes:
[0095] When the position record in the comparison result is true, selecting the data of the corresponding position in the corrected energy level correction amount array as the data at the position in the compared mixed array;
[0096] When the position record in the comparison result is false, the data at the corresponding position in the uncorrected energy level correction amount array is selected as the data at the position in the mixed array after comparison.
[0097] Furthermore, the data in the energy level difference array represents the difference between the iterative value and the initial value of different energy levels of the material to be simulated, the iterative value is the energy level obtained after each energy level correction of the material to be simulated, and the initial value is the energy level of the material to be simulated before the energy level correction.
[0098] The above-mentioned device for modifying energy levels based on logic or conditions can execute the method for modifying energy levels based on logic or conditions provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0099] Embodiment 4
[0100] Figure 5A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0101] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0102] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0103] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as methods based on logic or conditional correction of energy levels.
[0104] In some embodiments, the method for modifying energy levels based on logic or conditions may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for modifying energy levels based on logic or conditions described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the method for modifying energy levels based on logic or conditions in any other appropriate manner (e.g., by means of firmware).
[0105] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0106] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0107] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0108] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0109] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0110] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0111] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0112] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for modifying energy levels based on logic or conditions, characterized in that: The method comprises: Obtaining an energy level correction condition in a logical OR condition, wherein the energy level correction condition includes an energy level difference array and an energy level correction amount array of a material to be simulated; By comparing the data in the energy level difference array and the energy level correction amount array in parallel, a comparison result of the energy level correction condition is obtained; According to the comparison result, corresponding data are selected from the corrected energy level correction value array and the uncorrected energy level correction value array to obtain a compared mixed array of the energy level correction conditions; The compared mixed array is used as the corrected energy level of the material to be simulated.
2. The method according to claim 1, characterized in that The logic or condition includes two conditions, and the energy level correction condition in the acquisition logic or condition includes: Select a condition from the logical OR conditions as the energy level modification condition.
3. The method according to claim 2, characterized in that Before using the compared mixed array as the corrected energy level of the material to be simulated, the method further includes: The remaining condition in the logical OR condition is used as the current condition to be judged; The compared mixed array of the energy level correction condition is used as a new uncorrected energy level correction amount array, and the step of determining the compared mixed array is performed on the current condition to be determined to obtain the compared mixed array of the current condition to be determined; The compared mixed array of the current condition to be determined is used as a new compared mixed array.
4. The method according to claim 1, characterized in that: The step of obtaining the comparison result of the energy level correction condition by comparing the data in the energy level difference array and the energy level correction amount array in parallel includes: Based on a specified judgment format, the energy level difference array and the energy level correction amount array are respectively used as a first array and a second array; wherein the specified judgment format is that the first array is greater than the second array; The size relationship between the data of the first array and the data of the second array is compared in parallel to obtain a comparison result of the energy level correction condition.
5. The method according to claim 4, characterized in that The parallel comparison of the size relationship between the data of the first array and the data of the second array to obtain the comparison result of the energy level correction condition includes: When the data in the first array is greater than the data at the same position in the second array, recording the comparison result of the data as true; When the data in the first array is smaller than the data at the same position in the second array, recording the comparison result of the data as false; The comparison result of all data of the first array and the second array is used as the comparison result of the energy level correction condition.
6. The method according to claim 5, characterized in that The step of selecting corresponding data from the corrected energy level correction value array and the uncorrected energy level correction value array according to the comparison result to obtain the compared mixed array of the energy level correction conditions includes: When the position record in the comparison result is true, selecting the data of the corresponding position in the corrected energy level correction amount array as the data at the position in the compared mixed array; When the position record in the comparison result is false, the data at the corresponding position in the uncorrected energy level correction amount array is selected as the data at the position in the mixed array after comparison.
7. The method according to claim 1, characterized in that The data in the energy level difference array represents the difference between the iterative value and the initial value of different energy levels of the material to be simulated. The iterative value is the energy level obtained after each energy level correction of the material to be simulated, and the initial value is the energy level of the material to be simulated before the energy level correction.
8. A device for modifying energy levels based on logic or conditions, characterized in that The device comprises: An acquisition module, used for acquiring an energy level correction condition in a logical OR condition, wherein the energy level correction condition includes an energy level difference array and an energy level correction amount array of a material to be simulated; A comparison module, used for obtaining a comparison result of the energy level correction condition by comparing the data in the energy level difference array and the energy level correction amount array in parallel; A determination module, used for selecting corresponding data from the corrected energy level correction amount array and the uncorrected energy level correction amount array according to the comparison result, to obtain a compared mixed array of the energy level correction conditions; An output module is used to use the compared mixed array as the corrected energy level of the material to be simulated.
9. An electronic device, characterized in that: The device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the method for modifying energy levels based on logic or conditions according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for modifying energy levels based on logic or conditions as described in any one of claims 1 to 7 when the computer instructions are executed.
