A software emulation method and apparatus

By downgrading and rolling back the interface description language file, redundant logic and IDL information are identified and removed, thus solving the problem of redundant code in the prior art, improving the quality of the software system, and simplifying the maintainability of the code.

CN116048939BActive Publication Date: 2026-01-06YINGCHE XINGCHUANG INTELLIGENT TECH (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211700102.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-28
Publication Date
2026-01-06
Estimated Expiration
2042-12-28

AI Technical Summary

Technical Problem

In software systems, due to constantly changing requirements and updates, Interface Description Language (IDL) message definitions need to be updated frequently, leading to an increase in redundant code and logic, which reduces code quality and complexity.

Method used

By acquiring the interface description language file and full data, a downgrade process is performed to generate a downgraded interface description language file and rolled-back data. Simulation and redundancy analysis are then conducted to identify and remove redundant logic and IDL information.

Benefits of technology

By streamlining redundant logic and IDL information, the quality of software code is improved and simplified, thus enhancing code maintainability and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116048939B_ABST
    Figure CN116048939B_ABST
Patent Text Reader

Abstract

The application provides a software simulation method and device, comprising: obtaining an interface description language file corresponding to software and software full data, degrading the interface description language file to obtain a plurality of degraded interface description language files, performing data rollback on the software full data according to the degraded interface description language file to obtain a plurality of rolled-back data, respectively simulating and running the software full data and the plurality of rolled-back data on the software to obtain a first simulation result and a plurality of second simulation results, the first simulation result corresponding to the software full data, and the second simulation result corresponding to the rolled-back data; and performing redundancy analysis on all first configuration parameters according to the first simulation result and the second simulation result to obtain a redundancy analysis result, which is used for deleting redundant information in the software. The application can accurately determine redundant codes in the software, thereby reducing the complexity of the codes and improving the code quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information technology, and in particular to a software simulation method and apparatus. Background Technology

[0002] An Interface Description Language (IDL) is a language specification that describes the interfaces of software components, enabling communication between different modules (written in different languages) in a software architecture.

[0003] Software operation requires information transmission between modules. Modules communicating need to use IDL (Independent Definition Language) messages, which are obtained by defining the rules for information transmission between modules within a common module of the software architecture. Ideally, IDL message definitions should remain relatively stable. However, due to the continuous addition of new features and the need to adapt to updates during development, as well as adjustments for various reasons, IDL message definitions need to be updated periodically to ensure normal communication between modules and to allow new system functions to be triggered and run stably.

[0004] The content settings of IDL messages and the logical methods for implementing functions between modules need to correspond and match. With constantly changing requirements, the increase in IDL information and software logic may lead to obsolete code, unnecessary logic in the software design, or redundant IDL information. These situations significantly increase code complexity and reduce code quality. Summary of the Invention

[0005] This invention provides a software simulation method and apparatus to solve the above-mentioned problems.

[0006] This invention provides a software simulation method, comprising:

[0007] Obtain the interface description language file corresponding to the software and the full software data. The interface description language file includes multiple first configuration parameters, which are used to implement the logical links between various logical algorithms. The full software data includes data corresponding to the first configuration parameters.

[0008] The interface description language file is downgraded to obtain multiple downgraded interface description language files. Each downgraded interface description language file includes multiple second configuration parameters, which are one or more of the first configuration parameters, and the number of parameters in the second configuration parameters is less than the number of parameters in the first configuration parameters.

[0009] According to the downgraded interface description language file, the full data of the software is rolled back to obtain multiple rollback data, wherein each rollback data corresponds to the second configuration parameter;

[0010] The software is simulated and run with full data and multiple rollback data respectively to obtain a first simulation result and multiple second simulation results. The first simulation result corresponds to the full data of the software, and the second simulation result corresponds to the rollback data.

[0011] Redundancy analysis is performed on all first configuration parameters based on the first simulation results and the second simulation results to obtain redundancy analysis results, which are used to remove redundant information in the software.

[0012] According to a software simulation method provided by the present invention, the step of performing redundancy analysis on all first configuration parameters based on the first simulation result and the second simulation result to obtain redundancy analysis results includes:

[0013] Obtain the second configuration parameters corresponding to the second simulation result;

[0014] If the first simulation result is the same as the second simulation result, the second configuration parameter corresponding to the second simulation result is compared with the first configuration parameter to determine the redundant configuration parameter, and the logic algorithm corresponding to the redundant configuration parameter is obtained as the redundant logic algorithm.

[0015] According to a software simulation method provided by the present invention, the step of downgrading the interface description language file to obtain multiple downgraded interface description language files includes:

[0016] Multiple second configuration parameters are obtained by arranging and combining the first configuration parameters using a sequence combination algorithm;

[0017] The interface description language file is downgraded according to the second configuration parameter to obtain multiple downgraded interface description language files, and each downgraded interface description language file corresponds to the second configuration parameter.

[0018] According to a software simulation method provided by the present invention, the step of using a sequence combination algorithm to permutate and combine the first configuration parameters to obtain a plurality of second configuration parameters includes:

[0019] The first configuration parameter is permuted and combined using a sequence combination algorithm to obtain m second configuration parameters; where m is the result of 2 to the power of n minus 2, and n is the number of parameters of the first configuration parameter.

[0020] According to a software simulation method provided by the present invention, after determining redundant configuration parameters and obtaining the logical algorithm corresponding to the redundant configuration parameters as a redundant logical algorithm, the method further includes:

[0021] The redundant configuration parameter is removed from the first configuration parameter, and the redundant logic algorithm is removed from the functional module.

[0022] According to a software simulation method provided by the present invention, after obtaining the second configuration parameters corresponding to the second simulation result, the method further includes:

[0023] If the first simulation result is different from the second simulation result, the second configuration parameter corresponding to the second simulation result is compared with the first configuration parameter to determine the necessary configuration parameter, and the logic algorithm corresponding to the necessary configuration parameter is obtained as the necessary logic algorithm.

[0024] According to a software simulation method provided by the present invention, the software is autonomous driving system software.

[0025] The present invention also provides a software simulation device, comprising:

[0026] The software information acquisition module is used to acquire the interface description language file corresponding to the software and the full software data. The interface description language file includes multiple first configuration parameters, which are used to implement the logical links between various logical algorithms. The full software data includes data corresponding to the first configuration parameters.

[0027] The downgrade module is used to downgrade the interface description language file to obtain multiple downgraded interface description language files. Each downgraded interface description language file includes multiple second configuration parameters, which are one or more of the first configuration parameters, and the number of parameters in the second configuration parameters is less than the number of parameters in the first configuration parameters.

[0028] The data rollback module is used to roll back the full data of the software according to the downgraded interface description language file to obtain multiple rollback data, wherein each rollback data corresponds to the second configuration parameter;

[0029] The simulation module is used to simulate running the full data of the software and multiple rollback data in the software to obtain a first simulation result and multiple second simulation results. The first simulation result corresponds to the full data of the software, and the second simulation result corresponds to the rollback data.

[0030] The redundancy analysis module is used to perform redundancy analysis on all first configuration parameters based on the first simulation results and the second simulation results, and obtain redundancy analysis results to delete redundant information in the software.

[0031] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement any of the software simulation methods described above.

[0032] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any of the software simulation methods described above.

[0033] The software simulation method and apparatus provided by this invention, wherein the software simulation method obtains multiple rollback data by downgrading the interface description language file and rolling back the full software data, and performs simulation based on the rollback data. The analysis of the simulation results can accurately obtain the redundancy of redundant logic and IDL information, which can be used to improve the quality of subsequent software code. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0035] Figure 1 This is one of the flowcharts of the software simulation method provided in the embodiments of the present invention;

[0036] Figure 2 This is a second flowchart illustrating the software simulation method provided in this embodiment of the invention;

[0037] Figure 3 This is a schematic diagram of the configuration parameters in the interface description language file provided in the embodiments of the present invention;

[0038] Figure 4 This is a schematic diagram of degradation and data rollback provided in an embodiment of the present invention;

[0039] Figure 5 This is a simulation comparison diagram provided in an embodiment of the present invention;

[0040] Figure 6 A schematic diagram of the software simulation device provided in an embodiment of the present invention;

[0041] Figure 7 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0043] Before describing the software simulation method and apparatus provided by this invention, the problems mentioned in this invention will be explained in detail.

[0044] First, the software comprises multiple functional modules, each storing various functional logic algorithms. Each algorithm can implement the function of its corresponding module, and a specific function is achieved by calling multiple modules. Since different functional modules may be written in different languages, an Interface Description Language (IDL) file is needed to enable communication between the modules, that is, to establish pathways between the functional logic algorithms within each module.

[0045] After continuous upgrades or optimizations, the various modules of the software contain excessive redundant functional logic algorithms. Correspondingly, the Interface Description Language (IDL) file also contains redundant IDL information. These redundant functional logic algorithms and redundant IDL information increase the complexity of the software code and reduce code quality. Therefore, it is necessary to delete redundant code. Before this, it is necessary to identify this redundant code. This invention uses a software simulation method and apparatus to identify redundant code. The software simulation method and apparatus proposed in this invention will be described below with reference to the accompanying drawings.

[0046] Figure 1 This is one of the flowcharts of the software simulation method provided in the embodiments of the present invention; Figure 2 This is a second flowchart illustrating the software simulation method provided in this embodiment of the invention; as shown below. Figure 1 As shown in Figure 2, the software simulation method includes:

[0047] S101, Obtain the interface description language file corresponding to the software and the full software data.

[0048] The interface description language file includes multiple first configuration parameters, which are used to implement the logical links between various logical algorithms. The full software data includes data corresponding to the first configuration parameters.

[0049] In this step, the software is the latest version after continuous upgrades or optimizations. Unnecessary redundant functional logic algorithms exist in various functional modules. Correspondingly, the Interface Description Language (IDL) file also contains IDL information related to these redundant functional logic algorithms (i.e., the first configuration parameters that implement pathways between different functional logic algorithms). In this case, the obtained IDL file is the latest version, which includes both necessary and unnecessary IDL information. The full software data is the data recorded during software runtime, which includes information related to both necessary and unnecessary logic algorithms.

[0050] Optionally, the software is autonomous driving system software. Specifically, in the case of an autonomous driving system, the software is deployed and runs on the vehicle, recording data including perception data, vehicle planning data, function triggering data, and data on important events during driving, and uploading the recorded data to the cloud for storage.

[0051] S102, downgrade the interface description language file to obtain multiple downgraded interface description language files.

[0052] Each downgraded interface description language file includes multiple second configuration parameters, which are one or more of the first configuration parameters, and the number of parameters in the second configuration parameters is less than the number of parameters in the first configuration parameters.

[0053] Specifically, the interface description language file IDLV2.0 is rolled back to obtain downgraded interface description language files IDLV1.1, IDLV1.2, IDLV1.3, IDLV1.4, etc. The difference between these and the downgraded interface description language files is that IDLV2.0 includes IDL information corresponding to all logical links, that is, it includes the IDL parameters that implement all logical links, while the downgraded interface description language files only include a few IDL parameters. For example, IDLV2.0 includes parameters A, B, and C, while the downgraded interface description language files contain one or more of A, B, or C, with a smaller number of parameters than in IDLV2.0.

[0054] It should be noted that the downgrading of the Interface Description Language (IDL) file is achieved by permuting and combining all the first configuration parameters in IDLV 2.0 to obtain different parameter combinations (i.e., second configuration parameters). For example, if IDLV 2.0 includes parameters A, B, and C, the parameter combinations can be A, B, C, A and B, A and C, or B and C. The downgraded IDL file is then generated based on these different parameter combinations. The specific parameter allocation method can be implemented using scripts.

[0055] S103, roll back the full data of the software according to the downgraded interface description language file to obtain multiple rollback data, wherein each rollback data corresponds to the second configuration parameter.

[0056] In this step, the data used to implement the logical link in the full software data is packaged according to the logical link corresponding to the interface description language file after the downgrade, thereby obtaining the rollback data.

[0057] It should be noted that the full software data is stored and retrieved in binary form. Data recorded by different software versions will be mapped and matched with IDL content according to the required version. In other words, the data in the full software data corresponds to each parameter in the IDL. During the data rollback process, the data is transformed according to different IDL parameters to obtain the rollback data. This rollback data corresponds to the second configuration parameter included in each downgraded interface description language file.

[0058] S104, simulate and run the full data of the software and multiple rollback data in the software respectively to obtain the first simulation result and multiple second simulation results.

[0059] The first simulation result corresponds to the full data of the software, and the second simulation result corresponds to the data after rollback.

[0060] S105, based on the first simulation results and the second simulation results, a redundancy analysis is performed on all first configuration parameters to obtain redundancy analysis results, which are used to delete redundant information in the software. That is, the first simulation results are compared with each second simulation result to complete the redundancy analysis of all first configuration parameters and obtain redundancy analysis results. Based on the redundancy analysis results, relevant redundant information is deleted.

[0061] For example, the first simulation result Output1 is obtained by simulating the full software data of the interface description language file IDLV2.0 (including parameters A, B, and C). The first simulation result Output1 includes information related to parameters A, B, and C. The second simulation result Output2 is obtained by simulating the rolled-back data of the downgraded interface description language file IDLV1.1 (including parameters A and B). The second simulation result Output2 includes information about parameters A and B.

[0062] If the first simulation result Output1 is the same as the second simulation result Output2, it means that the software function is not affected by the absence of parameter C. It is determined that the information related to parameter C in the interface description language file IDL V2.0 is redundant, and the logic algorithms related to parameter C in the corresponding functional modules are redundant logic algorithms.

[0063] If the first simulation result Output1 is different from the second simulation result Output2, it indicates that the existence of parameter C affects the software function, and it is a necessary parameter. The logic algorithm related to this necessary parameter is a necessary logic algorithm.

[0064] The software simulation method provided in this invention obtains multiple rollback data by downgrading the interface description language file and rolling back the full software data. Simulation is then performed based on the rollback data, and the simulation results can accurately determine the redundancy of redundant logic and IDL information, which can be used to improve the quality of subsequent software code.

[0065] In some embodiments of the present invention, the step of performing redundancy analysis on all first configuration parameters based on the first simulation results and the second simulation results to obtain redundancy analysis results includes:

[0066] Obtain the second configuration parameters corresponding to the second simulation result.

[0067] If the first simulation result is the same as the second simulation result, the second configuration parameter corresponding to the second simulation result is compared with the first configuration parameter to determine the redundant configuration parameter, and the logic algorithm corresponding to the redundant configuration parameter is obtained as the redundant logic algorithm.

[0068] If the first simulation result is different from the second simulation result, the second configuration parameter corresponding to the second simulation result is compared with the first configuration parameter to determine the necessary configuration parameter, and the logic algorithm corresponding to the necessary configuration parameter is obtained as the necessary logic algorithm.

[0069] like Figure 3 As shown, functional module 1 contains software logic 1, and functional module 2 contains software logic 2. Function M can be implemented by calling software logic 1 and software logic 2. The interface description language file IDLV2.0 connects software logic 1 and software logic 2. This interface description language file IDLV2.0 is configured with parameters A, B, C, and D, which are the first configuration parameters. It should be noted that, for the sake of brevity, the configuration parameters included in IDLV2.0 are used here. In practice, IDLV2.0 includes the configuration parameters corresponding to all software logic, and it can implement all functions of the software.

[0070] like Figure 4As shown, the second configuration parameter in the downgraded interface description language file comes from parameters A, B, C, and D. It can be A, A and B, or A, B, and C, and its number of parameters is less than the first configuration parameter. Assume the parameters of the downgraded interface description language file IDLV1.1 are A, B, and C, and the parameters of the downgraded interface description language file IDLV1.2 are A, B, and D. Correspondingly, the rollback data V1.1 will include information about parameters A, B, and C, and the rollback data V1.2 will include information about parameters A, B, and D. Based on the above data, the first simulation result Output1 corresponds to parameters A, B, C, and D, a second simulation result Output2 corresponds to parameters A, B, and C, and another second simulation result Output3 corresponds to parameters A, B, and D.

[0071] like Figure 5 As shown, the first simulation result is compared with each of the second simulation results. When Output1 and Output2 are the same, parameter D is determined to be a redundant parameter, and its related logic algorithm is a redundant logic algorithm. When Output1 and Output2 are different, parameter D is a necessary parameter, and its related logic algorithm is a necessary logic algorithm.

[0072] Similarly, when Output1 and Output3 are the same, parameter C is determined to be a redundant parameter, and its related logical algorithm is a redundant logical algorithm. When Output1 and Output3 are different, parameter C is a necessary parameter, and its related logical algorithm is a necessary logical algorithm.

[0073] It should be noted that the simulation and redundancy analysis results of the logic links corresponding to Output2 and Output3 do not affect each other.

[0074] In some embodiments of the present invention, the step of downgrading the interface description language file to obtain multiple downgraded interface description language files includes:

[0075] Multiple second configuration parameters are obtained by arranging and combining the first configuration parameters using a sequence combination algorithm.

[0076] Specifically, the first configuration parameters are permuted and combined using a sequence combination algorithm to obtain m second configuration parameters.

[0077] Where m is the result of 2 raised to the power of n minus 2, that is, m = 2. n -2, where n is the number of parameters in the first configuration parameter.

[0078] Taking the first configuration parameters as A, B and C as an example, the second configuration parameters obtained by permutation and combination are A, B, C, A+B, A+C, B+C.

[0079] The interface description language file is downgraded according to the second configuration parameter to obtain multiple downgraded interface description language files. Each downgraded interface description language file corresponds to one of the second configuration parameters. In other words, each downgraded interface description language file includes one second configuration parameter.

[0080] In some embodiments of the present invention, after determining the redundancy configuration parameters and obtaining the logical algorithm corresponding to the redundancy configuration parameters as the redundancy logical algorithm, the method further includes:

[0081] The redundant configuration parameters are removed from the first configuration parameters, and the redundant logic algorithms are also removed from the functional modules. Taking the first configuration parameters as A, B, and C as an example, if parameter C is determined to be a redundant configuration parameter, then parameter C is removed from IDLV2.0, and the logic algorithms related to C are removed from the functional modules.

[0082] After obtaining all redundancy analysis results and deleting relevant redundant information, the software is updated.

[0083] The software simulation method provided in this embodiment of the invention removes redundant configuration parameters and redundant logic algorithms after they are determined, thereby improving code quality.

[0084] The software simulation device provided by the present invention is described below. The software simulation device described below can be referred to in correspondence with the software simulation method described above.

[0085] Figure 6 This is a schematic diagram of the software simulation device structure provided in an embodiment of the present invention, such as... Figure 6 As shown, the software simulation device includes a software information acquisition module 601, a degradation module 602, a data rollback module 603, a simulation module 604, and a redundancy analysis module 605.

[0086] The software information acquisition module 601 is used to acquire the interface description language file corresponding to the software and the full data of the software.

[0087] The interface description language file includes multiple first configuration parameters, which are used to implement the logical links between various logical algorithms. The full software data includes data corresponding to the first configuration parameters.

[0088] In this module, the software is the latest version after continuous upgrades and optimizations. Unnecessary redundant functional logic algorithms exist in each functional module. Correspondingly, the Interface Description Language (IDL) file also contains IDL information related to these redundant functional logic algorithms (i.e., the first configuration parameters that implement pathways between different functional logic algorithms). In this case, the obtained IDL file is the latest version, which includes both necessary and unnecessary IDL information. The full software data is the data recorded during software runtime, which includes information related to both necessary and unnecessary logic algorithms.

[0089] Optionally, the software is autonomous driving system software. Specifically, in the case of an autonomous driving system, the software is deployed and runs on the vehicle, recording data including perception data, vehicle planning data, function triggering data, and data on important events during driving, and uploading the recorded data to the cloud for storage.

[0090] The downgrade module 602 is used to downgrade the interface description language file to obtain multiple downgraded interface description language files.

[0091] Each downgraded interface description language file includes multiple second configuration parameters, which are one or more of the first configuration parameters, and the number of parameters in the second configuration parameters is less than the number of parameters in the first configuration parameters.

[0092] Specifically, the interface description language file IDLV2.0 is rolled back to obtain downgraded interface description language files IDLV1.1, IDLV1.2, IDLV1.3, IDLV1.4, etc. The difference between these and the downgraded interface description language files is that IDLV2.0 includes IDL information corresponding to all logical links, that is, it includes the IDL parameters that implement all logical links, while the downgraded interface description language files only include a few IDL parameters. For example, IDLV2.0 includes parameters A, B, and C, while the downgraded interface description language files contain one or more of A, B, or C, with a smaller number of parameters than in IDLV2.0.

[0093] It should be noted that the downgrading of the Interface Description Language (IDL) file is achieved by permuting and combining all the first configuration parameters in IDLV 2.0 to obtain different parameter combinations (i.e., second configuration parameters). For example, if IDLV 2.0 includes parameters A, B, and C, the parameter combinations can be A, B, C, A and B, A and C, or B and C. The downgraded IDL file is then generated based on these different parameter combinations. The specific parameter allocation method can be implemented using scripts.

[0094] The data rollback module 603 is used to roll back the full data of the software according to the downgraded interface description language file to obtain multiple rollback data, wherein each rollback data corresponds to the second configuration parameter.

[0095] In this module, the data used to implement the logical link in the full software data is packaged according to the logical link corresponding to the interface description language file after the downgrade, thereby obtaining the rollback data.

[0096] It should be noted that the full software data is stored and retrieved in binary form. Data recorded by different software versions will be mapped and matched with IDL content according to the required version. In other words, the data in the full software data corresponds to each parameter in the IDL. During the data rollback process, the data is transformed according to different IDL parameters to obtain the rollback data. This rollback data corresponds to the second configuration parameter included in each downgraded interface description language file.

[0097] The simulation module 604 is used to simulate and run the full data of the software and multiple rollback data on the software to obtain a first simulation result and multiple second simulation results.

[0098] The first simulation result corresponds to the full data of the software, and the second simulation result corresponds to the data after rollback.

[0099] The redundancy analysis module 605 is used to perform redundancy analysis on all first configuration parameters based on the first simulation results and the second simulation results, obtaining redundancy analysis results for deleting redundant information in the software. That is, the first simulation results are compared with each second simulation result to complete the redundancy analysis of all first configuration parameters and obtain redundancy analysis results. Based on the redundancy analysis results, relevant redundant information is deleted.

[0100] For example, the first simulation result Output1 is obtained by simulating the full software data of the interface description language file IDLV2.0 (including parameters A, B, and C). The first simulation result Output1 includes information related to parameters A, B, and C. The second simulation result Output2 is obtained by simulating the rolled-back data of the downgraded interface description language file IDLV1.1 (including parameters A and B). The second simulation result Output2 includes information about parameters A and B.

[0101] If the first simulation result Output1 is the same as the second simulation result Output2, it means that the software function is not affected by the absence of parameter C. It is determined that the information related to parameter C in the interface description language file IDL V2.0 is redundant, and the logic algorithms related to parameter C in the corresponding functional modules are redundant logic algorithms.

[0102] If the first simulation result Output1 is different from the second simulation result Output2, it indicates that the existence of parameter C affects the software function, and it is a necessary parameter. The logic algorithm related to this necessary parameter is a necessary logic algorithm.

[0103] The software simulation device provided in this embodiment of the invention obtains multiple rollback data by downgrading the interface description language file and rolling back the full software data. Simulation is performed based on the rollback data, and the simulation results can accurately obtain the redundancy of redundant logic and IDL information, which can be used to improve the quality of subsequent software code.

[0104] Figure 7 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention, such as... Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730, and a communication bus 740, wherein the processor 710, the communication interface 720, and the memory 730 communicate with each other through the communication bus 740. The processor 710 can call logical instructions in the memory 730 to execute a software simulation method. This software simulation method includes: acquiring an interface description language file corresponding to the software and full software data, wherein the interface description language file includes multiple first configuration parameters, which are used to implement logical links between various logical algorithms, and the full software data includes data corresponding to the first configuration parameters; downgrading the interface description language file to obtain multiple downgraded interface description language files, wherein each downgraded interface description language file includes multiple second configuration parameters, which are one or more of the first configuration parameters, and the second configuration... The number of parameters in the parameters is less than the number of parameters in the first configuration parameters; the full software data is rolled back according to the downgraded interface description language file to obtain multiple rollback data, wherein each rollback data corresponds to the second configuration parameter; the full software data and multiple rollback data are simulated and run on the software respectively to obtain a first simulation result and multiple second simulation results, wherein the first simulation result corresponds to the full software data and the second simulation result corresponds to the rollback data; redundancy analysis is performed on all first configuration parameters according to the first simulation result and the second simulation result to obtain redundancy analysis results, which are used to delete redundant information in the software.

[0105] Furthermore, the logical instructions in the aforementioned memory 730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0106] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a software simulation method. The software simulation method includes: acquiring an interface description language file corresponding to the software and full software data, wherein the interface description language file includes multiple first configuration parameters used to implement logical links between various logical algorithms, and the full software data includes data corresponding to the first configuration parameters; downgrading the interface description language file to obtain multiple downgraded interface description language files, wherein each downgraded interface description language file includes multiple second configuration parameters, the second configuration parameters being the first configuration parameters. One or more of the following are specified: the number of parameters in the second configuration parameter is less than the number of parameters in the first configuration parameter; the full software data is rolled back according to the downgraded interface description language file to obtain multiple rollback data, wherein each rollback data corresponds to the second configuration parameter; the full software data and the multiple rollback data are simulated and run on the software respectively to obtain a first simulation result and multiple second simulation results, wherein the first simulation result corresponds to the full software data and the second simulation result corresponds to the rollback data; redundancy analysis is performed on all first configuration parameters according to the first simulation result and the second simulation result to obtain redundancy analysis results, which are used to delete redundant information in the software.

[0107] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0108] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.

[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A software simulation method, characterized by, The method comprises the following steps: obtaining an interface description language file corresponding to the software and full data of the software, wherein the interface description language file comprises a plurality of first configuration parameters, the first configuration parameters are used to realize logical links between logical algorithms, and the full data of the software comprises data corresponding to the first configuration parameters; degrading the interface description language file to obtain a plurality of degraded interface description language files, wherein each degraded interface description language file comprises a plurality of second configuration parameters, the second configuration parameters are one or more of the first configuration parameters, and the number of parameters in the second configuration parameters is less than the number of parameters in the first configuration parameters; performing data rollback on the full data of the software according to the degraded interface description language file to obtain a plurality of rolled-back data, wherein each rolled-back data corresponds to the second configuration parameters; respectively simulating and running the full data of the software and the plurality of rolled-back data on the software to obtain a first simulation result corresponding to the full data of the software and a plurality of second simulation results corresponding to the rolled-back data; performing redundancy analysis on all the first configuration parameters according to the first simulation result and the second simulation result to obtain a redundancy analysis result, which is used to delete redundant information in the software.

2. The software emulation method of claim 1, wherein, The redundancy analysis result comprises the following steps: obtaining second configuration parameters corresponding to the second simulation result; in the case that the first simulation result is the same as the second simulation result, comparing the second configuration parameters corresponding to the second simulation result with the first configuration parameters to determine redundant configuration parameters, and obtaining logical algorithms corresponding to the redundant configuration parameters as redundant logical algorithms.

3. The software emulation method of claim 2, wherein, The method of degrading the interface description language file to obtain a plurality of degraded interface description language files comprises the following steps: arranging and combining the first configuration parameters by using a number series combination algorithm to obtain a plurality of second configuration parameters; degrading the interface description language file according to the second configuration parameters to obtain a plurality of degraded interface description language files, wherein the degraded interface description language files correspond to the second configuration parameters.

4. The software emulation method of claim 3, wherein, The method of arranging and combining the first configuration parameters by using a number series combination algorithm to obtain a plurality of second configuration parameters comprises the following steps: arranging and combining the first configuration parameters by using a number series combination algorithm to obtain m second configuration parameters; wherein m is the result of 2 raised to the power of n minus 2, and n is the number of parameters in the first configuration parameters.

5. The software emulation method of claim 2, wherein, After determining the redundant configuration parameters and obtaining the logical algorithms corresponding to the redundant configuration parameters as the redundant logical algorithms, the method further comprises the following steps: deleting the redundant configuration parameters in the first configuration parameters and deleting the redundant logical algorithms in the functional modules.

6. The software simulation method according to any of claims 2-5, characterized by, After obtaining the second configuration parameters corresponding to the second simulation result, the method further comprises the following steps: In a case that the first simulation result is different from the second simulation result, the second configuration parameter corresponding to the second simulation result is compared with the first configuration parameter to determine a necessary configuration parameter, and a logic algorithm corresponding to the necessary configuration parameter is obtained as a necessary logic algorithm.

7. The software emulation method of claim 6, wherein, The software is automatic driving system software.

8. A software emulation apparatus, characterized by, The software simulation method comprises the following steps: a software information acquisition module is configured to acquire an interface description language file corresponding to the software and software full data, wherein the interface description language file comprises a plurality of first configuration parameters, the first configuration parameters are used to implement logical links between the logic algorithms, and the software full data comprises data corresponding to the first configuration parameters; a degradation module is configured to degrade the interface description language file to obtain a plurality of degraded interface description language files, wherein each degraded interface description language file comprises a plurality of second configuration parameters, the second configuration parameters are one or more of the first configuration parameters, and the number of parameters in the second configuration parameters is less than the number of parameters in the first configuration parameters; a data rollback module is configured to perform data rollback on the software full data according to the degraded interface description language file to obtain a plurality of rollback data, wherein each rollback data corresponds to the second configuration parameters; a simulation module is configured to simulate running of the software full data and the plurality of rollback data on the software respectively to obtain a first simulation result and a plurality of second simulation results, the first simulation result corresponds to the software full data, and the second simulation results correspond to the rollback data; a redundancy analysis module is configured to perform redundancy analysis on all the first configuration parameters according to the first simulation result and the second simulation results to obtain a redundancy analysis result, and delete redundant information in the software.

9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the software simulation method according to any one of claims 1 to 7. 10.A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the software simulation method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Model packaging method and device, and electronic equipment

    CN111985055A

  • Redundant code removing method, apparatus and device, and computer readable storage medium

    WO2021197273A1