A method, apparatus, electronic device, and storage medium for generating vulnerability identifiers

Vulnerability identification is generated through hash calculation and string splicing, which solves the problem of long and messy identification in the existing technology, and realizes the efficient read and write performance of the vulnerability library.

CN114297667BActive Publication Date: 2025-08-05BEIJING HUAYUNAN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210005694.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-05
Publication Date
2025-08-05
Estimated Expiration
2042-01-05

AI Technical Summary

Technical Problem

The existing technology methods to generate vulnerability identifiers cannot control their number of bits, resulting in long and messy identifications, taking up a large space, and affecting the read and write performance of the vulnerability library.

Method used

By obtaining vulnerability information, hash calculations are performed to obtain the first hash value, and the target vulnerability identifier is generated based on the preset number of digits and reference values. String splicing and hash calculations are used to ensure the uniqueness and neatness of the identifier.

Benefits of technology

The generated vulnerability identification has high uniqueness and neatness, which improves the read and write performance of the vulnerability library.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114297667B_ABST
    Figure CN114297667B_ABST
Patent Text Reader

Abstract

The present application provides a vulnerability identification generation method, device, electronic device and storage medium, the method comprising: obtaining vulnerability information of a target vulnerability; performing a hash calculation on characters included in the vulnerability information to obtain a first hash value; obtaining a first value based on a preset number of digits and a reference value, wherein the reference value is the number of digits of the first hash value, the preset number of digits is used to represent the number of digits of the target vulnerability identification to be generated, and the target vulnerability identification is the vulnerability identification of the target vulnerability; concatenating a first string corresponding to the first number of digits and a second string corresponding to the first hash value to obtain a third string; performing a hash calculation on the third string according to the preset number of digits to obtain a second hash value having the preset number of digits, and using the second hash value as the target vulnerability identification. The present application can ensure the uniqueness and neatness of the generated vulnerability identification, which not only caters to user habits but also prevents the vulnerability identification from being too long, thereby improving the read and write performance of the vulnerability library.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and more specifically, to a vulnerability identification generation method, device, electronic device, and storage medium. Background Art

[0002] With the development of computer and Internet technology, various software emerge in an endless stream. In the development of software, a large number of vulnerabilities are inevitable, and the database used to store vulnerabilities is the vulnerability library.

[0003] Before storing vulnerabilities in a vulnerability database, it is necessary to first generate vulnerability identifiers for indexing the vulnerabilities, and then store the vulnerabilities, vulnerability identifiers, and vulnerability information in the vulnerability database. Prior art methods for generating vulnerability identifiers include: generating vulnerability identifiers based on the vulnerability release date; generating vulnerability identifiers by performing a SHA-1 calculation (a type of hash calculation) based on the vulnerability name; generating vulnerability identifiers based on random or pseudo-random information; and generating vulnerability identifiers by performing an MD5 calculation (a type of hash calculation) based on the vulnerability name.

[0004] However, the vulnerability identification generation method of the existing technology cannot control the number of bits (length) of the generated vulnerability identification. This not only makes the vulnerability identification appear lengthy and messy, but also the long number of bits of the vulnerability identification will cause the data volume to be too large, and the space occupied by the vulnerability library will also be too large, which will seriously affect the read and write performance of the vulnerability library. Summary of the Invention

[0005] In view of this, the purpose of this application is to provide a vulnerability identification generation method, device, electronic device and storage medium, which can ensure the uniqueness and neatness of the generated vulnerability identification, not only catering to user habits, but also making the vulnerability identification not too long, thereby improving the reading and writing performance of the vulnerability library.

[0006] In a first aspect, an embodiment of the present application provides a method for generating a vulnerability identifier, the method comprising:

[0007] Obtain vulnerability information of a target vulnerability, wherein the vulnerability information consists of at least one character;

[0008] Performing a hash calculation on the characters included in the vulnerability information to obtain a first hash value;

[0009] Obtaining a first value based on a preset number of bits and a reference value, wherein the reference value is the number of bits of the first hash value, the preset number of bits is used to represent the number of bits of a target vulnerability identifier to be generated, and the target vulnerability identifier is a vulnerability identifier of the target vulnerability;

[0010] Concatenate a first string corresponding to the first numerical value and a second string corresponding to the first Hash value to obtain a third string;

[0011] The hash calculation is performed on the third character string according to the preset number of bits to obtain a second hash value having the preset number of bits, and the second hash value is used as the target vulnerability identifier.

[0012] In one possible implementation, the vulnerability information includes multiple characters; and performing hash calculation on the characters included in the vulnerability information to obtain a first hash value includes:

[0013] Selecting at least one vulnerability information from all the vulnerability information as candidate vulnerability information;

[0014] If the candidate vulnerability information includes only one, the hash calculation is performed on the characters included in the candidate vulnerability information to obtain the first hash value.

[0015] In one possible implementation, the vulnerability information includes multiple characters; and performing hash calculation on the characters included in the vulnerability information to obtain a first hash value further includes:

[0016] Selecting at least one vulnerability information from all the vulnerability information as candidate vulnerability information;

[0017] If the candidate vulnerability information includes at least two pieces of information, concatenate the characters included in each piece of the candidate vulnerability information to obtain concatenated vulnerability information;

[0018] Perform the hash calculation on the characters included in the splicing vulnerability information to obtain the first hash value.

[0019] In a possible implementation, obtaining the first value based on the preset number of bits and the reference value includes:

[0020] Obtaining an n-ary value corresponding to the preset number of digits, where n is an integer greater than 1;

[0021] The first value is obtained based on the preset number of bits, the n-ary value and the reference value.

[0022] In a possible implementation, obtaining the first value based on the preset number of bits, the n-ary value, and the reference value includes:

[0023] Multiplying the preset number of bits by the n-ary value to obtain a second value;

[0024] A quotient is calculated by dividing the second value by the reference value to obtain a third value, and the third value is used as the first value.

[0025] In one possible implementation, n is 2.

[0026] In a possible implementation, the vulnerability information includes at least two of the following: vulnerability name, vulnerability description, vulnerability number, vulnerability level, vulnerability manufacturer, and vulnerability release time.

[0027] In a second aspect, an embodiment of the present application further provides a vulnerability identification generating device, the device comprising:

[0028] An acquisition module, configured to acquire vulnerability information of a target vulnerability, wherein the vulnerability information consists of at least one character;

[0029] A first calculation module, configured to perform a hash calculation on the characters included in the vulnerability information to obtain a first hash value;

[0030] a second calculation module, configured to obtain a first value based on a preset number of bits and a reference value, wherein the reference value is the number of bits of the first hash value, the preset number of bits is used to represent the number of bits of a target vulnerability identifier to be generated, and the target vulnerability identifier is a vulnerability identifier of the target vulnerability;

[0031] a concatenation module, configured to concatenate a first string corresponding to the first numerical value and a second string corresponding to the first hash value to obtain a third string;

[0032] A third calculation module is configured to perform the hash calculation on the third character string according to the preset number of bits to obtain a second hash value having the preset number of bits, and use the second hash value as the target vulnerability identifier.

[0033] In a possible implementation, the vulnerability information includes multiple items; and the first calculation module is further configured to:

[0034] Selecting at least one vulnerability information from all the vulnerability information as candidate vulnerability information;

[0035] If the candidate vulnerability information includes only one, the hash calculation is performed on the characters included in the candidate vulnerability information to obtain the first hash value.

[0036] In a possible implementation, the vulnerability information includes multiple items; and the first calculation module is further configured to:

[0037] Selecting at least one vulnerability information from all the vulnerability information as candidate vulnerability information;

[0038] If the candidate vulnerability information includes at least two pieces of information, concatenate the characters included in each piece of the candidate vulnerability information to obtain concatenated vulnerability information;

[0039] Perform the hash calculation on the characters included in the splicing vulnerability information to obtain the first hash value.

[0040] In a possible implementation, the second calculation module is further configured to:

[0041] Obtaining an n-ary value corresponding to the preset number of digits, where n is an integer greater than 1;

[0042] The first value is obtained based on the preset number of bits, the n-ary value and the reference value.

[0043] In a possible implementation, when the second calculation module obtains the first value based on the preset number of bits, the n-ary value, and the reference value, it is specifically configured to:

[0044] Multiplying the preset number of bits by the n-ary value to obtain a second value;

[0045] A quotient is calculated by dividing the second value by the reference value to obtain a third value, and the third value is used as the first value.

[0046] In one possible implementation, n is 2.

[0047] In a possible implementation, the vulnerability information includes at least two of the following: vulnerability name, vulnerability description, vulnerability number, vulnerability level, vulnerability manufacturer, and vulnerability release time.

[0048] In a third aspect, an embodiment of the present application further provides an electronic device comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the vulnerability identification generation method described in any one of the first aspects.

[0049] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the vulnerability identification generation method as described in any one of the first aspects are executed.

[0050] The embodiments of the present application provide a vulnerability identification generation method, device, electronic device, and storage medium that can ensure the uniqueness and uniformity of the generated vulnerability identification, which not only caters to user habits but also prevents the vulnerability identification from being too long, thereby improving the read and write performance of the vulnerability library. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0052] Figure 1 A flowchart of a vulnerability identification generation method provided by an embodiment of the present application is shown;

[0053] Figure 2 A flowchart of another vulnerability identification generation method provided by an embodiment of the present application is shown;

[0054] Figure 3 A flowchart of another vulnerability identification generation method provided by an embodiment of the present application is shown;

[0055] Figure 4 A flowchart of another vulnerability identification generation method provided by an embodiment of the present application is shown;

[0056] Figure 5 A flowchart of another vulnerability identification generation method provided by an embodiment of the present application is shown;

[0057] Figure 6 A schematic diagram of the structure of a vulnerability identification generating device provided in an embodiment of the present application is shown;

[0058] Figure 7 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of illustration and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowcharts can be implemented out of sequence, and steps without logical context can be reversed or implemented simultaneously. In addition, those skilled in the art, under the guidance of the contents of this application, can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.

[0060] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.

[0061] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0062] To facilitate understanding of this embodiment, a vulnerability identification generation method, device, electronic device and storage medium provided in the embodiment of the present application are introduced in detail.

[0063] Reference Figure 1 FIG. 1 is a flow chart of a vulnerability identification generation method provided in an embodiment of the present application, the method comprising:

[0064] S101: Acquire vulnerability information of a target vulnerability, wherein the vulnerability information consists of at least one character.

[0065] Exemplarily, the vulnerability information may be the vulnerability number of the target vulnerability.

[0066] Assuming that the vulnerability number of the target vulnerability is "CNNVD-202104-989", it includes 16 characters (i.e., consists of 16 characters), from front to back: "C", "N", "N", "V", "D", "-", "2", "0", "2", "1", "0", "4", "-", "9", "8" and "9".

[0067] S102: Perform a hash calculation on the characters included in the vulnerability information to obtain a first hash value.

[0068] As described in step S101, the vulnerability number "CNNVD-202104-989" of the target vulnerability can be hashed to obtain a first hash value (for example, b09f6012696369d8b18b54c1b43c96eb).

[0069] If the characters included in the vulnerability information are directly used as vulnerability identifiers, the similarity between the two vulnerability identifiers may be high. In order to reduce the similarity between the two vulnerability identifiers, hash calculation is required. Because the hash values obtained after hash calculation for different strings are completely different and the similarity is also low, using the hash value as a parameter can ensure the uniqueness of the final vulnerability identifier and ensure that the vulnerability identifiers of different vulnerabilities are more different.

[0070] S103. Obtain a first value based on a preset number of bits and a reference value, wherein the reference value is the number of bits of the first hash value, the preset number of bits is used to represent the number of bits of a target vulnerability identifier to be generated, and the target vulnerability identifier is a vulnerability identifier of the target vulnerability.

[0071] For example, if the length (number of digits) of the vulnerability identifier of the target vulnerability (ie, the target vulnerability identifier) is set to 10, then the preset number of digits is 10.

[0072] According to step S102 , when the first hash value is b09f6012696369d8b18b54c1b43c96eb, the reference value (ie, the number of bits of the first hash value) is 32.

[0073] For example, the first value may be a reference value divided by a preset number of digits and then rounded up, and then the first value is 3 (32÷10 and then rounded up).

[0074] In order to make the number of digits (length) of the vulnerability identifier not too long and cater to user habits (the length of the vulnerability identifier is unified), the number of digits (length) of the vulnerability identifier is uniformly set in advance.

[0075] S104: Concatenate a first character string corresponding to the first numerical value and a second character string corresponding to the first Hash value to obtain a third character string.

[0076] According to step S103, the first character string corresponding to the first numerical value 3 is "3", and the second character string corresponding to the first hash value is "b09f6012696369d8b18b54c1b43c96eb". The character strings can be concatenated with the first character string in front and the second character string in the back, and the obtained third character string is "3b09f6012696369d8b18b54c1b43c96eb"; or the second character string can be concatenated with the first character string in front, and the obtained third character string is "b09f6012696369d8b18b54c1b43c96eb3".

[0077] S105 . Perform the hash calculation on the third character string according to the preset number of bits to obtain a second hash value having the preset number of bits, and use the second hash value as the target vulnerability identifier.

[0078] As described in step S104, assuming that the first character string is in front and the second character string is in the back, the third character string is "3b09f6012696369d8b18b54c1b43c96eb". The third character string "3b09f6012696369d8b18b54c1b43c96eb" is hashed according to a preset number of bits (for example, 10). After obtaining a second hash value with a bit number of 10 (for example, 52dc2b3f64), the second hash value 52dc2b3f64 is used as the vulnerability identifier of the target vulnerability (i.e., the target vulnerability identifier).

[0079] Reference Figure 2 FIG. 1 is a flowchart of another vulnerability identification generation method provided by an embodiment of the present application. In one possible implementation, the vulnerability information includes multiple characters; performing a hash calculation on the characters included in the vulnerability information to obtain a first hash value includes:

[0080] S201: Select at least one vulnerability information from all the vulnerability information as candidate vulnerability information.

[0081] For example, the vulnerability information includes the vulnerability name of the target vulnerability, the vulnerability description of the target vulnerability, the vulnerability number of the target vulnerability, the vulnerability level of the target vulnerability, the vulnerability manufacturer of the target vulnerability, and the vulnerability release time of the target vulnerability, and at least one of them is selected as candidate vulnerability information.

[0082] S202: If the candidate vulnerability information includes only one character, perform the hash calculation on the characters included in the candidate vulnerability information to obtain the first hash value.

[0083] As described in step S201, for example, the candidate vulnerability information only includes the vulnerability number of the target vulnerability (for example, "CNNVD-202104-989"), then the vulnerability number "CNNVD-202104-989" of the target vulnerability is hashed to obtain a first hash value (for example, b09f6012696369d8b18b54c1b43c96eb).

[0084] Reference Figure 3 FIG. 1 is a flow chart of another vulnerability identification generation method provided by an embodiment of the present application. In one possible implementation, the vulnerability information includes multiple characters; performing a hash calculation on the characters included in the vulnerability information to obtain a first hash value further includes:

[0085] S301: Select at least one vulnerability information from all the vulnerability information as candidate vulnerability information.

[0086] For example, the vulnerability information includes the vulnerability name of the target vulnerability, the vulnerability description of the target vulnerability, the vulnerability number of the target vulnerability, the vulnerability level of the target vulnerability, the vulnerability manufacturer of the target vulnerability, and the vulnerability release time of the target vulnerability, and at least one of them is selected as candidate vulnerability information.

[0087] S302: If the candidate vulnerability information includes at least two pieces, concatenate the characters included in each piece of candidate vulnerability information to obtain concatenated vulnerability information.

[0088] Exemplarily, the candidate vulnerability information includes the release time of the target vulnerability (for example, "2021-09-10"), the vulnerability manufacturer of the target vulnerability (for example, "Yinshan") and the vulnerability name of the target vulnerability (for example, "Cross-site Scripting Vulnerability"). Then the spliced vulnerability information obtained after splicing can be "2021-09-10 Yinshan Cross-site Scripting Vulnerability" (here, there is no restriction on the order of string splicing, that is, the result can also be "2021-09-10 Cross-site Scripting Vulnerability Yinshan" etc.).

[0089] S303: Perform the hash calculation on the characters included in the splicing vulnerability information to obtain the first hash value.

[0090] As described in step S302, a hash calculation is performed on "2021-09-10 Yinshan Cross-Site Scripting Vulnerability" to obtain a first hash value (for example, 2bbafe24ba646239ff232808c3a3c7d6).

[0091] Reference Figure 4 FIG. 1 is a flow chart of another vulnerability identification generation method provided by an embodiment of the present application. In one possible implementation, obtaining a first value based on a preset number of bits and a reference value includes:

[0092] S401. Obtain an n-ary value corresponding to the preset number of bits, where n is an integer greater than 1.

[0093] For example, if the preset number of digits is 10 and n is 8, then the octal value corresponding to the preset number of digits 10 is 12.

[0094] S402: Obtain the first value based on the preset number of bits, the n-ary value, and the reference value.

[0095] For example, the first value may be obtained by rounding off the reference value × the number of preset digits ÷ the n-base value.

[0096] Through the above steps, the similarity between the third character strings corresponding to different vulnerabilities can be further reduced, so that the differences between the different vulnerability identifiers finally generated are greater.

[0097] Reference Figure 5 FIG. 1 is a flow chart of another vulnerability identification generation method provided by an embodiment of the present application. In one possible implementation, obtaining the first value based on the preset number of bits, the n-ary value, and the reference value includes:

[0098] S501: Multiply the preset number of bits by the n-ary value to obtain a second value.

[0099] S502: Calculate the quotient of the second value and the reference value to obtain a third value, and use the third value as the first value.

[0100] Combined with steps S501 to S502, the first value is the preset number of bits × the n-ary value corresponding to the preset number of bits ÷ the reference value. If the first value is not an integer, it can be rounded (that is, the result of rounding the preset number of bits × the n-ary value corresponding to the preset number of bits ÷ the reference value is used as the first value).

[0101] Through the above steps, the similarity between the third character strings corresponding to different vulnerabilities can be further reduced, so that the differences between the different vulnerability identifiers finally generated are greater.

[0102] In one possible implementation, n is 2.

[0103] In a possible implementation, the vulnerability information includes at least two of the following: vulnerability name, vulnerability description, vulnerability number, vulnerability level, vulnerability manufacturer, and vulnerability release time.

[0104] The embodiment of the present application provides a vulnerability identification generation method that can ensure the uniqueness and neatness of the generated vulnerability identification, which not only caters to user habits but also prevents the vulnerability identification from being too long, thereby improving the read and write performance of the vulnerability library.

[0105] Based on the same inventive concept, the embodiments of the present application also provide a vulnerability identification generation device corresponding to the vulnerability identification generation method in the embodiments. Since the principle of solving the problem by the device in the embodiments of the present application is similar to the above-mentioned vulnerability identification generation method in the embodiments of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0106] Reference Figure 6 FIG. 1 is a schematic diagram of a vulnerability identification generating device provided in an embodiment of the present application, wherein the device includes:

[0107] An acquisition module 601 is configured to acquire vulnerability information of a target vulnerability, wherein the vulnerability information consists of at least one character;

[0108] A first calculation module 602 is configured to perform a hash calculation on the characters included in the vulnerability information to obtain a first hash value;

[0109] A second calculation module 603 is configured to obtain a first value based on a preset number of bits and a reference value, wherein the reference value is the number of bits of the first hash value, the preset number of bits is used to represent the number of bits of a target vulnerability identifier to be generated, and the target vulnerability identifier is a vulnerability identifier of the target vulnerability;

[0110] a concatenation module 604 configured to concatenate a first string corresponding to the first numerical value and a second string corresponding to the first hash value to obtain a third string;

[0111] The third calculation module 605 is configured to perform the hash calculation on the third character string according to the preset number of bits, obtain a second hash value having the preset number of bits, and use the second hash value as the target vulnerability identifier.

[0112] In a possible implementation, the vulnerability information includes multiple items; the first calculation module 602 is further configured to:

[0113] Selecting at least one vulnerability information from all the vulnerability information as candidate vulnerability information;

[0114] If the candidate vulnerability information includes only one, the hash calculation is performed on the characters included in the candidate vulnerability information to obtain the first hash value.

[0115] In a possible implementation, the vulnerability information includes multiple items; the first calculation module 602 is further configured to:

[0116] Selecting at least one vulnerability information from all the vulnerability information as candidate vulnerability information;

[0117] If the candidate vulnerability information includes at least two pieces of information, concatenate the characters included in each piece of the candidate vulnerability information to obtain concatenated vulnerability information;

[0118] Perform the hash calculation on the characters included in the splicing vulnerability information to obtain the first hash value.

[0119] In a possible implementation, the second calculation module 603 is further configured to:

[0120] Obtaining an n-ary value corresponding to the preset number of digits, where n is an integer greater than 1;

[0121] The first value is obtained based on the preset number of bits, the n-ary value and the reference value.

[0122] In a possible implementation manner, when the second calculation module 603 obtains the first value based on the preset number of bits, the n-ary value, and the reference value, it is specifically configured to:

[0123] Multiplying the preset number of bits by the n-ary value to obtain a second value;

[0124] A quotient is calculated by dividing the second value by the reference value to obtain a third value, and the third value is used as the first value.

[0125] In one possible implementation, n is 2.

[0126] In a possible implementation, the vulnerability information includes at least two of the following: vulnerability name, vulnerability description, vulnerability number, vulnerability level, vulnerability manufacturer, and vulnerability release time.

[0127] The embodiment of the present application provides a vulnerability identification generation device that can ensure the uniqueness and uniformity of the generated vulnerability identification, which not only caters to user habits but also prevents the vulnerability identification from being too long, thereby improving the read and write performance of the vulnerability library.

[0128] Reference Figure 7 As shown, an electronic device 700 provided in an embodiment of the present application includes: a processor 701, a memory 702 and a bus, wherein the memory 702 stores machine-readable instructions executable by the processor 701. When the electronic device is running, the processor 701 communicates with the memory 702 through the bus, and the processor 701 executes the machine-readable instructions to perform the steps of the vulnerability identification generation method as described above.

[0129] Specifically, the above-mentioned memory 702 and processor 701 can be general-purpose memories and processors, which are not specifically limited here. When the processor 701 runs the computer program stored in the memory 702, it can execute the above-mentioned vulnerability identification generation method.

[0130] Corresponding to the above-mentioned method for generating vulnerability identification, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, the steps of the above-mentioned method for generating vulnerability identification are executed.

[0131] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0132] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0133] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0134] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.

[0135] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A vulnerability identification generation method, characterized in that: The method comprises: Obtain vulnerability information of a target vulnerability, wherein the vulnerability information consists of at least one character; Performing a hash calculation on the characters included in the vulnerability information to obtain a first hash value; Obtaining a first value based on a preset number of bits and a reference value, wherein the reference value is the number of bits of the first hash value, the preset number of bits is used to represent the number of bits of a target vulnerability identifier to be generated, and the target vulnerability identifier is a vulnerability identifier of the target vulnerability; Concatenate a first string corresponding to the first numerical value and a second string corresponding to the first Hash value to obtain a third string; Performing the hash calculation on the third character string according to the preset number of bits to obtain a second hash value having the preset number of bits, and using the second hash value as the target vulnerability identifier; The obtaining of the first value based on the preset number of bits and the reference value includes: Obtaining an n-ary value corresponding to the preset number of digits, where n is an integer greater than 1; Obtaining the first value based on the preset number of bits, the n-ary value, and the reference value includes: Multiplying the preset number of bits by the n-ary value to obtain a second value; A quotient is calculated by dividing the second value by the reference value to obtain a third value, and the third value is used as the first value.

2. The vulnerability identification generation method according to claim 1, characterized in that: The vulnerability information includes multiple characters; performing hash calculation on the characters included in the vulnerability information to obtain a first hash value includes: Selecting at least one vulnerability information from all the vulnerability information as candidate vulnerability information; If the candidate vulnerability information includes only one, the hash calculation is performed on the characters included in the candidate vulnerability information to obtain the first hash value.

3. The vulnerability identification generation method according to claim 1, characterized in that: The vulnerability information includes multiple characters; performing hash calculation on the characters included in the vulnerability information to obtain a first hash value further includes: Selecting at least one vulnerability information from all the vulnerability information as candidate vulnerability information; If the candidate vulnerability information includes at least two pieces of information, concatenate the characters included in each piece of the candidate vulnerability information to obtain concatenated vulnerability information; Perform the hash calculation on the characters included in the splicing vulnerability information to obtain the first hash value.

4. The vulnerability identification generation method according to claim 1, characterized in that: The n is 2.

5. The vulnerability identification generation method according to claim 2 or 3, characterized in that: The vulnerability information includes at least two of the following: vulnerability name, vulnerability description, vulnerability number, vulnerability level, vulnerability manufacturer, and vulnerability release time.

6. A vulnerability identification generating device, characterized in that: The device comprises: An acquisition module, configured to acquire vulnerability information of a target vulnerability, wherein the vulnerability information consists of at least one character; A first calculation module, configured to perform a hash calculation on the characters included in the vulnerability information to obtain a first hash value; a second calculation module, configured to obtain a first value based on a preset number of bits and a reference value, wherein the reference value is the number of bits of the first hash value, the preset number of bits is used to represent the number of bits of a target vulnerability identifier to be generated, and the target vulnerability identifier is a vulnerability identifier of the target vulnerability; a concatenation module, configured to concatenate a first string corresponding to the first numerical value and a second string corresponding to the first hash value to obtain a third string; a third calculation module, configured to perform the hash calculation on the third character string according to the preset number of bits, obtain a second hash value having the preset number of bits, and use the second hash value as the target vulnerability identifier; The second calculation module is further configured to obtain an n-ary value corresponding to the preset number of digits, wherein n is an integer greater than 1; and obtain the first value based on the preset number of digits, the n-ary value, and the reference value; When the second calculation module obtains the first value based on the preset number of bits, the n-base value and the reference value, it is specifically used to multiply the preset number of bits and the n-base value to obtain a second value; take the second value and the reference value as the quotient to obtain a third value, and use the third value as the first value.

7. An electronic device, characterized in that: include: A processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the machine-readable instructions to perform the steps of the vulnerability identification generation method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the vulnerability identification generation method according to any one of claims 1 to 5 are executed.

Citation Information

Patent Citations

  • Vulnerability detection method and device

    CN107392026A

  • Unauthorized vulnerability detection method and device, equipment and computer program product

    CN113452710A