Method and apparatus for data interaction, electronic device, and storage medium
By specifying multi-module identification parameters in response to execution instructions during chip design, determining group identifiers and target parameters, and generating a list of target values, the problem of test case data interaction and identification under Chiplet technology is solved, and the correlation and joint simulation of multiple groups of test cases are realized.
Patent Information
- Application Number
- CN202511349706.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2045-09-22
AI Technical Summary
In chip design, with the rise of Chiplet technology, there is a need for data interaction between test cases of multiple dies or chips. Batch submission of test cases makes it impossible to identify the data interaction relationship, resulting in simulation failure.
By responding to the execution command and specifying multi-module identifier parameters, determining the configuration type of group identifier parameters and target parameters, generating a target value list, and realizing the grouping of test cases and data interaction, the correlation of multiple groups of test cases is ensured.
It enables data interaction between at least two test cases, identifies the data interaction relationships between each group of test cases running on different chips, and ensures the successful co-simulation of the same group of test cases.
Smart Images

Figure CN120850910B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of data processing, and particularly relates to a data interaction method and device, electronic equipment and storage medium. BACKGROUND
[0002] In recent years, the integrated circuit industry has developed rapidly, the chip scale has continued to expand, and the function has become more and more complex. In the chip design process, the chip verification link is crucial to ensure the correctness and completeness of the chip function. Chip verification relies on simulation means to simulate the chip working scene by running test cases to test whether the chip meets the design expectations.
[0003] In the related art, in the test of a single chip or a simple chip combination, all test cases are summarized into a configuration file, and all test cases in the configuration file are batch submitted to different computing devices for simulation test. However, with the rise of Chiplet technology, multiple dies or chips need to work together, and there is a data interaction demand between test cases running on different chips. Therefore, batch submitting all test cases will lead to the inability to identify the data interaction relationship between each test case, thereby causing simulation failure. SUMMARY
[0004] The present disclosure provides a data interaction method and device, electronic equipment and storage medium to solve the problems in the related art, which realizes data interaction between at least two test cases based on the target value of the target parameter, and groups test cases by grouping identification parameters, thereby ensuring the relevance of data interaction of multiple groups of test cases.
[0005] According to a first aspect of the present disclosure, a data interaction method is provided, which includes:
[0006] In response to the execution instruction specifying a multi-module identification parameter, the multi-module identification parameter is used to specify data interaction between at least two test cases, and the grouping identification parameter is used to group test cases.
[0007] In response to the execution instruction specifying the target parameter, the configuration type of the target parameter is determined. The configuration type at least includes a string.
[0008] In response to the configuration type of the target parameter being specified as the string, the target parameter specifies a first string and at least one second string in the at least two test cases. The string includes the first string and the second string.
[0009] generate a target value list corresponding to the first string, and obtain a target value of the target parameter from the target value list according to the at least one second string; wherein the target value of the target parameter represents data interaction between the at least two test cases.
[0010] In some embodiments of the present disclosure, the generating a target value list corresponding to the first string comprises:
[0011] constructing a dictionary corresponding to the first string;
[0012] determining a dictionary value in the dictionary as the target value list; wherein the target value list comprises at least one target value.
[0013] In some embodiments of the present disclosure, the obtaining a target value of the target parameter from the target value list according to the at least one second string comprises:
[0014] extracting an end digit in the at least one second string;
[0015] adding the end digit to an end of the first string to obtain a new string;
[0016] matching the new string with the dictionary to obtain the target value of the target parameter.
[0017] In some embodiments of the present disclosure, the determining the execution instruction specifies a group identification parameter based on the multi-module identification parameter, and judging whether the execution instruction specifies a target parameter based on the group identification parameter comprises:
[0018] judging whether the execution instruction specifies the group identification parameter based on the multi-module identification parameter;
[0019] in a case where it is determined that the execution instruction specifies the group identification parameter, judging whether the execution instruction specifies the target parameter based on the group identification parameter.
[0020] In some embodiments of the present disclosure, the method further comprises:
[0021] if it is determined that the execution instruction does not specify the group identification parameter, outputting error information.
[0022] In some embodiments of the present disclosure, the judging whether the execution instruction specifies the target parameter based on the group identification parameter comprises:
[0023] in a case where it is determined that the execution instruction does not specify the target parameter, determining a preset default value as the target value.
[0024] In some embodiments of the present disclosure, after determining the configuration type of the target parameter in response to the execution instruction specifying the target parameter, the method further comprises:
[0025] In response to the configuration type of the target parameter being specified as an integer type, wherein the configuration type further comprises the integer type;
[0026] Determining a numerical value of the integer type as the target value.
[0027] In some embodiments of the present disclosure, after obtaining the target value of the target parameter from the target value list according to the at least one second string, the method further comprises:
[0028] Based on the target value, determining whether a test case specifies a preset underlying parameter;
[0029] In the case where the test case specifies the preset underlying parameter, integrating parameter values of the multi-module identification parameter, the grouping identification parameter and the target parameter to obtain an integrated parameter value;
[0030] Inputting the integrated parameter value into a preset simulation tool to generate an intermediate file based on the integrated parameter value;
[0031] Storing the intermediate file generated by at least one group of test cases to a storage path of the integrated parameter value; wherein a group of test cases comprises the at least two test cases.
[0032] According to a second aspect of the present disclosure, a data interaction device is provided, comprising:
[0033] A first determining unit is configured to, in response to an execution instruction specifying a multi-module identification parameter, determine, based on the multi-module identification parameter, that the execution instruction specifies a grouping identification parameter, and determine, based on the grouping identification parameter, whether the execution instruction specifies a target parameter; wherein the multi-module identification parameter is used to specify data interaction between at least two test cases, and the grouping identification parameter is used to group test cases;
[0034] A first determining unit is configured to, in response to the execution instruction specifying the target parameter, determine the configuration type of the target parameter; wherein the configuration type comprises at least a string;
[0035] A second determining unit is configured to, in response to the configuration type of the target parameter being specified as the string, determine, in the at least two test cases, that the target parameter specifies a first string and at least one second string; wherein the string comprises the first string and the second string;
[0036] The generating unit is configured to generate a target value list corresponding to the first string based on the first string.
[0037] The obtaining unit is configured to obtain a target value of the target parameter from the target value list according to the at least one second string; and the target value of the target parameter represents data interaction between the at least two test cases.
[0038] In some embodiments of the present disclosure, the generating unit comprises:
[0039] The constructing module is configured to construct a dictionary corresponding to the first string.
[0040] The determining module is configured to determine a dictionary value in the dictionary as the target value list; and the target value list comprises at least one target value.
[0041] In some embodiments of the present disclosure, the obtaining unit comprises:
[0042] The extracting module is configured to extract an end digit in the at least one second string.
[0043] The adding module is configured to add the end digit to an end of the first string to obtain a new string.
[0044] The matching module is configured to match the new string with the dictionary to obtain the target value of the target parameter.
[0045] In some embodiments of the present disclosure, the first judging unit comprises:
[0046] The first judging module is configured to judge whether the execution instruction specifies the grouping identification parameter based on the multi-module identification parameter.
[0047] The second judging module is configured to judge whether the execution instruction specifies the target parameter based on the grouping identification parameter in a case where it is determined that the execution instruction specifies the grouping identification parameter.
[0048] In some embodiments of the present disclosure, the apparatus further comprises:
[0049] The output unit is configured to output an error message if it is determined that the execution instruction does not specify the grouping identification parameter.
[0050] In some embodiments of the present disclosure, the second judging module is further configured to determine a preset default value as the target value in a case where it is determined that the execution instruction does not specify the target parameter.
[0051] In some embodiments of the present disclosure, the apparatus further comprises:
[0052] The specifying unit is configured to, in response to the second determining unit determining the configuration type of the target parameter to be an integer type in response to the execution instruction specifying the target parameter, specify the configuration type of the target parameter to be the integer type.
[0053] The third determining unit is configured to determine the value of the integer type as the target value.
[0054] In some embodiments of the present disclosure, the apparatus further comprises:
[0055] The second judging unit is configured to, after the obtaining unit obtains the target value of the target parameter from the target value list according to the at least one second string, judge whether a test case specifies a preset underlying parameter based on the target value.
[0056] The integrating unit is configured to, in a case where the one test case specifies the preset underlying parameter, integrate the multi-module identification parameter, the grouping identification parameter and the target parameter to obtain a parameter integration value.
[0057] The input unit is configured to input the parameter integration value to a preset simulation tool to generate an intermediate file based on the parameter integration value.
[0058] The storage unit is configured to store the intermediate file generated by at least one group of test cases to a storage path of the parameter integration value, wherein one group of test cases comprises the at least two test cases.
[0059] According to a third aspect of the present disclosure, an electronic device is provided, comprising:
[0060] at least one processor; and
[0061] a memory communicatively connected to the at least one processor; wherein
[0062] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of the first aspect.
[0063] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to perform the method of the first aspect.
[0064] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method of the first aspect.
[0065] In summary, according to the method and device for data interaction, the electronic device and the storage medium provided by the present disclosure, the method comprises: in response to the execution instruction specifying a multi-module identification parameter, determining the execution instruction specifying a grouping identification parameter based on the multi-module identification parameter, and in response to the execution instruction specifying a target parameter, determining the configuration type of the target parameter based on the grouping identification parameter, the configuration type at least including a string; in response to the configuration type of the target parameter being specified as a string, determining that the target parameter specifies a first string and at least one second string in at least two test cases; the string includes the first string and the second string; generating a corresponding target value list based on the first string, and obtaining the target value of the target parameter from the target value list according to the at least one second string, and the obtained target value can identify the data interaction relationship between each test case in each group running on different chips, thereby realizing joint simulation of the same group of test cases.
[0066] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0067] The accompanying drawings are used to better understand the present scheme and do not limit the present disclosure. Among them:
[0068] Figure 1 A flowchart of a data interaction method provided by an embodiment of the present disclosure;
[0069] Figure 2 A flowchart of another data interaction method provided by an embodiment of the present disclosure;
[0070] Figure 3 A flowchart of another data interaction method provided by an embodiment of the present disclosure;
[0071] Figure 4 A flowchart of another data interaction method provided by an embodiment of the present disclosure;
[0072] Figure 5 A flowchart of another data interaction method provided by an embodiment of the present disclosure;
[0073] Figure 6 A simulation diagram of a data interaction method provided by an embodiment of the present disclosure;
[0074] Figure 7 A flowchart of another data interaction method provided by an embodiment of the present disclosure;
[0075] Figure 8A structural schematic diagram of a device for data interaction provided by an embodiment of the present disclosure is shown in the figure.
[0076] Figure 9 A structural schematic diagram of another device for data interaction provided by an embodiment of the present disclosure is shown in the figure.
[0077] Figure 10 A schematic block diagram of an example electronic device provided by an embodiment of the present disclosure is shown in the figure. DETAILED DESCRIPTION
[0078] Embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, in which the same or similar reference numbers represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by reference to the accompanying drawings are exemplary and are intended to explain the present disclosure, and cannot be understood as a limitation of the present disclosure.
[0079] In recent years, the integrated circuit industry has developed rapidly, the chip scale has continued to expand, and the functions have become increasingly complex. In the chip design process, the chip verification link is crucial to ensure the correctness and completeness of the chip functions. Chip verification relies on simulation means to simulate the chip working scene by running test cases to test whether the chip meets the design expectations.
[0080] In the related art, in the test of a single chip or a simple combination of chips, all test cases are summarized into a configuration file, and all test cases in the configuration file are submitted in batches to different computing devices for simulation testing. However, with the rise of Chiplet technology, multiple dies or chips need to work together, and there is a data interaction demand between test cases running on different chips. Therefore, submitting all test cases in batches will result in the inability to identify the data interaction relationship between the test cases, thereby causing simulation failure.
[0081] Therefore, in order to solve the problems in the related art, the present disclosure proposes a data interaction method, which comprises: in response to an execution instruction specifying a multi-module identification parameter, determining a grouping identification parameter specified by the execution instruction based on the multi-module identification parameter, and in response to a target parameter specified by the execution instruction, determining the configuration type of the target parameter based on the grouping identification parameter, the configuration type at least including a string; in response to the configuration type of the target parameter being specified as a string, determining at least two test cases in which the target parameter specifies a first string and at least one second string; the string includes the first string and the second string; generating a corresponding target value list based on the first string, and obtaining the target value of the target parameter from the target value list according to the at least one second string, which realizes data interaction between at least two test cases based on the target value of the target parameter, and groups the test cases by the grouping identification parameter, thereby ensuring the relevance of the data interaction of multiple groups of test cases.
[0082] The embodiments of the present disclosure are not exhaustive, but only illustrate some embodiments, and are not specific limitations on the protection scope of the present disclosure. In the case of no contradiction, each step in an embodiment can be implemented as an independent embodiment, and the steps can be combined arbitrarily, for example, the scheme after removing part of the steps in an embodiment can also be implemented as an independent embodiment, and the order of the steps in an embodiment can be exchanged arbitrarily, in addition, the optional implementation in an embodiment can be combined arbitrarily; in addition, the embodiments can be combined arbitrarily, for example, part or all of the steps of different embodiments can be combined arbitrarily, an embodiment can be combined with the optional implementation of other embodiments.
[0083] In each embodiment of the present disclosure, the terms and / or descriptions between the embodiments are consistent if there is no special description and logical conflict, and can be referred to each other, and the technical features in different embodiments can be combined to form a new embodiment according to their inherent logical relationship.
[0084] The terms used in the embodiments of the present disclosure are only for the purpose of describing the specific embodiments, and not as a limitation on the present disclosure.
[0085] In the embodiments of the present disclosure, unless otherwise specified and logically contradictory, the elements expressed in singular form, such as "one", "a", "the", "above", "said", "preceding", "this" and the like, can represent "one and only one", and can also represent "one or more", "at least one" and the like. For example, in the case of using articles such as "a", "an", "the" and the like in English, the noun after the article can be understood as singular expression, and can also be understood as plural expression.
[0086] In some embodiments, the terms "in response to", "in response to determining", "in the case of", "when", "when", "if", "if" and the like can be replaced with each other.
[0087] In some embodiments, the terms "greater than", "greater than or equal to", "not less than", "more than", "more than or equal to", "not less than", "higher than", "higher than or equal to", "not lower than", "above" and the like can be replaced with each other, and the terms "less than", "less than or equal to", "not greater than", "less than", "less than or equal to", "not more than", "lower than", "lower than or equal to", "not higher than", "below" and the like can be replaced with each other.
[0088] The prefix words of "first", "second" and the like in the embodiments of the present disclosure are only used to distinguish different description objects, and do not constitute limitation on the position, order, priority, quantity or content of the description objects. The description of the description objects should refer to the description in the context of the claims or embodiments, and should not constitute redundant limitation because of the use of the prefix words.
[0089] In the embodiments of the present disclosure, "multiple" refers to two or more.
[0090] In the embodiments of the present disclosure, the terms of "import", "input", "read in" and the like can be replaced with each other.
[0091] In some embodiments, the apparatus and the like can be interpreted as entities, and can also be interpreted as virtual, and the names thereof are not limited to the names recorded in the embodiments. The terms of "apparatus", "equipment", "device", "circuit", "network element", "node", "function", "unit", "section", "system", "network", "chip", "chip system", "entity", "subject" and the like can be replaced with each other.
[0092] Figure 1 A flowchart of a method for data interaction provided by the embodiments of the present disclosure is shown in FIG. 1, which comprises steps 101-104. Figure 1
[0093] In step 101, in response to an execution instruction specifying a multi-module identification parameter, a grouping identification parameter specified by the execution instruction is determined based on the multi-module identification parameter, and whether the execution instruction specifies a target parameter is judged based on the grouping identification parameter; wherein the multi-module identification parameter is used to specify data interaction between at least two test cases, and the grouping identification parameter is used to group test cases.
[0094] In the embodiments of the present disclosure, the execution instruction is an operation command input by a user through a command line, a running instruction configured in a simulation tool and the like, and the execution instruction is used to start a data interaction process between test cases. The multi-module identification parameter is a parameter (such as "--ds") in the execution instruction used to determine whether data interaction is needed. When the execution instruction is triggered, if the execution instruction contains the multi-module identification parameter, it means that data interaction between at least two test cases needs to be processed at present, and the at least two test cases can run on different modules (such as different chips and the like) respectively.
[0095] Based on the multi-module identification parameter, it is further determined whether the execution instruction contains a grouping identification parameter. The grouping identification parameter divides at least two test cases in a group of test cases participating in data interaction into the same group. For example, the grouping identification parameter is "--dsflag XX", and the parameter value of the grouping identification parameter is a specific identification such as "dsflag_01", "dsflag_02", etc. Through the specific identification, all test cases can be classified into the corresponding group to distinguish different interaction modules. It should be noted that the above examples are only illustrative and do not limit the specific content.
[0096] After confirming that the execution instruction specifies the grouping identification parameter, it is determined whether the execution instruction contains a target parameter. The target parameter is a parameter (such as "--seed") used to generate and obtain data interaction. The configuration content of the target parameter will directly affect the rules of data interaction between test cases.
[0097] In step 102, in response to the execution instruction specifying the target parameter, the configuration type of the target parameter is determined. The configuration type includes at least a string.
[0098] In the case where the execution instruction contains the target parameter, the configuration type of the target parameter is determined. The configuration type includes but is not limited to a string, an integer type, etc. Different configuration types can be selected according to the data interaction needs of the test cases. For example, in the scenario where a fixed value is needed as an interaction basis, an integer type is used, and in the scenario where multiple groups of test cases need to be associated, a string type can be used.
[0099] In step 103, in response to the configuration type of the target parameter being specified as the string, the target parameter specifies a first string and at least one second string in the at least two test cases. The string includes the first string and the second string.
[0100] When the configuration type of the target parameter is determined to be a string, the system identifies the first string and at least one second string specified by the target parameter in the at least two test cases participating in data interaction. For example, there is data interaction between two test cases in the same group. The first test case includes the first string "gen_md_seed_001", and the second test case includes the second string "get_md_seed_001". The first string and the second string jointly constitute the content of the configuration type of the target parameter. The naming rules of the first string and the second string are associated to realize the corresponding relationship of data interaction. It should be noted that the above examples are only illustrative and do not limit the specific content.
[0101] At step 104, a target value list corresponding to the first string is generated based on the first string, and a target value of the target parameter is obtained from the target value list according to the at least one second string; wherein the target value of the target parameter represents the data interaction between the at least two test cases.
[0102] As a realizable manner of the embodiment of the present disclosure, the generation of the target value list corresponding to the first string can generate a random sequence of target values according to a preset algorithm.
[0103] As another realizable manner of the embodiment of the present disclosure, the generation of the target value list corresponding to the first string can also obtain an ordered sequence of target values according to a preset generation rule.
[0104] According to the at least one second string, the target value of the target parameter is obtained from the target value list, and the number of target values in the target value list is determined according to the number of test case runs and other factors. For example, the second string "get_md_seed_002" selects "002" as the target value from the target value list ["001", "002",..., "00X"], which is used to represent the data interaction between the at least two test cases. For example, the target value can be an index value or a check code when data is transmitted between test cases, to ensure the correspondence of data interaction. It should be noted that the above examples are only illustrative and do not limit the specific content.
[0105] In summary, the method for data interaction provided by the present disclosure comprises: in response to the execution instruction specifying a multi-module identification parameter, determining the execution instruction specifying a group identification parameter based on the multi-module identification parameter, and in response to the execution instruction specifying a target parameter based on the group identification parameter, determining the configuration type of the target parameter, and the configuration type at least includes a string; in response to the configuration type of the target parameter being specified as a string, determining the target parameter specifying a first string and at least one second string in at least two test cases; the string includes the first string and the second string; generating a corresponding target value list based on the first string, and obtaining the target value of the target parameter from the target value list according to the at least one second string, and the obtained target value can identify the data interaction relationship between each test case in each group running on different chips, thereby realizing the joint simulation of the same group of test cases.
[0106] Figure 2 Further, a flowchart of a method for data interaction according to an embodiment of the present disclosure is shown. Based on the embodiment shown in Figure 1 The step 104 is further explained, Figure 2 may include the following steps:
[0107] At step 201, a dictionary corresponding to the first string is constructed.
[0108] The dictionary is a data structure for storing data in the form of key-value pairs, each key corresponds to a unique value, and the corresponding value can be found by the key. In practical applications, when the first string specified by the target parameter is determined, the system will create a dictionary with the first string as the key. For example, if the first string is "gen_md_seed_002", the constructed dictionary will take "gen_md_seed_002" as the key, and the construction method of the dictionary is determined according to the preset development environment.
[0109] Step 202, determining the dictionary value in the dictionary as the target value list; wherein the target value list includes at least one target value.
[0110] After the construction of the dictionary is completed, the system generates a target value list containing at least one target value, and sets the target value list as the dictionary value of the key corresponding to the first string in the dictionary. For example, the dictionary value of the key corresponding to the first string "gen_md_seed_002" is set as a list [001, 002, 003] containing 3 target values, and the list is the target value list. It should be noted that the above examples are only illustrative and do not limit the specific content.
[0111] Step 203, extracting the end number in the at least one second string.
[0112] The end number refers to the number part contained at the end of the second string, which is mainly used to establish the association with the first string. In practical applications, the end number can be extracted by parsing the first string; for example, if the second string is "get_md_seed_005", the end number is "005"; if the second string is "get_md_seed_7", the end number is "7". It should be noted that the above examples are only illustrative and do not limit the specific content.
[0113] Step 204, adding the end number to the end of the first string to obtain a new string.
[0114] After obtaining the end number, the end number is spliced at the end of the first string to form a new string; for example, if the first string is "gen_md_seed" and the extracted end number is "005", the spliced new string is "gen_md_seed_005"; if the first string is "gen_md_seed" and the end number is "7", the new string is "gen_md_seed_7". It should be noted that the above examples are only illustrative and do not limit the specific content.
[0115] Step 205, matching the new string with the dictionary to obtain the target value of the target parameter.
[0116] The new string is matched in the dictionary as a key. If the corresponding key exists, the value at the corresponding position in the dictionary value (target value list) associated with the key is the target value of the target parameter. For example, the new string "gen_md_seed_005" matches the entry with the key "gen_md_seed_005" in the dictionary successfully. The dictionary value corresponding to the key is the target value list [501, 502, 503]. According to actual needs, any value in the list can be selected as the target value, such as selecting the first value 501 as the target value. It should be noted that the above examples are only illustrative and do not limit the specific content.
[0117] Figure 3 Further, a flowchart of a method of data interaction according to an embodiment of the present disclosure is shown. Based on the embodiment shown in the figure, Figure 1 The step 101 is further explained, Figure 3 The method can include the following steps:
[0118] Step 301, based on the multi-module identification parameter, determining whether the execution instruction specifies the grouping identification parameter.
[0119] In the case where the execution instruction contains the multi-module identification parameter, the system will parse the execution instruction and check whether it contains the grouping identification parameter; for example, check whether the grouping identification parameter "--dsflag XX" exists in the execution instruction. If the parsing result contains the grouping identification parameter, it is determined that the execution instruction specifies the grouping identification parameter. If it does not contain the grouping identification parameter, it is determined that it is not specified.
[0120] Step 302, if it is determined that the execution instruction does not specify the grouping identification parameter, outputting error information.
[0121] When it is determined based on the multi-module identification parameter that the execution instruction does not contain the grouping identification parameter, the system will trigger an error reporting mechanism to generate and output corresponding error information. The error information is used to inform the user that the current execution instruction is missing parameters, such as the error information "Error: No grouping identification parameter detected". The specific prompt method of the error information is not limited.
[0122] Step 303, in the case where it is determined that the execution instruction specifies the grouping identification parameter, determining whether the execution instruction specifies the target parameter based on the grouping identification parameter.
[0123] When the grouping identifier parameter exists in the execution instruction, the execution instruction is parsed based on the grouping identifier parameter, and it is determined whether the target parameter is included; for example, in the case where the grouping identifier parameter "--dsflag XX" is identified, it is further checked whether the target parameter "--seed" exists in the execution instruction, and by identifying the configuration information corresponding to the target parameter, it is determined whether the execution instruction specifies the target parameter.
[0124] In the case where it is determined that the execution instruction does not specify the target parameter, a preset default value is determined as the target value in step 304.
[0125] When the grouping identifier parameter has been specified in the execution instruction but it is determined that the target parameter is not included, the system calls a preset default value as the target value; the preset default value includes but is not limited to a fixed numerical value configured at initialization, any numerical value in a list generated by default, and the like, for example, the preset default value is 0, or the preset default value is the numerical value 10 in the list [10, 20, 30]. It should be noted that the above examples are only illustrative and do not limit the specific content.
[0126] The preset default value can be determined according to the interactive requirements of the test case, and the preset default value can ensure that the data interaction between test cases can still be performed according to the preset rules when the target parameter is missing.
[0127] In response to the execution instruction specifying the target parameter, the configuration type of the target parameter is determined in step 305; wherein the configuration type at least includes a string.
[0128] For details of step 305, refer to step 102, which will not be repeated here.
[0129] Figure 4 Further, a flowchart of a method of data interaction according to an embodiment of the present disclosure is shown. Based on the embodiment shown in the figure, in order to determine the target value when the configuration type of the target parameter is an integer type, Figure 1 Figure 4 may include the following steps:
[0130] In response to the configuration type of the target parameter being specified as an integer type in step 401; wherein the configuration type further includes the integer type.
[0131] When the configuration type of the target parameter in the execution instruction is identified as an integer type, the system enters the processing flow corresponding to the integer type; the integer type is that the configuration value of the target parameter is an integer form, for example, the configuration value of the target parameter "--seed" is a numerical value such as "20" and "200" without a decimal part, and the integer type and the string together constitute the configuration type of the target parameter. It should be noted that the above examples are only illustrative and do not limit the specific content.
[0132] Step 402, determine the integer type of the value as the target value.
[0133] After confirming that the configuration type of the target parameter is an integer type, the integer type of the value is determined as the target value of the target parameter; for example, if the value of the target parameter “--seed” is “500”, 500 is determined as the target value; if the configuration value is “1234”, 1234 is determined as the target value. It should be noted that the above examples are only illustrative and the specific content is not limited.
[0134] Figure 5 Further, a flowchart of a data interaction method according to an embodiment of the present disclosure is shown. Based on the embodiment shown in the figure, Figure 1 The embodiment shown in the figure, Figure 5 may include the following steps:
[0135] Step 501, determine whether a test case specifies a preset underlying parameter based on the target value.
[0136] After obtaining the target value, a test case participating in data interaction is parsed, and it is checked whether a test case contains a preset underlying parameter. If the preset underlying parameter is contained, a directory path is created based on a test case, and other test cases in the same group will be stored based on the directory path. If the preset underlying parameter is not contained, error information is output.
[0137] Step 502, in the case where the one test case specifies the preset underlying parameter, integrate the parameter values of the multi-module identification parameter, the grouping identification parameter and the target parameter to obtain a parameter integration value.
[0138] In the case where a test case specifies a preset underlying parameter, the parameter values of the multi-module identification parameter, the parameter values of the grouping identification parameter and the parameter values of the target parameter are integrated by path to obtain a parameter integration value. For example, the multi-module identification parameter is “--ds”, the grouping identification parameter is “--dsflag XX” and the parameter value of the grouping identification parameter is “XX”, the target parameter is “--seed Y” and the parameter value of the target parameter is “Y”, and the integrated parameter integration value “XX_Y” is stored in the integrated arbitrary path such as “ / XX_Y”.
[0139] Step 503, input the parameter integration value into a preset simulation tool to generate an intermediate file based on the parameter integration value.
[0140] The parameter integration value is input into the preset simulation tool to generate an intermediate file, wherein the intermediate file records information such as network protocol numbers and port numbers in the transmission control protocol / internet protocol (TCP / IP).
[0141] Step 504, storing the intermediate files generated by at least one group of test cases to the storage path of the parameter integration value; wherein a group of test cases comprises the at least two test cases.
[0142] The storage path contained in the parameter integration value is the storage path of the intermediate file. The system will store the intermediate files generated by the running of each group of test cases to the path corresponding to each group of test cases.
[0143] For example, in a group of test cases, the intermediate files generated by test case A (containing preset underlying parameters) and test case B are stored in the same directory path generated by test case A. Subsequently, the normality of data interaction can be verified through the network protocol number, port number and other information in the intermediate file. It should be noted that the above examples are only illustrative and do not limit the specific content.
[0144] In some embodiments, as Figure 6 The simulation diagram of the method for data interaction provided by the embodiment of the present disclosure is shown. There are at least one group of test cases (the first group of test cases, …, the Xth group of test cases) for batch submission. In the first group of test cases, there are four test cases (the first test case, the second test case, the third test case, and the fourth test case) for data interaction. One test case (the first test case) specifies preset underlying parameters. After determining that the first test case specifies preset underlying parameters, the intermediate file generated based on the first test case is stored to any storage path of the parameter integration value. The second test case, the third test case, and the fourth test case obtain the content in the any storage path generated by the first test case, thereby realizing the data interaction between the test cases.
[0145] The flowchart of the method for data interaction provided by the embodiment of the present disclosure is shown. The steps S1-S8 include: Figure 7
[0146] S1: determining whether the execution instruction specifies a multi-module identification parameter.
[0147] If the multi-module identification parameter is specified, S2a is executed; if not, S2b is executed.
[0148] S2a: determining whether the execution instruction specifies a grouping identification parameter.
[0149] If the grouping identification parameter is specified, S3a is executed; if not, S3b is executed.
[0150] S2b: executing a conventional single-die simulation process.
[0151] S3a: determining whether the execution instruction specifies a target parameter.
[0152] If the target parameter is specified, S4a is performed; if not, S4b is performed.
[0153] S3b: output error information.
[0154] S4a: determine the configuration type of the target parameter.
[0155] If the configuration type of the target parameter is a string (including a first string and a second string), S5a is performed; if the configuration type of the target parameter is an integer type, S5b is performed.
[0156] S4b: determine a preset default value as the target value.
[0157] S5a: determine whether the target parameter specifies a first string and at least one second string in at least two test cases.
[0158] If it is determined that the target parameter of one of the at least two test cases specifies a first string, S6a is performed; if it is determined that the target parameter of another of the at least two test cases specifies at least one second string, S6b is performed.
[0159] S5b: determine an integer value as the target value.
[0160] S6a: construct a dictionary corresponding to the first string, and determine a dictionary value in the dictionary as the target value list.
[0161] S6b: extract the terminal number in the at least one second string; add the terminal number to the end of the first string to obtain a new string; match the new string with the dictionary to obtain the target value of the target parameter.
[0162] S7: determine whether a preset underlying parameter is specified in a test case.
[0163] If the preset underlying parameter is specified, S8a is performed; if not, S3b is performed.
[0164] S8: determine whether a preset underlying parameter is specified in a test case based on the target value; in the case where a preset underlying parameter is specified in a test case, integrate the multi-module identification parameter, the group identification parameter, and the target parameter to obtain a parameter integration value; input the parameter integration value into a preset simulation tool to generate an intermediate file based on the parameter integration value; store the intermediate files generated by at least one group of test cases to a storage path of the parameter integration value; wherein a group of test cases includes at least two test cases.
[0165] For detailed descriptions of steps S1-S8, refer to the related detailed descriptions of the above embodiments.
[0166] Corresponding to the method of data interaction described above, the application also provides a device for data interaction. Since the device embodiment of the application corresponds to the method embodiment described above, for the details not disclosed in the device embodiment, the method embodiment described above can be referred to, and the application will not be described again.
[0167] Figure 8 A structural schematic diagram of a device for data interaction provided by an embodiment of the present disclosure is shown in FIG. 8, which includes a first judging unit 81, a first determining unit 82, a second determining unit 83, a generating unit 84, and an acquiring unit 85. Figure 8
[0168] The first judging unit 81 is configured to determine, in response to an execution instruction specifying a multi-module identification parameter, a grouping identification parameter specified by the execution instruction, and determine whether the execution instruction specifies a target parameter based on the grouping identification parameter, wherein the multi-module identification parameter is used to specify data interaction between at least two test cases, and the grouping identification parameter is used to group test cases.
[0169] The first determining unit 82 is configured to determine a configuration type of the target parameter in response to the execution instruction specifying the target parameter, wherein the configuration type at least includes a string.
[0170] The second determining unit 83 is configured to determine, in response to the configuration type of the target parameter being specified as the string, the target parameter specifying a first string and at least one second string in the at least two test cases, wherein the string includes the first string and the second string.
[0171] The generating unit 84 is configured to generate a corresponding target value list based on the first string.
[0172] The acquiring unit 85 is configured to acquire a target value of the target parameter from the target value list according to the at least one second string, wherein the target value of the target parameter represents data interaction between the at least two test cases.
[0173] In summary, according to the data interaction device provided by the present disclosure, the device comprises: in response to the execution instruction specifying a multi-module identification parameter, determining the execution instruction specifying a grouping identification parameter based on the multi-module identification parameter, and in response to the execution instruction specifying a target parameter, determining the configuration type of the target parameter based on the grouping identification parameter, the configuration type at least including a string; in response to the configuration type of the target parameter being specified as a string, determining that the target parameter specifies a first string and at least one second string in at least two test cases; the string includes the first string and the second string; generating a corresponding target value list based on the first string, and obtaining the target value of the target parameter from the target value list according to the at least one second string, and the obtained target value can identify the data interaction relationship between each test case in each group running on different chips, thereby realizing joint simulation of the same group of test cases.
[0174] Further, in a possible implementation manner of an embodiment of the present disclosure, as shown in Figure 9 The generating unit 84 comprises:
[0175] The construction module 8401 is configured to construct a dictionary corresponding to the first string.
[0176] The determination module 8402 is configured to determine a dictionary value in the dictionary as the target value list; wherein the target value list comprises at least one target value.
[0177] Further, in a possible implementation manner of an embodiment of the present disclosure, as shown in Figure 9 The obtaining unit 85 comprises:
[0178] The extraction module 8501 is configured to extract an end digit in the at least one second string.
[0179] The addition module 8502 is configured to add the end digit to the end of the first string to obtain a new string.
[0180] The matching module 8503 is configured to match the new string with the dictionary to obtain the target value of the target parameter.
[0181] Further, in a possible implementation manner of an embodiment of the present disclosure, as shown in Figure 9 The first judgment unit 81 comprises:
[0182] The first judgment module 8101 is configured to judge whether the execution instruction specifies the grouping identification parameter based on the multi-module identification parameter.
[0183] The second determining module 8102 is configured to determine, when it is determined that the execution instruction specifies the group identification parameter, whether the execution instruction specifies the target parameter based on the group identification parameter.
[0184] Further, in a possible implementation of the embodiment of the present disclosure, as shown in Figure 9 The apparatus further includes:
[0185] The output unit 86 is configured to output error information if it is determined that the execution instruction does not specify the group identification parameter.
[0186] Further, in a possible implementation of the embodiment of the present disclosure, as shown in Figure 9 The second determining module 8102 is further configured to determine a preset default value as the target value when it is determined that the execution instruction does not specify the target parameter.
[0187] Further, in a possible implementation of the embodiment of the present disclosure, as shown in Figure 9 The apparatus further includes:
[0188] The specifying unit 87 is configured to, in response to the configuration type of the target parameter being specified as an integer type after the second determining unit 83 determines the configuration type of the target parameter in response to the execution instruction specifying the target parameter, specify the integer type as the configuration type of the target parameter.
[0189] The third determining unit 88 is configured to determine a value of the integer type as the target value.
[0190] Further, in a possible implementation of the embodiment of the present disclosure, as shown in Figure 9 The apparatus further includes:
[0191] The second determining unit 89 is configured to, after the obtaining unit obtains the target value of the target parameter from the target value list according to the at least one second string, determine whether a preset underlying parameter is specified by a test case based on the target value.
[0192] The integrating unit 810 is configured to, when the preset underlying parameter is specified by the test case, integrate the multi-module identification parameter, the group identification parameter, and the target parameter to obtain a parameter integration value.
[0193] The input unit 811 is configured to input the parameter integration value to a preset simulation tool to generate an intermediate file based on the parameter integration value.
[0194] The storage unit 812 is configured to store the intermediate files generated by the at least one group of test cases to the storage path of the parameter integration value; wherein one group of test cases comprises the at least two test cases.
[0195] It should be noted that the foregoing description of the method embodiments also applies to the device embodiments of the present disclosure, and the principles are the same, and the device embodiments of the present disclosure are not limited herein.
[0196] According to embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium and a computer program product.
[0197] Figure 10 A schematic block diagram of an example electronic device 900 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present disclosure described and / or claimed in this document.
[0198] As shown in Figure 10 The electronic device 900 includes a computing unit 901 that can perform various appropriate actions and processes in accordance with a computer program stored in a ROM (Read-Only Memory) 902 or a computer program loaded into a RAM (Random Access Memory) 903 from a storage unit 908. Various programs and data required for the operation of the electronic device 900 can also be stored in the RAM 903. The computing unit 1001, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An I / O (Input / Output) interface 905 is also connected to the bus 904.
[0199] A plurality of components in the electronic device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, a speaker, etc.; a storage unit 908, such as a magnetic disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the electronic device 900 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunications networks.
[0200] The computing unit 901 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Unit), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 901 performs various methods and processes described above, such as the method of data interaction. For example, in some embodiments, the method of data interaction can be implemented as a computer software program, which is tangibly embodied in a machine-readable medium, such as the storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded onto the RAM 903 and executed by the computing unit 901, one or more steps of the methods described above can be performed. Alternatively, in other embodiments, the computing unit 901 can be configured to perform the aforementioned method of data interaction by any other appropriate means, such as by means of firmware.
[0201] Various implementations of the systems and techniques described above herein can be realized in digital electronic circuitry, integrated circuitry, a Field Programmable Gate Array (FPGA), an Application-Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a System on Chip (SOC), a Complex Programmable Logic Device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0202] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0203] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable storage medium can include but are not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include one or more lines of electrical conductors, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0204] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer 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 a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0205] The systems and techniques described here can be implemented in a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here, or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a LAN (Local Area Network), a WAN (Wide Area Network), the Internet, and a blockchain network.
[0206] The computer system can include clients and servers. The clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server is one of communication and distribution, with the server receiving requests from the client and transmitting responses via the communication network. The server can 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 large management difficulty and weak business scalability in traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server can also be a server of a distributed system, or a server combined with a blockchain.
[0207] It should be noted that artificial intelligence is a discipline that studies enabling computers to simulate some thinking processes and intelligent behaviors of people (such as learning, reasoning, thinking, planning, etc.), both hardware and software technologies. Artificial intelligence hardware technology generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing, etc.; artificial intelligence software technology mainly includes computer vision technology, speech recognition technology, natural language processing technology, and machine learning / deep learning, big data processing technology, knowledge graph technology, etc. several major directions.
[0208] It should be understood that the various forms of flow shown above can be used to reorder, add or delete steps. For example, each step described in the present disclosure can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, which is not limited herein.
[0209] The above detailed description does not limit the scope of the disclosure. Various modifications, combinations, sub-combinations and alternatives can be made to the detailed description. Any modification, equivalent replacement and improvement etc. made within the spirit and principle of the disclosure shall be included in the scope of the disclosure.
Claims
1. A method of data interaction, characterized by, The method comprises: in response to the execution instruction specifying a multi-module identification parameter, determining, based on the multi-module identification parameter, that the execution instruction specifies a grouping identification parameter, and determining, based on the grouping identification parameter, whether the execution instruction specifies a target parameter; wherein the multi-module identification parameter is used to specify data interaction between at least two test cases, and the grouping identification parameter is used to group test cases; in response to the execution instruction specifying the target parameter, determining a configuration type of the target parameter; wherein the configuration type at least comprises a string; in response to the configuration type of the target parameter being specified as the string, determining, in the at least two test cases, that the target parameter specifies a first string and at least one second string; wherein the string comprises the first string and the second string; generating a corresponding target value list based on the first string, and obtaining a target value of the target parameter from the target value list according to the at least one second string; wherein the target value of the target parameter represents data interaction between the at least two test cases.
2. The method of claim 1, wherein, The method further comprises: constructing a dictionary corresponding to the first string; determining a dictionary value in the dictionary as the target value list; wherein the target value list comprises at least one target value.
3. The method of claim 2, wherein, The method further comprises: extracting an end digit in the at least one second string; adding the end digit to the end of the first string to obtain a new string; matching the new string with the dictionary to obtain the target value of the target parameter.
4. The method of claim 1, wherein, The method further comprises: determining, based on the multi-module identification parameter, whether the execution instruction specifies the grouping identification parameter; in a case where it is determined that the execution instruction specifies the grouping identification parameter, determining, based on the grouping identification parameter, whether the execution instruction specifies the target parameter.
5. The method of claim 4, wherein, The method further comprises: if it is determined that the execution instruction does not specify the grouping identification parameter, outputting an error information.
6. The method of claim 4, wherein, The method further comprises: in a case where it is determined that the execution instruction does not specify the target parameter, determining a preset default value as the target value.
7. The method of claim 1, wherein, The method further comprises: in response to the configuration type of the target parameter being specified as an integer type; wherein the configuration type further comprises the integer type; determining a numerical value of the integer type as the target value.
8. The method of claim 1, wherein, The method further comprises: based on the target value, determining whether a preset underlying parameter is specified in a test case; In a case where the one test case specifies the preset underlying parameter, parameter values of the multi-module identification parameter, the group identification parameter and the target parameter are integrated to obtain a parameter integrated value; The parameter integrated value is input into a preset simulation tool to generate an intermediate file based on the parameter integrated value; The intermediate files generated by at least one group of test cases are stored in a storage path of the parameter integrated value; one group of test cases includes the at least two test cases.
9. An apparatus for data interaction, characterized by The apparatus comprises: A first determining unit configured to, in response to an execution instruction specifying a multi-module identification parameter, determine, based on the multi-module identification parameter, that the execution instruction specifies a group identification parameter, and determine, based on the group identification parameter, whether the execution instruction specifies a target parameter; wherein the multi-module identification parameter is used to specify data interaction between at least two test cases, and the group identification parameter is used to group test cases; A first determining unit configured to, in response to the execution instruction specifying the target parameter, determine a configuration type of the target parameter; wherein the configuration type at least includes a string; A second determining unit configured to, in response to the configuration type of the target parameter being specified as the string, determine, in the at least two test cases, that the target parameter specifies a first string and at least one second string; wherein the string includes the first string and the second string; A generating unit configured to generate a corresponding target value list based on the first string; An obtaining unit configured to obtain a target value of the target parameter from the target value list according to the at least one second string; wherein the target value of the target parameter represents data interaction between the at least two test cases.
10. An electronic device, comprising: Comprise: At least one processor; And The memory is in communication connection with the at least one processor; wherein The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method in any one of claims 1-8.
Citation Information
Patent Citations
Test method and device, electronic equipment and storage medium
CN116680136A
Method and device for associating configuration file for test case
CN117075891A