Dynamic word list generation method, system and program product
By introducing the BERT model and GAN generator, and combining time decay features, the interface test vocabulary is dynamically updated, which solves the problems of insufficient coverage and maintenance lag in vocabulary generation in the existing technology, and achieves more efficient interface test coverage and parameter semantic understanding.
Patent Information
- Application Number
- CN202511536162.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-24
- Publication Date
- 2026-02-10
AI Technical Summary
Existing interface test vocabulary generation solutions suffer from insufficient coverage of abnormal scenarios, lagging dynamic vocabulary maintenance, and a lack of depth in intelligent generation, making it difficult to fully cover business scenarios and understand parameter semantics.
We employ the BERT model for semantic understanding of highly active corpora and the GAN anomaly generator to process inactive corpora, generating and updating the vocabulary. We also dynamically adjust parameter priorities by combining time decay features to achieve dynamic vocabulary generation.
It improves test coverage, automatically identifies key business rules, dynamically maintains the thesaurus, and autonomously generates boundary test values not seen in historical traffic, thereby enhancing the efficiency and coverage of interface testing.
Smart Images

Figure CN121502007A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of interface testing, in particular to a dynamic word table generation method, a dynamic word table generation system and a program product. BACKGROUND
[0002] Current interface test word table generation mainly relies on traditional manual definition or traffic capture scheme: the manual scheme requires engineers to analyze API documents one by one, which is difficult to cover all business scenarios, especially missing abnormal parameter combinations, and has the problems of low coverage and high maintenance cost; although the traffic capture tool can automatically collect parameters, it contains a large number of repeated and outdated parameters, and can only reproduce existing traffic, cannot generate boundary values that have not appeared before, and cannot identify parameter business semantics; in recent years, with the development of machine learning, some research combines traffic playback and machine learning, but most of the schemes only realize basic parameter clustering, that is, only based on URL / parameter name and other shallow features to cluster and generate general parameter templates, without fusing business semantics, although it can realize automatic word table generation and greatly reduce manual labor, but it also has the shortcomings of lack of parameter semantic understanding, abnormal value derivation, and poor dynamic adaptability.
[0003] In summary, the existing word table generation scheme has the following shortcomings:
[0004] Insufficient coverage of abnormal scenarios: traditional schemes are difficult to capture implicit business rules and complex parameter combinations; word table dynamic maintenance lags behind: long manual intervention is required to synchronize the word table after interface changes; intelligent generation depth is missing: existing machine learning schemes cannot understand parameter semantics or autonomously derive boundary values. SUMMARY
[0005] The purpose of the present application is to provide a dynamic word table generation method, a dynamic word table generation system and a program product, which can greatly improve the test efficiency and test coverage.
[0006] The present application provides the following scheme:
[0007] According to one aspect of the present application, a dynamic word table generation method is provided, which comprises:
[0008] According to the real-time recorded network traffic, a business rule library is established, and the URL, parameter and parameter enumeration value of each traffic are stored in the business rule library;
[0009] A pre-trained BERT model is used as a feature extractor to input high-activity corpus text, obtain high-dimensional semantic vector representation of the text, and capture deep semantic information of the text;
[0010] For low-activity corpus text, the GAN abnormal generator is used to infer the abnormal values therein;
[0011] write the parameter values generated by the BERT semantic understanding and the GAN abnormality generator into the business rule library, and dynamically update the vocabulary warehouse.
[0012] Optionally, according to the real-time recorded network traffic, a business rule library is established, including:
[0013] The recorded traffic data is de-duplicated, cleaned, and invalid data is removed, and after preliminary screening, the key information is saved to a file.
[0014] Optionally, the recorded traffic data includes: HTTP request, response header, request body.
[0015] Optionally, according to the real-time recorded network traffic, a business rule library is established, and further including:
[0016] Extract the timestamp corresponding to each traffic as a time decay feature;
[0017] According to the timestamp of each traffic, the recorded traffic data is divided into high active parameters and low active parameters;
[0018] According to the determined high active parameter attribute and low active parameter attribute, each traffic is labeled.
[0019] Optionally, according to the real-time recorded network traffic, a business rule library is established, and further including:
[0020] According to the timestamp of each traffic, different weight values are given to different traffic entries.
[0021] Optionally, a pre-trained BERT model is used as a feature extractor, and high active corpus text is input to obtain high-dimensional semantic vector representation of the text, and deep semantic information of the text is captured, including:
[0022] By learning related corpus, the value of the parameter is understood, and more new enumeration values conforming to the business logic are generated.
[0023] Optionally, by using the GAN abnormality generator, for low active corpus text, the abnormal value is inferred, including:
[0024] Predefine a seed abnormality mode;
[0025] Provide the predefined seed abnormality mode to the generator as a prompt;
[0026] According to the prompt, the abnormal value in the corpus text is inferred.
[0027] Optionally, write the parameter values generated by the BERT semantic understanding and the GAN abnormality generator into the business rule library, and dynamically update the vocabulary warehouse, including:
[0028] Playback is performed in the test environment to capture response results and analyze anomalies.
[0029] According to two aspects of the present invention, a dynamic vocabulary generation system is provided, the dynamic vocabulary generation system comprising:
[0030] The rule base creation module is used to create a business rule base based on real-time recorded network traffic. The business rule base stores the URL, parameters, and parameter enumeration values for each traffic item.
[0031] The vector representation acquisition module is used to obtain a high-dimensional semantic vector representation of the text by taking a pre-trained BERT model as a feature extractor and taking highly active corpus text as input, thereby capturing the deep semantic information of the text.
[0032] The anomaly inference module is used to infer the values of anomalies in low-activity corpus text using a GAN anomaly generator.
[0033] The dynamic update module is used to write the parameter values automatically generated by BERT semantic understanding and GAN anomaly generator into the business rule base and dynamically update the vocabulary repository.
[0034] According to three aspects of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the dynamic vocabulary generation method described above.
[0035] The above solution achieves the following beneficial technical effects:
[0036] 1) Improved coverage: Fully covers abnormal parameter combinations and cross-interface dependency scenarios, and automatically identifies key business rules;
[0037] 2) Dynamic vocabulary maintenance: Extract time decay features from real-time traffic, and automatically adjust the admission priority of parameters in the corpus based on time features to achieve dynamic threshold adjustment;
[0038] 3) Intelligent generation capability: Deeply understands the semantic context of parameters and autonomously generates boundary test values and attack vectors that are not seen in historical traffic. Attached Figure Description
[0039] Figure 1 This is a flowchart of a dynamic vocabulary generation method provided in one or more embodiments of the present invention;
[0040] Figure 2 This is a flowchart of the rule base establishment operation in the dynamic vocabulary generation method provided by one or more embodiments of the present invention;
[0041] Figure 3This is a flowchart of the rule base establishment operation in the dynamic vocabulary generation method provided by one or more embodiments of the present invention;
[0042] Figure 4 This is a flowchart of the rule base establishment operation in the dynamic vocabulary generation method provided by one or more embodiments of the present invention;
[0043] Figure 5 This is a flowchart of the vector representation acquisition operation in the dynamic vocabulary generation method provided by one or more embodiments of the present invention;
[0044] Figure 6 This is a flowchart of the abnormal inference operation in the dynamic vocabulary generation method provided by one or more embodiments of the present invention;
[0045] Figure 7 This is a flowchart of the dynamic update operation in the dynamic vocabulary generation method provided by one or more embodiments of the present invention;
[0046] Figure 8 This is a flowchart of a dynamic vocabulary generation method provided in one or more embodiments of the present invention;
[0047] Figure 9 This is a structural diagram of a dynamic vocabulary generation system provided in one or more embodiments of the present invention. Detailed Implementation
[0048] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0049] Figure 1 This is a flowchart of a dynamic vocabulary generation method provided in one or more embodiments of the present invention. See also... Figure 1 The dynamic vocabulary generation method includes the following steps:
[0050] S11: Based on real-time recorded network traffic, a business rule base is established, which stores the URL, parameters, and parameter enumeration values for each traffic item.
[0051] S12 uses a pre-trained BERT model as a feature extractor, inputs highly active corpus text, obtains a high-dimensional semantic vector representation of the text, and captures the deep semantic information of the text.
[0052] S13 uses a GAN anomaly generator to infer the values of anomalies in low-activity text corpora.
[0053] S14: Write the parameter values automatically generated by BERT semantic understanding and GAN anomaly generator into the business rule base and dynamically update the vocabulary repository.
[0054] As described in the background section of this application, existing thesaurus generation methods generally suffer from insufficient understanding of potential business logic, inadequate coverage of different test scenarios, and untimely updates and maintenance of thesaurus.
[0055] The technical solution provided in this embodiment deepens the understanding of the inherent business logic of the corpus by introducing a model. Through a thorough understanding of the potential business logic, complex combinations of test parameters are intelligently and autonomously generated, thereby expanding the boundaries of test parameters and broadening the coverage scenarios of interface testing. A deep understanding of the original corpus data allows for the uncovering of the business logic contained within it. In other words, semantic understanding of the original corpus improves the test coverage of interface testing.
[0056] Furthermore, during the processing of the raw corpus data, the time decay characteristics of the raw corpus data were strictly controlled. Only raw corpus data with timestamps within a set threshold range were subjected to in-depth analysis. Corpus data with timestamps outside the set threshold range were relatively easy to understand and process. This processing method accelerates the updating speed of the thesaurus and improves the testing efficiency of the interface testing.
[0057] In this embodiment, the original corpus data comes from network traffic data. In the mobile internet era, network use is an indispensable part of people's lives. Therefore, network traffic data, which contains a large amount of usable information, is an excellent source of lexical data.
[0058] After capturing network traffic, it is processed and saved, forming a preliminary business rule base.
[0059] A typical business rule base stores URLs, parameters, and possible parameter enumeration values that correspond to actual network traffic.
[0060] In the technical solution provided in this embodiment, highly active text corpus is processed separately from low-activity text corpus. This approach is primarily adopted to ensure the timeliness of data stored in the final lexicon, thereby improving the efficiency of interface testing.
[0061] For highly active text corpora, which are typically recent data appearing in the original corpus and are highly timely, the BERT model is applied to perform semantic understanding on these timely and readily available texts in various embodiments of this application. Performing semantic understanding on timely data not only facilitates in-depth analysis of business logic and a better understanding of the inherent business logic within the data, but also ensures that the data ultimately stored in the lexicon is all recently acquired, avoiding the inclusion of invalid data and thus guaranteeing testing efficiency.
[0062] The BERT model takes raw, recorded network traffic data as input and outputs a high-dimensional semantic vector representation of the input text—essentially, an understanding of the input network traffic data. The BERT model possesses the ability to deeply capture and extract the profound semantic information contained within the input text data. This profound semantic information is represented by the BERT model in the form of high-dimensional semantic vectors.
[0063] For inactive text corpora, that is, raw text data with relatively poor timeliness, a completely different processing method was adopted for highly active text corpora. In this embodiment, a GAN anomaly generator was used to process the inactive text corpora.
[0064] The approach using a GAN anomaly generator involves predefining a series of anomaly patterns. These predefined anomaly patterns are then input into the generator of the GAN model to generate corresponding corpus text. Both the generated corpus text and the real corpus text are then input into the discriminator of the GAN model, which determines whether the real corpus text belongs to the predefined anomaly text.
[0065] Predefined exception patterns can include: boundary overflow, type confusion, excessively long / special characters, and undefined enumeration values.
[0066] After the BERT model and GAN model have processed the high-activity text and low-activity text respectively, their outputs can be written into the business rule base, and the vocabulary repository can be updated periodically based on the content written into the business rule base.
[0067] It is conceivable that, due to a deep understanding of the original corpus data, the underlying business logic has been thoroughly explored. Moreover, since highly active and inactive corpus texts are processed separately, the timeliness of the data ultimately written into the vocabulary repository is guaranteed, avoiding a decrease in testing efficiency due to writing outdated data.
[0068] Figure 2This is a flowchart of the rule base establishment operation in the dynamic vocabulary generation method provided by one or more embodiments of the present invention. See also Figure 2 Based on real-time recorded network traffic, a business rule base is established, including the following steps:
[0069] S21, the recorded traffic data is deduplicated, cleaned, and invalid data is removed. After initial screening, key information is retained and saved to a file.
[0070] It should be understood that raw network traffic data contains a large amount of non-standard data. If this raw data is allowed to enter the subsequent lexicon data processing flow without any processing, the result will be disastrous.
[0071] In the process of establishing the business rule base provided in this application, a large amount of deduplication, cleaning and other preliminary screening work was performed on the original crawled network traffic data.
[0072] One of the most common initial screening methods is to first define a series of text patterns to be processed, and then define the specific processing method for each text pattern. After the raw network traffic data has been captured, a matching operation is performed on the raw network traffic data according to the predefined text patterns. If a match is successful, the corresponding text processing method for the matched text pattern is executed. These text processing methods can be text replacement, text deletion, etc.
[0073] It should be noted that the text processing in the initial screening process is superficial; large-scale changes to the original network traffic content should not be made during this process. The initial screening should preserve the original appearance of the network traffic data as much as possible, only removing typical non-standard data.
[0074] Figure 3 This is a flowchart of the rule base establishment operation in the dynamic vocabulary generation method provided by one or more embodiments of the present invention. See also Figure 3 Based on real-time recorded network traffic, a business rule base is established, including:
[0075] S31 deduplicatizes, cleans, and removes invalid data from the recorded traffic data, and saves the key information to a file after initial screening.
[0076] S32, extract the timestamp corresponding to each traffic flow as a time decay feature.
[0077] S33 categorizes recorded traffic data into high-activity parameters and low-activity parameters based on the timestamp of each traffic entry.
[0078] S34. Each traffic item is labeled based on the determined high-activity and low-activity parameter attributes.
[0079] As described in the foregoing embodiments of this application, in this embodiment, high-activity attributes and low-activity attributes are processed separately. To effectively distinguish between the two, a timestamp method is used in the rule base creation process.
[0080] First, for each piece of raw network traffic data collected, obtain its timestamp. A timestamp is the specific time when that piece of network traffic data occurred. For example, if the collected raw network traffic data is an HTTP POST request, then the POST time of that data is its corresponding timestamp attribute.
[0081] After obtaining the timestamps of the network traffic data, all collected network traffic data is categorized into high-activity and low-activity data based on the timestamp attributes. In other words, the parameter data contained within the network traffic data is categorized into high-activity and low-activity parameters.
[0082] After distinguishing the raw network traffic data, the distinguished network traffic data is labeled. After labeling, each piece of network traffic data will be clearly identified as either highly active or inactive.
[0083] Figure 4 This is a flowchart of the rule base establishment operation in the dynamic vocabulary generation method provided by one or more embodiments of the present invention. See also Figure 4 Based on real-time recorded network traffic, a business rule base is established, including:
[0084] S41 deduplicatizes, cleans, and removes invalid data from the recorded traffic data. After initial screening, it retains key information and saves it to a file.
[0085] S42, extract the timestamp corresponding to each traffic flow as a time decay feature.
[0086] S43 assigns different weight values to different traffic entries based on the timestamp of each traffic entry.
[0087] S44 categorizes recorded traffic data into high-activity parameters and low-activity parameters based on the timestamp of each traffic entry.
[0088] S45, each traffic entry is labeled based on the determined high-activity and low-activity parameter attributes.
[0089] In the foregoing embodiments of this application, a fixed threshold was used to determine whether each piece of network traffic data belonged to high-activity or low-activity categories. In this embodiment, a dynamic threshold is used for determination.
[0090] A dynamic threshold is a criterion used to determine whether a piece of network traffic data should be classified as highly active or inactive. The threshold used is not fixed but changes dynamically depending on the time of access.
[0091] The advantage of dynamically changing thresholds is that the judgment criteria can be adjusted in real time according to the current actual working conditions or actual data to differentiate needs.
[0092] In this embodiment, the method for real-time adjustment of the judgment threshold is weight assignment. That is, after obtaining the timestamp of each traffic entry, a weight is calculated for that traffic entry based on the obtained timestamp. When it is necessary to distinguish between high and low activity levels for traffic data entries, the distinction is made based on the weight value assigned to that entry.
[0093] In a typical scenario, several traffic data entries can be grouped together, and the average weight of the data entries in the group can be calculated. If the average weight is greater than a set threshold, then all entries in the group are determined to be low-activity data entries.
[0094] Using a weighted approach to dynamically adjust the judgment threshold not only enables dynamic adjustment of the judgment conditions but also increases the flexibility of the judgment process.
[0095] Figure 5 This is a flowchart of the vector representation acquisition operation in the dynamic vocabulary generation method provided by one or more embodiments of the present invention. Figure 5 Using a pre-trained BERT model as a feature extractor, and inputting highly active text corpus, we obtain a high-dimensional semantic vector representation of the text, capturing its deep semantic information. The process includes the following steps:
[0096] S51 learns from relevant corpora to understand the values of parameters and generates more new enumeration values that conform to business logic.
[0097] The BERT model possesses the ability to deeply understand the semantic information contained in the original data. Due to its inherent deep understanding capabilities, during the processing of input data, the BERT model can generate new possible values for the input parameters that are wider in range than the original data parameters—that is, new enumerated values.
[0098] Because adopting the BERT model can generate more new enumeration values that conform to business logic, the technical solution provided in this application can reasonably expand the application scenarios of the test and improve the test coverage.
[0099] For example, in the original testing process, the possible values of a variable are usually considered to be Boolean values. That is, the value of this variable is either 0 or 1. Through learning from relevant corpora, it is discovered that the value of this variable can also be a decimal greater than 0 and less than 1. In other words, the value of this variable could be 0.5. Thus, in the generated vocabulary, the value of this variable can be any value from 0 to 1. This undoubtedly increases the number of test cases, and the coverage of the test cases becomes wider.
[0100] In other words, by learning from the corpus, we can effectively improve the coverage of tests and expand the scope of test cases as much as possible.
[0101] Figure 6 This is a flowchart of the anomaly inference operation in the dynamic vocabulary generation method provided by one or more embodiments of the present invention. See also Figure 6 Using a GAN anomaly generator, for inactive text corpora, the values of anomalies are inferred, including:
[0102] S61, predefined seed exception mode.
[0103] S62 provides the generator with a predefined seed exception pattern as a hint.
[0104] S63, based on the prompts, infer the abnormal values in the corpus text.
[0105] In this embodiment, the predefined exception pattern is referred to as the seed exception pattern. It can be understood that the seed exception pattern can be represented by a single regular expression, or, for some complex cases, by a set of regular expressions.
[0106] In the process of applying GAN models for anomaly inference, such regular expressions are input into the generator as clues to anomalous patterns. Then, the discriminator uses these clues to determine whether the original text corpus contains anomalies.
[0107] Figure 7 This is a flowchart of the dynamic update operation in the dynamic vocabulary generation method provided by one or more embodiments of the present invention. See also Figure 7 The parameter values automatically generated by BERT semantic understanding and GAN anomaly generator are written into the business rule base, and the vocabulary repository is dynamically updated, including:
[0108] S71 replays the response in the test environment, captures the response results, and analyzes anomalies.
[0109] After updating the vocabulary repository, the original network traffic data can be replayed based on the various attributes already stored in the repository. Then, based on the replayed response data, the causes of anomalies and specific operational scenarios can be analyzed.
[0110] Figure 8 This is a flowchart of a dynamic vocabulary generation method provided in one or more embodiments of the present invention. See also... Figure 8 The dynamic vocabulary generation method includes the following steps:
[0111] S81, implement online traffic generation.
[0112] Online traffic acquisition refers to acquiring network traffic data. In this embodiment, network traffic data is acquired and stored in units of network traffic entries.
[0113] It should be understood that each piece of network traffic data contains certain characteristic parameters. For example, the network protocol corresponding to the network traffic, the application layer protocol used by the network traffic, and so on.
[0114] S82, extract time decay features.
[0115] In this embodiment, the timestamp of each network traffic data is extracted and used as the time decay feature of that network data.
[0116] S83 performs dynamic threshold control on the extracted time decay features.
[0117] The result of implementing dynamic threshold control is that network traffic data is divided into high-activity parameters and low-activity parameters.
[0118] S84, obtain the relevant domain corpus.
[0119] S85, referring to relevant domain corpora, extracts high-level acquisition parameters and performs BERT semantic understanding.
[0120] S86 uses a GAN anomaly generator to identify and remove anomalous data for low-activity parameters.
[0121] S87, based on the results of semantic understanding and anomaly generation, stores these results in the business rule base.
[0122] S88 dynamically updates the vocabulary repository using data newly stored in the business rules base.
[0123] Figure 9 This is a structural diagram of a dynamic vocabulary generation system provided in one or more embodiments of the present invention. See also... Figure 9 The dynamic vocabulary generation system includes:
[0124] The rule base creation module 91 is used to create a business rule base based on real-time recorded network traffic. The business rule base stores the URL, parameters, and parameter enumeration values for each traffic item.
[0125] The vector representation acquisition module 92 is used to use a pre-trained BERT model as a feature extractor, input highly active corpus text, obtain a high-dimensional semantic vector representation of the text, and capture the deep semantic information of the text.
[0126] The anomaly inference module 93 is used to infer the abnormal values of parameters with low activity using the GAN anomaly generator.
[0127] The dynamic update module 94 is used to write the parameter values automatically generated by BERT semantic understanding and GAN anomaly generator into the business rule base and dynamically update the vocabulary repository.
[0128] Optionally, the rule base establishment module 91 includes: a preliminary screening unit.
[0129] The initial screening unit is used to deduplicatize, clean, and remove invalid data from the recorded traffic data. After initial screening, key information is retained and saved to a file.
[0130] Optionally, the recorded traffic data includes: HTTP requests, response headers, and request bodies.
[0131] Optionally, the rule base establishment module 91 also includes: extraction unit, differentiation unit, and annotation unit.
[0132] The extraction unit is used to extract the timestamp corresponding to each traffic flow as a time decay feature.
[0133] The differentiation unit is used to distinguish recorded traffic data into high-activity parameters and low-activity parameters based on the timestamp of each traffic entry.
[0134] The labeling unit is used to label each traffic item based on the determined high-activity parameter attributes and low-activity parameter attributes.
[0135] Optionally, the rule base creation module 91 also includes: assigning units.
[0136] The assignment unit is used to assign different weight values to different traffic entries based on the timestamp of each traffic entry.
[0137] Optionally, the vector representation acquisition module 92 includes: a generation unit.
[0138] The generation unit is used to learn from relevant corpora, understand the values of parameters, and generate more new enumeration values that conform to business logic.
[0139] Optionally, the anomaly inference module 93 includes: a predefined unit, a providing unit, and an inference unit.
[0140] Predefined units are used to predefine seed exception patterns.
[0141] The providing unit is used to provide the generator with a predefined seed exception pattern as a hint.
[0142] The inference unit is used to infer abnormal values in the corpus text based on prompts.
[0143] Optionally, the dynamic update module 94 includes: a playback unit.
[0144] The replay unit is used to replay responses in the test environment, capture response results, and analyze anomalies.
[0145] It is worth noting that although only some basic functional modules are disclosed in the embodiments of this invention, it does not mean that the composition of this system is limited to the above-mentioned basic functional modules. On the contrary, what this embodiment intends to express is that, based on the above-mentioned basic functional modules, those skilled in the art can arbitrarily add one or more functional modules in combination with existing technology to form an infinite number of embodiments or technical solutions. That is to say, this system is open rather than closed. The fact that this embodiment only discloses a few basic functional modules should not be considered as the scope of protection of the claims of this invention being limited to the disclosed basic functional modules. At the same time, for the convenience of description, the above device is described separately according to its functions as various units and modules. Of course, in implementing this invention, the functions of each unit and module can be implemented in one or more software and / or hardware.
[0146] The present invention also provides a computer-readable storage medium, comprising: storing a computer program executable by a vehicle, wherein when the computer program is run on the vehicle, the vehicle performs the steps of the dynamic vocabulary generation method.
[0147] Specifically, the computer storage medium in this embodiment of the invention can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be—but is not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0148] The present invention also provides a computer program product, comprising: a computer program executed by a vehicle, wherein when the computer program is run on the vehicle, the vehicle performs the steps of the dynamic vocabulary generation method.
[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating a dynamic vocabulary, characterized in that, The dynamic vocabulary generation method includes: Based on real-time recorded network traffic, a business rule base is established, which stores the URL, parameters, and parameter enumeration values for each traffic item. Using a pre-trained BERT model as a feature extractor, inputting highly active corpus text, obtaining a high-dimensional semantic vector representation of the text, and capturing the deep semantic information of the text; Using a GAN anomaly generator, the values of anomalies in low-activity text corpora are inferred. The parameter values automatically generated by BERT semantic understanding and GAN anomaly generator are written into the business rule base, and the vocabulary repository is dynamically updated.
2. The method according to claim 1, characterized in that, Based on real-time recorded network traffic, a business rule base is established, including: The recorded traffic data is deduplicated, cleaned, and invalid data is removed. After initial screening, key information is retained and saved to a file.
3. The method according to claim 2, characterized in that, The recorded traffic data includes: HTTP requests, response headers, and request bodies.
4. The method according to claim 1, characterized in that, Based on real-time recorded network traffic, a business rule base is established, which also includes: Extract the timestamp corresponding to each traffic entry as a time decay feature; Based on the timestamp of each traffic entry, the recorded traffic data is divided into high-activity parameters and low-activity parameters; Each traffic entry is labeled based on the identified high-activity and low-activity parameter attributes.
5. The method according to claim 4, characterized in that, Based on real-time recorded network traffic, a business rule base is established, which also includes: Different weight values are assigned to different traffic entries based on the timestamp of each traffic entry.
6. The method according to claim 1, characterized in that, Using a pre-trained BERT model as a feature extractor, and inputting highly active text corpus, high-dimensional semantic vector representations of the text are obtained to capture deep semantic information, including: By learning from relevant corpora, we can understand the values of parameters and generate more new enumeration values that conform to business logic.
7. The method according to claim 1, characterized in that, Using a GAN anomaly generator, for inactive text corpora, the values of anomalies are inferred, including: Predefined seed exception patterns; Provide the generator with a predefined seed exception pattern as a hint; Based on the clues, infer the abnormal values in the text corpus.
8. The method according to claim 1, characterized in that, The parameter values automatically generated by BERT semantic understanding and GAN anomaly generator are written into the business rule base, and the vocabulary repository is dynamically updated, including: Playback is performed in the test environment to capture response results and analyze anomalies.
9. A dynamic vocabulary generation system, characterized in that, The dynamic vocabulary generation system includes: The rule base creation module is used to create a business rule base based on real-time recorded network traffic. The business rule base stores the URL, parameters, and parameter enumeration values for each traffic item. The vector representation acquisition module is used to obtain a high-dimensional semantic vector representation of the text by taking a pre-trained BERT model as a feature extractor and inputting highly active corpus text, thereby capturing the deep semantic information of the text. The anomaly inference module is used to infer the values of anomalies in low-activity corpus text using a GAN anomaly generator. The dynamic update module is used to write the parameter values automatically generated by BERT semantic understanding and GAN anomaly generator into the business rule base and dynamically update the vocabulary repository.
10. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the steps of the dynamic vocabulary generation method according to any one of claims 1 to 7.