An analysis method, device, chip, electronic equipment, medium and program product

By dividing and unifying the parsing methods for data types in integrated circuit design, the bottleneck problem in functional verification is solved, achieving efficient and accurate parsing and storage, and improving the efficiency and accuracy of chip verification.

CN123050293APending Publication Date: 2026-11-06BEIJING X RING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611281781.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-21
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

As the scale of integrated circuit design increases and the complexity of functions rises, functional verification in chip design has become a key bottleneck restricting the successful one-time tape-out of chips. The quality of functional coverage resolution directly affects the efficiency and accuracy of verification.

Method used

A parsing method is provided that divides the target text into multiple target groups by reading preset symbols at preset positions in the target text, and unifies the data types of multiple target groups into preset types to achieve a precise parsing process, including identifying nested symbols and preset symbols, removing nested symbols, and converting number bases.

Benefits of technology

It achieves an efficient and accurate parsing process, facilitates the storage and processing of parsing results, and improves the efficiency and accuracy of functional verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123050293A_ABST
    Figure CN123050293A_ABST
Patent Text Reader

Abstract

This disclosure relates to a parsing method, apparatus, chip, electronic device, medium, and program product. The parsing method includes: reading target text to be parsed; responding to a preset symbol at a preset position in the target text, dividing the target text into multiple target groups based on the preset symbol; unifying the data types of the multiple target groups to a preset type, and obtaining the parsing result. This disclosure divides the read target text to be parsed into multiple target groups based on preset symbols at preset positions, achieving a precise parsing process. By unifying the data types of the multiple target groups to a preset type, it facilitates the storage of parsing results and achieves efficient parsing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of integrated circuit chip verification technology, and in particular to a method, apparatus, chip, electronic device, medium, and program product for analysis. Background Technology

[0002] As the scale of integrated circuit design continues to expand and the complexity of its functions continues to increase, functional verification in chip design has become a key bottleneck restricting the successful one-time tape-out of chips.

[0003] Functional coverage, as a core quantitative indicator for measuring the completeness of verification, directly determines the efficiency and accuracy of verification based on the quality of its code parsing. Summary of the Invention

[0004] To overcome the problems existing in related technologies, this disclosure provides a parsing method, apparatus, chip, electronic device, medium, and program product.

[0005] According to a first aspect of the present disclosure, a parsing method is provided, the method comprising: Read the target text of the content to be parsed; In response to reading a preset symbol at a preset position in the target text, the target text is divided into multiple target groups based on the preset symbol; The data types of multiple target groups are unified into a preset type to obtain the parsing result.

[0006] In this embodiment, the target text to be parsed is divided into multiple target groups based on preset symbols at preset positions, achieving a precise parsing process. The data types of the multiple target groups are unified to a preset type to obtain the parsing results. This unified data type facilitates the storage of the parsing results, achieving efficient parsing.

[0007] In some embodiments of this disclosure, the step of dividing the target text into multiple target groups based on the preset symbol at a preset position in the target text in response to reading the preset symbol includes: Read the characters in the target text, the characters in the target text include nested symbols and the preset symbols, wherein the nested symbols appear in pairs and there is no less than one pair of nested symbols, and each pair of nested symbols is used to identify the boundary of the data information in the target group; When the preset symbol is read outside the nested symbol, the preset symbol is used as the preset symbol at the preset position; The target text is divided into multiple target groups by using the positions of the preset symbols at all the preset positions read as the dividing positions.

[0008] In this embodiment, the preset symbol read outside the nested symbol is determined as the preset symbol at the preset position, which can accurately divide the target group in the target text and achieve a highly efficient and accurate parsing effect.

[0009] In some embodiments of this disclosure, the step of dividing the target text into multiple target groups based on the preset symbol in response to reading a preset symbol at a preset position in the target text further includes: In response to the reading of the preset symbol within the nested symbol, the reading of the target text continues.

[0010] In this embodiment, when it is determined that the preset symbol is located within a nested symbol, the target group in the target text is not divided, which can ensure the effectiveness of the target group division in the target text.

[0011] In some embodiments of this disclosure, unifying the data types of multiple target groups to a preset type to obtain parsing results includes: Analyze multiple target groups to obtain data information within the target groups; The data types of the data information in the target group are unified to a preset type to obtain the parsing result.

[0012] In this embodiment, by parsing multiple target groups, the data information in the target groups can be obtained, and the data types of these data information can be unified, which can facilitate the storage of the parsing results and the subsequent reading and processing of the parsing results.

[0013] In some embodiments of this disclosure, parsing multiple target groups to obtain data information within the target groups includes: In response to the inclusion of prefix information in multiple target groups, the prefix information and original data information in multiple target groups are extracted according to a preset expression, wherein the original data information is the data in the target group after the prefix information has been removed; In response to the absence of prefix information in multiple target groups, the target groups being the original data information.

[0014] In this embodiment, when the target group's format includes prefix information, the prefix information and original data information from multiple target groups are extracted using a preset expression, effectively obtaining the original data information for further parsing. When the target group's format does not include prefix information, the target group itself is the original data information, allowing for direct parsing of the target group and improving parsing efficiency.

[0015] In some embodiments of this disclosure, the step of parsing multiple target groups to obtain data information in the target groups further includes: In response to the fact that the original data information includes nested symbols, the nested symbols in the original data information are removed to obtain the data information in the target group; Since the original data information does not include nested symbols, the original data information is used as the data information in the target group.

[0016] In this embodiment, when the original data information includes nested symbols, the nested symbols are removed by parsing the original data information to obtain the data information in the target group for further parsing. When the original data information does not contain nested symbols, the original data information is the data information in the target group, and the original data information can be directly parsed, thus improving parsing efficiency.

[0017] In some embodiments of this disclosure, unifying the data type of the data information in the target group to a preset type and obtaining the parsing result includes: In response to the fact that the data information in the target group is in decimal, the decimal data information is stored in the preset type; In response to the fact that the data information in the target group is in hexadecimal, the hexadecimal data information is converted to decimal and stored as the preset type; The preset type of data information and the prefix information are used as the parsing result.

[0018] In this embodiment, by converting hexadecimal data information in different representations into decimal data information and storing the decimal data information as a preset type, a unified data type storage can be achieved, which facilitates subsequent reading and processing of the parsing result.

[0019] According to a second aspect of the present disclosure, a parsing apparatus is provided, the apparatus comprising: A reading module, configured to read the target text of the content to be parsed; A segmentation module is configured to, in response to reading a preset symbol at a preset position in the target text, divide the target text into multiple target groups based on the preset symbol. The setting module is configured to unify the data types of multiple target groups into a preset type to obtain the parsing result.

[0020] In some embodiments of this disclosure, the partitioning module is further configured as follows: Read the characters in the target text, the characters in the target text include nested symbols and the preset symbols, wherein the nested symbols appear in pairs and there is no less than one pair of nested symbols, and each pair of nested symbols is used to identify the boundary of the data information in the target group; When the preset symbol is read outside the nested symbol, the preset symbol is used as the preset symbol at the preset position; The target text is divided into multiple target groups by using the positions of the preset symbols at all the preset positions read as the dividing positions.

[0021] In some embodiments of this disclosure, the segmentation module is further configured to: continue reading the target text in response to reading the preset symbol within the nested symbol.

[0022] In some embodiments of this disclosure, the setting module is further configured to: Analyze multiple target groups to obtain data information within the target groups; The data types of the data information in the target group are unified to a preset type to obtain the parsing result.

[0023] In some embodiments of this disclosure, the setting module is further configured to: In response to the inclusion of prefix information in multiple target groups, the prefix information and original data information in multiple target groups are extracted according to a preset expression, wherein the original data information is the data in the target group after the prefix information has been removed; In response to the absence of prefix information in multiple target groups, the target groups being the original data information.

[0024] In some embodiments of this disclosure, the setting module is further configured to: In response to the fact that the original data information includes nested symbols, the nested symbols in the original data information are removed to obtain the data information in the target group; Since the original data information does not include nested symbols, the original data information is used as the data information in the target group.

[0025] In some embodiments of this disclosure, the setting module is further configured to: In response to the fact that the data information in the target group is in decimal, the decimal data information is stored in the preset type; In response to the fact that the data information in the target group is in hexadecimal, the hexadecimal data information is converted to decimal and stored as the preset type; The preset type of data information and the prefix information are used as the parsing result.

[0026] According to a third aspect of the present disclosure, a chip is provided, the chip comprising: One or more interface circuits; and One or more processor circuits are configured to execute a computer program stored in memory, which, when executed by the processor circuits, causes the chip to perform the parsing method as described above.

[0027] According to a fourth aspect of the present disclosure, an electronic device is provided, the electronic device comprising: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the parsing method described above.

[0028] According to a fifth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of a terminal, the terminal is enabled to perform the parsing method as described above.

[0029] According to a sixth aspect of the present disclosure, a computer program product is provided, including a computer program or instructions, which, when executed by a processor, implement the parsing method described above.

[0030] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0031] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0032] Figure 1 This is a flowchart illustrating a parsing method according to an exemplary embodiment; Figure 2 This is a flowchart illustrating a parsing method according to an exemplary embodiment; Figure 3 This is a flowchart illustrating a parsing method according to an exemplary embodiment; Figure 4 This is a flowchart illustrating a parsing method according to an exemplary embodiment; Figure 5 This is a flowchart illustrating a parsing method according to an exemplary embodiment; Figure 6 This is a flowchart illustrating a parsing method according to an exemplary embodiment; Figure 7This is a flowchart illustrating a parsing method according to an exemplary embodiment; Figure 8 This is a flowchart illustrating a parsing method according to an exemplary embodiment; Figure 9 This is a block diagram illustrating a parsing apparatus according to an exemplary embodiment; Figure 10 This is a block diagram of an electronic device according to an exemplary embodiment. Detailed Implementation

[0033] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims. It should also be understood that the term “and / or” as used in this disclosure refers to any or all possible combinations including one or more of the associated listed items.

[0034] As the scale and complexity of integrated circuit design continue to expand, functional verification in chip design has become a key bottleneck restricting the successful first-time tape-out of chips. Functional coverage, as a core quantitative indicator for measuring the completeness of verification, directly determines the efficiency and accuracy of verification through the quality of its code parsing.

[0035] Based on this, this disclosure provides a parsing method, including: reading the target text of the content to be parsed; responding to a preset symbol at a preset position in the target text; dividing the target text into multiple target groups based on the preset symbol; unifying the data types of the multiple target groups to a preset type; and obtaining the parsing result. The parsing method provided by this disclosure can divide the read target text of the content to be parsed into multiple target groups based on a preset symbol at a preset position, thereby achieving a precise parsing process. By setting the data types of the multiple target groups to a unified preset type to obtain the parsing result, the storage of the parsing result can be facilitated, achieving efficient parsing.

[0036] First, let me explain the relevant terms and their definitions used in this disclosure: Functional Coverage: Functional coverage is used to characterize the verification coverage of all functional points in a design, reflecting the completeness of the verification of the design functions.

[0037] Cover group: A cover group is a model used to calculate functional coverage. It includes coverage points that represent different design functions. The overall coverage of a cover group is reflected by the coverage of all the coverage points it contains.

[0038] Coverpoint: A coverpoint exists within a coverage group and corresponds to a specific functional point in the design that needs to be verified. After functional coverage sampling, the coverpoint will check whether all its subgroups have been covered.

[0039] Bins: Bins are defined within coverage points and are the basic unit for measuring functional coverage. For a given design function, different coverage points may exhibit different functionalities, and these different functionalities are mapped one-to-one with different bins defined within the coverage points.

[0040] To facilitate understanding, the content to be parsed in this disclosure is first described. This content is based on coverage-driven verification technology. Typically, during chip verification, the completeness of verification is measured by the coverage of the chip design functional verification; achieving 100% coverage indicates complete verification. The parsing method provided in this disclosure is used to parse the syntax within bins of coverage rules written by hardware verification engineers. Specifically, the target text of the content to be parsed in this disclosure is the specific content text within bins included in the coverpoints of a covergroup. For example, if bins={sr-{[0:191]}, vcc-{246}, vr-{[1:253]}, x-{5,10, 15}}, then the target text of the content to be parsed in this disclosure is: "sr-{[0:191]}, vcc-{246}, vr-{[1:253]}, x-{5, 10, 15}".

[0041] Exemplary embodiments of this disclosure provide a parsing method, such as Figure 1 As shown, the method includes: S110, Read the target text of the content to be parsed.

[0042] In this step, the target text to be parsed is read, including reading each character in the target text sequentially. The target text consists of one target group, or multiple target groups, separated by delimiters. The format of the target group includes "prefix information", "-" and "raw data information", or the target group may only include "raw data information".

[0043] Specifically, the coverage rule format described above is, for example, bins={sr-{[0:191]}, vcc-{246}, vr-{[1:253]}, x-{5, 10, 15}}. In the parsing method defined in this disclosure, the target text of the content to be parsed is “sr-{[0:191]}, vcc-{246}, vr-{[1:253]}, x-{5, 10, 15}”. In the example above, the target text consists of four target groups “sr-{[0:191]}”, “vcc-{246}”, “vr-{[1:253]}”, and “x-{5, 10, 15}”, separated by commas. “sr”, “vcc”, “vr” and “x” are the prefix information for each target group, and “{[0:191]}”, “{246}”, “{[1:253]}” and “{5, 10, 15}” are the original data information for each target group.

[0044] S120, In response to reading a preset symbol at a preset position in the target text, divide the target text into multiple target groups based on the preset symbol at the preset position.

[0045] In this step, the target text includes preset symbols, which may include delimiters. Preset symbols at preset positions in the target text represent delimiters used to separate each target group. Understandably, delimiters within parentheses in a target group are not considered preset symbols at preset positions in the target text. For example, the delimiter "," between target groups "vr-{[1:253]}" and "x-{5, 10, 15}" is a preset symbol at a preset position in the target text, while the delimiter "," in target group "x-{5, 10, 15}" is not. By using preset symbols at preset positions in the target text, the target text can be divided into multiple target groups.

[0046] When the target text consists of a single target group, the target group within the target text does not need to be divided, and the parsing method in this step cannot read the preset symbol at the preset position in the target text. When the target text consists of multiple target groups, the parsing method in this step, upon reading the preset symbol at the preset position in the target text, can divide the target text into multiple target groups based on the preset symbol at the preset position.

[0047] S130. Unify the data types of multiple target groups to the preset type to obtain the parsing results.

[0048] In this step, the data in the original data information from multiple target groups is uniformly converted into a preset type to obtain the parsing result. The preset type may include, for example, the BigInteger type. Using the BigInteger type to store data ensures no loss of precision, prevents numerical overflow, and guarantees data accuracy. The preset type may also include other data types; this embodiment does not specifically limit this.

[0049] In this embodiment, the target text to be parsed is divided into multiple target groups based on preset symbols at preset positions, achieving a precise parsing process. The data types of the multiple target groups are unified to a preset type to obtain the parsing results. This unified data type facilitates the storage of the parsing results, achieving efficient parsing.

[0050] In some embodiments, such as Figure 2 As shown, in step S120, in response to reading a preset symbol at a preset position in the target text, the target text is divided into multiple target groups based on the preset symbol, including: S210. Read the characters in the target text. The characters in the target text include nested symbols and preset symbols. Nested symbols appear in pairs, and there is no less than one pair of nested symbols. Each pair of nested symbols is used to identify the boundary of the data information in the target group.

[0051] In this step, the target text includes not only preset symbols but also nested symbols. Each pair of nested symbols is used to identify the boundaries of data information within the target group. For example, nested symbols may include curly braces “{}”, square brackets “[]”, and / or parentheses “()”. Nested symbols may also include other paired symbols, which are not specifically limited in this embodiment. Nested symbols are used to identify the boundaries of data information within the target group. For example, in the four target groups “sr-{[0:191]}”, “vcc-{246}”, “vr-{[1:253]}”, and “x-{5, 10, 15}” in the example above, curly braces “{}” and / or square brackets “[]” are used to identify the boundaries of the data information within them.

[0052] S220. In response to reading a preset symbol outside of a nested symbol, the preset symbol is used as the preset symbol at the preset position.

[0053] In this step, when the character being read is identified as a preset symbol during the reading of the target text, it is necessary to determine whether the preset symbol is located outside of nested symbols. If the preset symbol is located outside of nested symbols, then the preset symbol is used as the preset symbol at the preset position.

[0054] In some embodiments, such as Figure 3As shown, in step S220, in response to reading a preset symbol outside the nested symbols, the preset symbol is used as the preset symbol at a preset position, including: S310, Set up counters for recording each type of nested symbol.

[0055] In this step, the number of counters can be set according to the types of nested symbols, with a one-to-one correspondence between the types of nested symbols and the number of counters. Different counters are used to record the number of corresponding nested symbols. For example, in practical applications, three counters can be set: depthBrace ({} depth), depthBracket ([] depth), and depthParen (() depth) to record the number of curly braces "{" and "}", square brackets "[" and "]", and parentheses "(" and ")", respectively.

[0056] S320. When the value of the counter is a preset value, the preset symbol read is used as the preset symbol at the preset position.

[0057] In one embodiment, when “{”, “[”, or “(”) are read in the target text, the corresponding counter is incremented by 1, and when “}”, “]”, or “)” are read, the corresponding counter is decremented by 1. A preset value of 0 can then be set. That is, when the counter value is 0, the read preset symbol can be determined to be outside of nested symbols, and therefore can be used as the preset symbol at the preset position.

[0058] In another embodiment, when “{”, “[”, or “(”) are read in the target text, the corresponding counter is incremented by 1, and when “}”, “]”, or “)” are read, the corresponding counter is also incremented by 1. Therefore, the preset value can be set to an even number. That is, when the counter value is even, the preset symbol read can be determined to be outside of nested symbols, and thus can be used as the preset symbol at the preset position.

[0059] It is understandable that, in addition to using the above-mentioned counter to determine whether the preset symbol is outside the nested symbol, other methods can also be used, and this embodiment does not limit them.

[0060] S230. Using the positions of the preset symbols at all the preset positions read as the dividing positions, divide the target text into multiple target groups.

[0061] In this step, continuing with the example above, the target text is "sr-{[0:191]}, vcc-{246}, vr-{[1:253]}, x-{5, 10, 15}". After reading the preset symbols at all preset positions, i.e., the comma between each target group in the example, the preset symbols at each preset position can be used as the dividing points to divide the target text into four target groups: "sr-{[0:191]}", "vcc-{246}", "vr-{[1:253]}", and "x-{5, 10, 15}". For example, in practical applications, the splitTopLevel(input) method can be used to perform the division of multiple target groups.

[0062] In this embodiment, the preset symbol read outside the nested symbol is determined as the preset symbol at the preset position, which can accurately divide the target group in the target text and achieve a highly efficient and accurate parsing effect.

[0063] In some embodiments, in step S120, in response to reading a preset symbol at a preset position in the target text, the target text is divided into multiple target groups based on the preset symbol, and the method further includes: in response to reading a preset symbol within a nested symbol, continuing to read the target text.

[0064] In this step, when a character is identified as a preset symbol during the reading of the target text, it is necessary to determine whether the preset symbol is located within or outside nested symbols. If the preset symbol is located within one or more pairs of nested symbols, no processing of the target text is required, and reading of the target text can continue. This avoids the problem of separators within nested symbols being mistakenly identified as preset symbols at preset positions.

[0065] In this embodiment, when it is determined that the preset symbol is located within a nested symbol, the target group in the target text is not divided, which can ensure the effectiveness of the target group division in the target text.

[0066] In some embodiments, such as Figure 4 As shown, in step S130, the data types of multiple target groups are unified to a preset type to obtain the parsing results, including: S410. Analyze multiple target groups to obtain data information from the target groups.

[0067] In this step, by parsing each target group, we can obtain the data information within the target group. For example, in the four target groups “sr-{[0:191]}”, “vcc-{246}”, “vr-{[1:253]}”, and “x-{5, 10, 15}”, the range is 0-191, the single value is 246, the range is 1-253, and the set is 5, 10, and 15. These data are all data information within the target group.

[0068] S420. Unify the data type of the data information in the target group to the preset type and obtain the parsing result.

[0069] In this step, the parsing results are obtained by unifying the data information in each target group to a preset data type. For example, the data information in each target group can be unified to the BigInteger type. Using the BigInteger type to store data ensures no loss of precision, prevents numerical overflow, and guarantees data accuracy. The preset type can also include other data types, which are not specifically limited in this embodiment.

[0070] In this embodiment, by parsing multiple target groups, the data information in the target groups can be obtained, and the data types of these data information can be unified, which can facilitate the storage of the parsing results and the subsequent reading and processing of the parsing results.

[0071] In some embodiments, such as Figure 5 As shown, in step S410, multiple target groups are parsed to obtain data information within the target groups, including: S510. In response to the presence of prefix information in multiple target groups, extract the prefix information and original data information from the multiple target groups according to a preset expression, wherein the original data information is the data in the target group after removing the prefix information.

[0072] In this step, if the target group's format includes "prefix information," "-," and "raw data information," then the "prefix information" and "raw data information" can be extracted according to a preset expression. The preset expression can be a regular expression, for example. For instance, in the four target groups "sr-{[0:191]}", "vcc-{246}", "vr-{[1:253]}", and "x-{5, 10, 15}", the regular expression "^([a-zA-Z0-9_]+-)(" can be used. )" or "^([a-zA-Z0-9_]+)- (. The prefix information “sr”, “vcc”, “vr”, and “x”, as well as the original data information “{[0:191]}”, “{246}”, “{[1:253]}”, and “x-{5, 10, 15}” from these four target groups are extracted. The extracted prefix information can be stored in a preset object.

[0073] S520, The response does not include prefix information in multiple target groups, and the target group is the raw data information.

[0074] In this step, if the target group only includes "raw data information", then there is no need to extract the target group; the target group can be directly used as the raw data information.

[0075] In this embodiment, when the target group's format includes prefix information, the prefix information and original data information from multiple target groups are extracted using a preset expression, effectively obtaining the original data information for further parsing. When the target group's format does not include prefix information, the target group itself is the original data information, allowing for direct parsing of the target group and improving parsing efficiency.

[0076] In some embodiments, such as Figure 6 As shown, step S410, parsing multiple target groups to obtain data information within the target groups, also includes: S610. In response to the original data information including nested symbols, remove the nested symbols from the original data information to obtain the data information in the target group.

[0077] In this step, when reading the original data, if it is determined that the original data contains nested symbols, these nested symbols need to be removed to obtain the data information in the target group. For example, the original data "{[0:191]}", "{246}", "{[1:253]}", and "{5, 10, 15}" all contain one or two pairs of nested symbols. In practical applications, the `safelyUnwrapBrackets()` method can be used to remove nested symbols from the original data. When the original data contains only one pair of nested symbols, the `safelyUnwrapBrackets()` method is applied only once. When the original data contains two pairs of nested symbols, the `safelyUnwrapBrackets()` method can be applied twice, removing only the outermost nested symbol each time. After removing nested symbols from the four original data information “{[0:191]}”, “{246}”, “{[1:253]}” and “{5, 10, 15}”, the data information in the target group can be obtained as follows: range: 0-191, single value: 246, range: 1-253, and set: 5, 10, and 15.

[0078] S620, In response to the fact that the original data information does not include nested symbols, the original data information is the data information in the target group.

[0079] In this step, if the original data information does not contain nested symbols, there is no need to remove the nested symbols in the target group; the original data information is the same as the data information in the target group.

[0080] In this embodiment, when the original data information includes nested symbols, the nested symbols are removed by parsing the original data information to obtain the data information in the target group for further parsing. When the original data information does not contain nested symbols, the original data information is the data information in the target group, and the original data information can be directly parsed, thus improving parsing efficiency.

[0081] In some embodiments, such as Figure 7 As shown, in step S420, the data type of the data information in the target group is unified to a preset type to obtain the parsing result, including: S710. In response to the fact that the data information in the target group is in decimal, the decimal data information is stored in a preset type.

[0082] In this step, when the data information in the target group is in decimal, the decimal data information can be directly stored as a preset data type, for example, the decimal data information can be stored as a BigInteger type.

[0083] S720: In response to the fact that the data information in the target group is in hexadecimal, the hexadecimal data information is converted to decimal and stored as a preset type.

[0084] In this step, hexadecimal data information includes different representations. For example, data information containing "'h" represents hexadecimal data information with a specified bit width, such as 64'h3fffffff, which is hexadecimal data 3fffffff with a specified 64-bit width. Data information starting with "0x" and "x" represents hexadecimal data information with no specified bit width. When the data information in the target group is hexadecimal with a specified bit width, or when the data information in the target group is hexadecimal with no specified bit width, the hexadecimal data information with a specified bit width (the hexadecimal data after "'h") or the hexadecimal data information with no specified bit width (the hexadecimal data after "0x" or "x") can be first converted to decimal data information, and then the converted decimal data information can be stored as data of a preset type. For example, in practical applications, the `parseNumericValue(valueStr)` method can be used to convert data from other number systems to decimal data, and then the converted decimal data can be stored as a BigInteger type. Alternatively, the `parseNumericValue(valueStr)` method can be used to directly store decimal data as a BigInteger type. The BigInteger data type supports data of arbitrary precision. Other data types may also be included as preset types; this embodiment does not impose specific limitations.

[0085] In other embodiments, the data information may also include binary and octal data. In this case, the binary and octal data can also be converted into decimal data and stored as a preset type.

[0086] S730, preset type data information and prefix information are used as the parsing result.

[0087] In this step, when the target group's format includes "prefix information," "-," and "raw data information," the parsed data information and prefix information of the preset type are used as the parsing result. When the target group's format only includes "raw data information," the parsed data information of the preset type is used as the parsing result. The parsing result can be stored in a preset object for convenient storage and subsequent reading or processing of the parsing result.

[0088] In this embodiment, by converting hexadecimal data information in different representations into decimal data information and storing the decimal data information as a preset type, a unified data type storage can be achieved, which facilitates subsequent reading and processing of the parsing result.

[0089] In some embodiments, before unifying the data type of the data information in the target group to a preset type, the method further includes: determining the type of the data information in the target group. The types of data information in the target group include: interval type, set type, and single numeric type, etc.

[0090] For example, in practical applications, the `instanceof` method can be used to check the data type in the target group. If the data includes a colon (:), the data type is a range type; if it includes a comma (,), the data type is a set type; otherwise, it is a single numeric type. Based on the data type of the target group determined in this step, the parsing results can be stored in a preset object according to the corresponding type.

[0091] In some embodiments, during subsequent processing of the parsing results, the parsing results can be stored in a preset object, which also includes preset flags. The preset flags are used to characterize data information of a preset type in the preset object as an overall coverage point, or each value in the data information of the preset type as an independent coverage point.

[0092] In practical applications, the preset object can be, for example, a BinCondition object, and the preset flag can be, for example, the allHit flag. For instance, in the preset type data information parsed in the example above: "range: 0-191, single value: 246, range: 1-253, and sets: 5, 10, and 15", when the allHit flag is true, it means that each value in the preset type data information is treated as an independent coverage point. That is, when calculating coverage, every value in the range 0-191, every value in the single value 246, every value in the range 1-253, and every value in the sets 5, 10, and 15 needs to be covered for the coverage rate to reach 100%. When the allHit flag is false, it means that the preset type data information in the preset object is treated as a whole coverage point. That is, any value in the range 0-191, any value in the single value 246, any value in the range 1-253, and any value in the sets 5, 10, and 15 are all covered, thus achieving 100% coverage.

[0093] For ease of understanding, the parsing method provided in this disclosure is described below through a specific embodiment, such as... Figure 8 As shown.

[0094] S801. Read the characters in the target text of the content to be parsed. The characters in the target text include nested symbols and preset symbols.

[0095] Nested symbols appear in pairs, and there is no less than one pair of nested symbols. Each pair of nested symbols is used to identify the boundaries of data information in the target group.

[0096] S802, Set up counters to record each type of nested symbol.

[0097] S803. When the counter value is a preset value, the read preset symbol is used as the preset symbol at the preset position; when the counter value is not a preset value, the target text continues to be read.

[0098] S804. Using the positions of the preset symbols at all the preset positions read as the dividing positions, divide the target text into multiple target groups.

[0099] S805: In response to multiple target groups including prefix information, extract the prefix information and original data information from the multiple target groups according to a preset expression; in response to multiple target groups not including prefix information, the target group is the original data information.

[0100] The original data information is the data in the target group after removing the prefix information.

[0101] S806. In response to the original data information including nested symbols, the nested symbols in the original data information are removed to obtain the data information in the target group; in response to the original data information not including nested symbols, the original data information is used as the data information in the target group.

[0102] S807. In response to the data information in the target group being in decimal, the decimal data information is stored as a preset type; in response to the data information in the target group being in hexadecimal, the hexadecimal data information is converted to decimal and stored as a preset type.

[0103] S808, preset type data information and prefix information are used as the parsing result.

[0104] In one exemplary embodiment, a parsing apparatus is provided for implementing the parsing method described above. (Reference) Figure 9 As shown, the parsing device may include a reading module 901, a dividing module 902, and a setting module 903.

[0105] The reading module is configured to read the target text to be parsed. The segmentation module is configured to segment the target text into multiple target groups based on preset symbols at preset positions read from the target text. The setting module is configured to unify the data types of the multiple target groups to a preset type to obtain the parsing result.

[0106] In one exemplary embodiment, the partitioning module 902 is further configured to: Read characters from the target text. The characters in the target text include nested symbols and preset symbols. Nested symbols appear in pairs, and there is no less than one pair of nested symbols. Each pair of nested symbols is used to identify the boundaries of data information in the target group. When a preset symbol is read outside of nested symbols, the preset symbol is used as the preset symbol at the preset position; The target text is divided into multiple target groups based on the positions of the preset symbols at all the preset positions read.

[0107] In one exemplary embodiment, the partitioning module 902 is further configured to: When a preset symbol is read within a nested symbol, continue reading the target text.

[0108] In one exemplary embodiment, the setting module 903 is further configured to: Analyze multiple target groups to obtain the data information within each target group; Unify the data type of the data information in the target group to the preset type to obtain the parsing results.

[0109] In one exemplary embodiment, the setting module 903 is further configured to: In response to the presence of prefix information in multiple target groups, the prefix information and original data information in the multiple target groups are extracted according to a preset expression, wherein the original data information is the data in the target group after removing the prefix information; The response does not include prefix information in multiple target groups; the target groups are the raw data information.

[0110] In one exemplary embodiment, the setting module 903 is further configured to: In response to the fact that the original data information includes nested symbols, the nested symbols in the original data information are removed to obtain the data information in the target group; The response is that the original data information does not include nested symbols, and the original data information is the data information in the target group.

[0111] In one exemplary embodiment, the setting module 903 is further configured to: In response to the fact that the data information in the target group is in decimal, the decimal data information is stored in the preset type; In response to the fact that the data information in the target group is in hexadecimal, the hexadecimal data information is converted to decimal and stored as a preset type; The data information and prefix information of the preset type are used as the parsing result.

[0112] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0113] This disclosure also provides a chip, including: one or more interface circuits; and one or more processor circuits configured to execute a computer program stored in a memory, wherein when executed by the processor circuits, the computer program causes the chip to perform the parsing method described in the above embodiments.

[0114] This disclosure also provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the parsing method described in the above embodiments.

[0115] Electronic devices include mobile phones, laptops, tablets, and wearable devices.

[0116] refer to Figure 10 As shown, the electronic device 1000 may include one or more of the following components: a processing component 1002, a memory 1004, a power supply component 1006, a multimedia component 1008, an audio component 1010, an input / output (I / O) interface 1012, a sensor component 1014, and a communication component 1016.

[0117] Processing component 1002 typically controls the overall operation of electronic device 1000, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 1002 may include one or more processors 1020 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 1002 may include one or more modules to facilitate interaction between processing component 1002 and other components. For example, processing component 1002 may include a multimedia module to facilitate interaction between multimedia component 1008 and processing component 1002.

[0118] Memory 1004 is configured to store various types of data to support the operation of electronic device 1000. Examples of such data include instructions for any application or method operating on electronic device 1000, contact data, phonebook data, messages, pictures, videos, etc. Memory 1004 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0119] Power supply component 1006 provides power to various components of electronic device 1000. Power supply component 1006 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 1000.

[0120] Multimedia component 1008 includes a screen that provides an output interface between the electronic device 1000 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 1008 includes a front-facing camera and / or a rear-facing camera. When the electronic device 1000 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0121] Audio component 1010 is configured to output and / or input audio signals. For example, audio component 1010 includes a microphone (MIC) configured to receive external audio signals when electronic device 1000 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 1004 or transmitted via communication component 1016. In some embodiments, audio component 1010 also includes a speaker for outputting audio signals.

[0122] I / O interface 1012 provides an interface between processing component 1002 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, start buttons, and lock buttons.

[0123] Sensor assembly 1014 includes one or more sensors for providing state assessments of various aspects of electronic device 1000. For example, sensor assembly 1014 may detect the on / off state of electronic device 1000, the relative positioning of components such as the display and keypad of electronic device 1000, changes in position of electronic device 1000 or a component of electronic device 1000, the presence or absence of user contact with electronic device 1000, the orientation or acceleration / deceleration of electronic device 1000, and temperature changes of electronic device 1000. Sensor assembly 1014 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 1014 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 1014 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0124] Communication component 1016 is configured to facilitate wired or wireless communication between electronic device 1000 and other devices. Electronic device 1000 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 1016 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 1016 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0125] In an exemplary embodiment, the electronic device 1000 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0126] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1004 including instructions, which can be executed by a processor 1020 of an electronic device 1000 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0127] In one exemplary embodiment, a computer program product is provided, including a computer program or instructions that, when executed by a processor, implement the method described above.

[0128] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0129] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0130] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0131] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0132] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

[0133] The examples in this document may involve user data, data acquisition, and / or use. All of these aspects comply with relevant laws, regulations, and rules. In the examples, all data collection, acquisition, processing, manipulation, forwarding, and use are conducted with the user's knowledge and confirmation. Accordingly, when implementing each example, the type, scope of use, and usage scenarios of any data or information that may be involved should be communicated to the user and their authorization obtained through appropriate means, in accordance with relevant laws and regulations. The specific methods of notification and / or authorization can vary depending on the actual situation and application scenario; the scope of the solution is not limited in this regard.

[0134] In this manual and the sample solutions, any processing of personal information will be conducted only under legal grounds (such as obtaining the consent of the data subject or being necessary for the performance of a contract) and will only be carried out within the scope stipulated or agreed upon. A user's refusal to process personal information beyond what is necessary for basic functions will not affect the user's use of basic functions.

Claims

1. An analytical method, characterized in that, The method includes: Read the target text of the content to be parsed; In response to reading a preset symbol at a preset position in the target text, the target text is divided into multiple target groups based on the preset symbol; The data types of multiple target groups are unified into a preset type to obtain the parsing result.

2. The analytical method according to claim 1, characterized in that, The step of responding to a preset symbol read from a preset position in the target text, and dividing the target text into multiple target groups based on the preset symbol, includes: Read the characters in the target text, the characters in the target text include nested symbols and the preset symbols, wherein the nested symbols appear in pairs and there is no less than one pair of nested symbols, and each pair of nested symbols is used to identify the boundary of the data information in the target group; When the preset symbol is read outside the nested symbol, the preset symbol is used as the preset symbol at the preset position; The target text is divided into multiple target groups by using the positions of the preset symbols at all the preset positions read as the dividing positions.

3. The analytical method according to claim 2, characterized in that, The step of dividing the target text into multiple target groups based on the preset symbol at a preset position read from the target text further includes: In response to the reading of the preset symbol within the nested symbol, the reading of the target text continues.

4. The analytical method according to claim 2, characterized in that, The step of unifying the data types of multiple target groups into a preset type to obtain the parsing result includes: Analyze multiple target groups to obtain data information within the target groups; The data types of the data information in the target group are unified to a preset type to obtain the parsing result.

5. The analytical method according to claim 4, characterized in that, The step of parsing multiple target groups to obtain data information within the target groups includes: In response to the inclusion of prefix information in multiple target groups, the prefix information and original data information in multiple target groups are extracted according to a preset expression, wherein the original data information is the data in the target group after the prefix information has been removed; In response to the absence of prefix information in multiple target groups, the target groups being the original data information.

6. The analytical method according to claim 5, characterized in that, The step of parsing multiple target groups to obtain data information in the target groups further includes: In response to the fact that the original data information includes nested symbols, the nested symbols in the original data information are removed to obtain the data information in the target group; Since the original data information does not include nested symbols, the original data information is used as the data information in the target group.

7. The analytical method according to claim 6, characterized in that, The step of unifying the data type of the data information in the target group to a preset type and obtaining the parsing result includes: In response to the fact that the data information in the target group is in decimal, the decimal data information is stored in the preset type; In response to the fact that the data information in the target group is in hexadecimal, the hexadecimal data information is converted to decimal and stored as the preset type; The preset type of data information and the prefix information are used as the parsing result.

8. An analytical apparatus, characterized in that, The device includes: A reading module, configured to read the target text of the content to be parsed; A segmentation module is configured to, in response to reading a preset symbol at a preset position in the target text, divide the target text into multiple target groups based on the preset symbol; The setting module is configured to unify the data types of multiple target groups into a preset type to obtain the parsing result.

9. A chip, characterized in that, The chip includes: One or more interface circuits; and One or more processor circuits are configured to execute a computer program stored in a memory, which, when executed by the processor circuits, causes the chip to perform the parsing method as described in any one of claims 1 to 7.

10. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the parsing method as described in any one of claims 1 to 7.

11. A non-transitory computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the terminal, the terminal is able to perform the parsing method as described in any one of claims 1 to 7.

12. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by the processor, they implement the parsing method as described in any one of claims 1 to 7.