A protocol text difference identification method, device and equipment and a storage medium
By identifying the characteristic data of protocol versions and utilizing template technology and machine learning, the problem of the large number of RFC documents and their inconsistent changes has been solved. This has enabled the efficient identification and display of differences in protocol texts, thereby improving the accuracy of protocol development and testing.
Patent Information
- Application Number
- CN202211620890.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-16
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2042-12-16
AI Technical Summary
In existing technologies, the sheer number of RFC documents and their inconsistent changes make it inefficient to identify differences between different versions of the protocol text.
By identifying characteristic data of the protocol version from the first data, such as protocol message header data and errata table data, template technology, rule engine technology and machine learning are used to identify differences between different versions, and the differences are displayed through visual charts and regular expressions.
It improves the efficiency and accuracy of identifying differences in protocol text between different versions, supporting the accuracy of protocol development and testing.
Smart Images

Figure CN118250349B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data communication technology, specifically to a method, apparatus, device, and storage medium for identifying protocol text differences. Background Technology
[0002] Currently, the Request for Comments (RFC) document is an Internet technology standard document developed by the Internet Engineering Task Force (IETF).
[0003] RFC documents play a significant role in understanding network device protocols. They collect information on various protocols and are generally written by different people or organizations at different times. The writing style and structure of these documents are influenced by different periods, individuals, and organizations, resulting in relatively little variation. The number of RFC documents is vast, totaling up to nine thousand, and they are generally arranged by number.
[0004] Due to the large number of RFC documents and the lack of regularity in document changes, the efficiency of identifying differences in the text of different versions of protocols needs to be improved. Summary of the Invention
[0005] This application provides a method, apparatus, device, and storage medium for identifying differences in protocol text, which improves the efficiency of identifying differences in different versions of protocol text.
[0006] In a first aspect, embodiments of this application provide a method for identifying protocol text differences, including:
[0007] First feature data is determined from first data, the first data including text data of a first protocol version, the first feature data including at least one of the following types of data: protocol message header data and protocol errata data; difference information is determined based on the first feature data corresponding to the first data and the first feature data corresponding to the second data, the second data including text data of a second protocol version, the first protocol version being different from the second protocol version.
[0008] According to this method, first feature data corresponding to first data can be obtained, and the difference information between the first feature data corresponding to the first data and the first feature data corresponding to the second data can be determined. The first feature data includes at least one type of data from protocol message header data and protocol errata table data. Based on the first feature data corresponding to different versions, the difference information between different versions of the protocol text data can be determined, improving the efficiency of identifying differences between different versions of protocol text data.
[0009] In one possible embodiment, the first feature data further includes at least one of the following: protocol syntax, protocol timing, number, release status, release date, function description, MUST statement, MAY statement, SHOULD statement, protocol fields, syntax statements, and protocol references.
[0010] According to this method, protocol text data can be obtained from the protocol document as feature data. Different feature data can be used to indicate different differences. The accuracy of the differences between different versions of protocol text data can be further improved through the feature data.
[0011] In one possible embodiment, the difference information includes at least one of protocol version differences, protocol content change information, and technology evolution information.
[0012] According to this method, the difference information can be divided into protocol version differences, protocol content change information and technology evolution information based on the differences in protocol text data, which can improve the accuracy of the identification of difference information.
[0013] In one possible embodiment, the difference information includes visual charts and / or regular expressions.
[0014] According to this method, the difference information can be graphically displayed using visual charts and / or regular expressions, which can help locate and assist in protocol development, testing, and verification.
[0015] In one possible embodiment, the method further includes: outputting the difference information.
[0016] According to this method, the accuracy of protocol development, testing, and verification can be further improved by outputting difference information.
[0017] Secondly, this application provides a protocol text difference recognition device, the device comprising:
[0018] The acquisition module determines first feature data from the first data, the first data including text data of a first protocol version, the first feature data including at least one of the following types of data: protocol message header data and protocol errata data; the processing module determines difference information based on the first feature data corresponding to the first data and the first feature data corresponding to the second data, the second data including text data of a second protocol version, the first protocol version being different from the second protocol version.
[0019] In one possible embodiment, the first feature data further includes at least one of the following: protocol syntax, protocol timing, number, release status, release date, function description, MUST statement, MAY statement, SHOULD statement, protocol fields, syntax statements, and protocol references.
[0020] In one possible embodiment, the difference information includes at least one of protocol version differences, protocol content change information, and technology evolution information.
[0021] In one possible embodiment, the difference information includes visual charts and / or regular expressions.
[0022] In one possible embodiment, the processing module is further configured to: output the difference information.
[0023] Thirdly, this application provides an electronic device, comprising:
[0024] Memory, used to store program instructions;
[0025] A processor is configured to invoke program instructions stored in the memory and execute the steps of the method described in any one of the first aspects according to the obtained program instructions.
[0026] Fourthly, this application provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the method described in any one of the first aspects.
[0027] Fifthly, this application provides a computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform the method described in any one of the first aspects. Attached Figure Description
[0028] Figure 1 A flowchart illustrating a protocol text difference recognition method provided in an embodiment of this application;
[0029] Figure 2 A schematic diagram of a processing procedure provided in an embodiment of this application;
[0030] Figure 3 A schematic diagram of a device structure provided in an embodiment of this application;
[0031] Figure 4 This is a schematic diagram of another device structure provided in an embodiment of this application. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0033] The terms "first" and "second" in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. The term "multiple" in this application can mean at least two, for example, two, three, or more, and the embodiments of this application do not impose limitations.
[0034] The data collection, dissemination, and use in this application all comply with relevant national laws and regulations.
[0035] Before introducing the protocol text difference recognition method provided in the embodiments of this application, the technical background of the embodiments of this application will be described in detail below for ease of understanding.
[0036] Currently, RFC documents are internet technology standard documents developed by the IETF. These RFC documents play an important role in network device protocols.
[0037] The number of RFC documents is vast, totaling as many as nine thousand, and they are generally numbered. Common RFC numbers include 791 for the IP protocol and 793 for the TCP protocol. RFC documents are generally sponsored and published by the Internet Society (ISOC). RFC documents collect information on various protocols, including internet-related information, UNIX (uniplexed information and computering system), and software documents from the internet community. A single RFC document can be written by different people or organizations at different times, and its writing style and structure are influenced by different periods, individuals, and organizations.
[0038] Currently, RFC documents suffer from the following problems: Since RFC documents are only added, it's impossible to update or delete text within existing RFC documents. To update an existing RFC document, a new RFC document must be published and declared as an update to the previous document's functionality, or as a replacement of the previous RFC document. Therefore, it's difficult to determine which text in a new version of an RFC document is an update to a previous version. A method and apparatus for identifying protocol text differences are needed to improve the efficiency of identifying differences between different versions of the protocol text.
[0039] like Figure 1 As shown, the specific steps of a protocol text difference recognition method provided in this application embodiment include:
[0040] Step 101: Determine first feature data from the first data. The first data includes text data of the first protocol version. The first feature data includes at least one of the following types of data: protocol message header data and protocol errata data.
[0041] In one possible embodiment, the first data can be obtained through the RFC document download module in step 101.
[0042] Optionally, the first data and the second data can be two different protocol versions of RFC documents. The RFC download module in the RFC document server can download the RFC document from the IETF organization and store the downloaded RFC document on the RFC document server. Figure 2 As shown, the RFC document server may include an RFC document download module, a text extraction module, a version difference identification module, an evolution visualization module, and a database module.
[0043] The following text combines Figure 2 The modular structure is used to describe the method provided in the embodiments of this application. It can be understood that... Figure 2 The modular structure shown is merely one possible structure for an apparatus that performs the method described in the embodiments of this application. The apparatus may also have other structures, meaning that the functions performed by the above modules can be performed by modules in other structures.
[0044] In one possible embodiment, the RFC document download module determines the first feature data. In this embodiment, by comparing the first feature data of the first data and the first feature data of the second data, the differences in feature data between different protocol versions are determined, thereby improving the efficiency of identifying differences in protocol text between different versions. The first feature data includes at least one of the following types of data: protocol message header data and protocol errata data. For example, the protocol message header data is the title of any protocol document, and the protocol errata is a description of errors or omissions in the protocol document. The RFC document download module can obtain the RFC-1032 document and its message header data. The title of the RFC-1032 document, "Domain Administrator Guide," is the message header data. The RFC-7230 document is an errata, in which the text data of URL links (https-URIs) are listed using the SHOULD statement.
[0045] Optionally, the first feature data may also include text data similar to the SHOULD statement, such as: errata text data indicating possible or necessary modifications using MAY or MUST, and the publication date and status of the RFC-1032 document. Taking RFC-1032 as an example, the first feature data may also include the functional description, protocol syntax, and protocol timing of domain management in RFC-1032, and the RFC-1032 number, publication status, and publication date, as well as the functional description of domain or management in RFC-1032. In one possible embodiment, the RFC download module may acquire multiple first data from the RFC document. Each first data corresponds to a protocol version. The RFC download module may store multiple first data in the database.
[0046] In one possible embodiment, the text extraction module can extract text data of any first protocol version from multiple first data sets in the database. The text data of the first protocol version is the text data used for text difference identification. The text extraction module can utilize the association relationship and text extraction techniques such as template technology, rule engine technology, or machine learning to determine the first feature data corresponding to the first protocol version. The first feature data corresponding to the first protocol version can represent multiple text data sets and protocol versions; that is, the first feature data replaces the entire RFC document, and the difference information of the first feature data in different versions replaces the differences in the RFC document, thereby improving the efficiency of identifying RFC document differences. For example, the template technology, which developed with the advancement of computer graphics technology, can fix and standardize the structural rules of a thing, and can output text data in a structured and standardized manner. The rule engine technology is a technology for embedding components into applications, which can use predefined semantic modules to obtain business rules, i.e., to obtain rule text data. The machine learning can discover patterns and correlations in data through algorithms, and mine the implicit feature structure data of text data.
[0047] Step 102: Determine the difference information based on the first feature data corresponding to the first data and the first feature data corresponding to the second data. The second data includes text data of a second protocol version, and the first protocol version is different from the second protocol version.
[0048] In one possible embodiment, the RFC document download module can obtain text data of multiple second protocol versions. The text extraction module can extract text data of any second protocol version from the multiple second data. Here, the second protocol version may include multiple protocol versions, or in other words, data from two different second protocol versions belong to different protocol versions.
[0049] In one possible embodiment, the version difference identification module can obtain the difference information, which includes at least one of protocol version differences, protocol content change information, and technology evolution information.
[0050] The following examples illustrate the meaning and determination methods of protocol version differences, protocol content change information, and technology evolution information.
[0051] (1) Protocol version differences
[0052] Protocol version differences refer to version differences in the first feature data.
[0053] In one possible embodiment, if the first feature data is a single protocol text, the protocol version difference can correspond to the difference in the single protocol text. The protocol version difference is the result of a simple comparison between the first feature data of the first version and the first feature data of the second version. For example, the RFC document server can have a built-in timed data synchronization function. The RFC document download module can download the RFC document from the IETF organization to the RFC document server at fixed time intervals using a synchronization tool. The RFC document download module can obtain at least two RFC documents with different protocol versions sequentially based on the data synchronization function. The acquisition time interval can be determined according to requirements. The version difference identification module can compare the at least two RFC documents with different protocol versions obtained sequentially to obtain the protocol version difference.
[0054] (2) Information on changes to the agreement content
[0055] The protocol content change information refers to the version and function changes of the first feature data.
[0056] In one possible embodiment, if the first feature data comprises multiple protocol texts and functional descriptions, the protocol version difference may correspond to the differences in multiple protocol texts and functional descriptions. For example, the version difference identification module may compare the first feature data of at least two different protocol versions, RFC-1032 and RFC-1033, obtained sequentially. The first feature data in RFC-1032 indicates an update to RFC-1031, while the first feature data in RFC-1033 indicates the obsolescence of RFC-1031. The version difference identification module may use an algorithm to traverse text data or functional descriptions associated with the first feature data. Based on the functional descriptions of multiple first feature data, the version difference identification module may determine whether the function of the first feature data in RFC-1033 has changed from updated to obsolescence relative to the function of the first feature data in RFC-1032. The difference in the first feature data is the protocol content change information. RFC-1031, RFC-1032, and RFC-1033 are merely examples.
[0057] (3) Technological evolution information
[0058] Technology evolution information refers to the comparison result of the business description of the protocol text of the first data and the second data.
[0059] In one possible embodiment, if the first feature data represents business logic among multiple protocol texts, the protocol version difference can correspond to the difference in business logic among the multiple protocol texts. Optionally, the version difference identification module can traverse the business descriptions of the protocol texts using an algorithm. The version difference identification module can compare the business descriptions of multiple protocol texts, and the comparison result of the business descriptions of multiple protocol texts is the technology evolution information. For example, the version difference identification module can compare the first feature data of at least two different protocol versions, RFC-1032 and RFC-1033, obtained successively, to obtain the business logic among multiple protocol texts of RFC-1032 and RFC-1033. RFC-1032 and RFC-1033 belong to protocol families RFC-1001 to RFC-1500. By traversing the data associations of multiple protocol texts in the RFC-1500 protocol family and the data associations of multiple protocol texts in the RFC-1001 protocol family, the technology evolution information of RFC-1032 and RFC-1033 can be obtained.
[0060] In one possible embodiment, the RFC document download module can download text data of a second protocol version and text data of a first protocol version, wherein the text data of the first protocol version is text data whose textual differences are to be identified. The RFC document download module can determine first feature data, obtain the first feature data corresponding to the second data and the first feature data corresponding to the first data, that is, obtain the first feature data of the second protocol version and the first feature data of the first protocol version.
[0061] In one possible embodiment, the evolution visualization module can graphically display the difference information on the display screen of the difference recognition device, or it can perform regular expression matching calculations on the difference information and output the results to the display screen via an interface, displaying the difference information on the screen. For example, the difference information can be loaded into the computer workspace, and the rule engine technology can be used to match the difference information with multiple rules loaded into the workspace to obtain the matching degree between the difference information and the multiple rules. The evolution visualization module can further calculate the weight value of the matching degree. Based on the weight value, the rule with the high matching degree is obtained, and this rule is used as the display result of the difference information and sent to the user terminal via email.
[0062] Based on the same inventive concept, embodiments of this application provide a protocol text difference recognition device, please refer to... Figure 3 The device includes:
[0063] The acquisition module 301 is used to determine the first feature data from the first data, the first data including text data of a first protocol version, and the first feature data including at least one of the following types of data: protocol message header data and protocol errata data; the processing module 302 is used to determine difference information based on the first feature data corresponding to the first data and the first feature data corresponding to the second data, the second data including text data of a second protocol version, and the first protocol version is different from the second protocol version.
[0064] In one possible embodiment, the first feature data further includes at least one of the following: protocol syntax, protocol timing, number, release status, release date, function description, MUST statement, MAY statement, SHOULD statement, protocol fields, syntax statements, and protocol references.
[0065] In one possible embodiment, the difference information includes at least one of protocol version differences, protocol content change information, and technology evolution information.
[0066] In one possible embodiment, the difference information includes visual charts and / or regular expressions.
[0067] In one possible embodiment, the processing module 302 is further configured to: output the difference information.
[0068] Based on the same inventive concept, this application provides an electronic device that can realize the protocol text difference recognition function discussed above. Please refer to... Figure 4 The device includes a processor 402 and a memory 401.
[0069] The memory 401 is used to store computer programs executed by the processor 402. The memory 401 may mainly include a program storage area and a data storage area. The program storage area may store the operating system and programs required to run instant messaging functions, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.
[0070] Memory 401 may be volatile memory, such as random-access memory (RAM); memory 401 may also be non-volatile memory, such as read-only memory, flash memory, hard disk drive (HDD), or solid-state drive (SSD); or memory 401 may be any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 401 may be a combination of the above-described memories.
[0071] The processor 402 may include one or more central processing units (CPUs) or digital processing units, etc. The processor 402 is used to implement the above-described method when calling a computer program stored in the memory 401.
[0072] This application embodiment does not limit the specific connection medium between the memory 401 and the processor 402 described above. As an example, this application embodiment... Figure 4 The memory 401 and the processor 402 are connected via a bus 403, and the bus 403 is in Figure 4 The connections between other components are indicated by thick lines and are for illustrative purposes only, not as limiting information. Bus 403 can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0073] Optionally, the processor 402 can be used to execute any one or more of the actions performed by the acquisition module 301 and the processing module 302.
[0074] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium. The computer program product includes computer program code, which, when executed on a computer, causes the computer to perform any of the protocol text difference identification methods discussed above. Since the principle by which the above-described computer-readable storage medium solves the problem is similar to that of the protocol text difference identification method, the implementation of the above-described computer-readable storage medium can be referred to the implementation of the method, and repeated details will not be elaborated further.
[0075] Based on the same inventive concept, this application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to execute any of the protocol text difference recognition methods discussed above. Since the principle of the above computer program product in solving the problem is similar to that of the protocol text difference recognition method, the implementation of the above computer program product can refer to the implementation of the method, and repeated details will not be described again.
[0076] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0077] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0078] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0079] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of user-operated steps to be executed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0080] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for identifying differences in protocol text, characterized in that, include: First feature data is determined from the first data, the first data including text data of the first protocol version, and the first feature data including at least one of the following types of data: protocol message header data and protocol errata data; The difference information is determined based on the first feature data corresponding to the first data and the first feature data corresponding to the second data. The second data includes text data of a second protocol version, and the first protocol version is different from the second protocol version.
2. The method as described in claim 1, characterized in that, The first feature data also includes at least one of the following types of data: protocol syntax, protocol timing, number, release status, release date, function description, MUST statement, MAY statement, SHOULD statement, protocol fields, syntax statements, and protocol references.
3. The method as described in claim 1, characterized in that, The difference information includes at least one of the following: protocol version differences, protocol content change information, and technology evolution information.
4. The method as described in claim 1, characterized in that, The difference information includes visual charts and / or regular expressions.
5. The method as described in claim 1, characterized in that, The method further includes: Output the difference information.
6. A protocol text difference recognition device, characterized in that, include: The acquisition module determines first feature data from the first data, the first data including text data of the first protocol version, and the first feature data including at least one of the following types of data: protocol message header data and protocol errata data; The processing module determines difference information based on the first feature data corresponding to the first data and the first feature data corresponding to the second data. The second data includes text data of a second protocol version, and the first protocol version is different from the second protocol version.
7. The apparatus as claimed in claim 6, characterized in that, The first feature data also includes at least one of the following: protocol syntax, protocol timing, number, release status, release date, function description, MUST statement, MAY statement, SHOULD statement, protocol fields, syntax statements, and protocol references.
8. The apparatus as claimed in claim 6, characterized in that, The difference information includes at least one of the following: protocol version differences, protocol content change information, and technology evolution information.
9. The apparatus as claimed in claim 6, characterized in that, The difference information includes visual charts and / or regular expressions.
10. The apparatus as claimed in claim 6, characterized in that, The processing module is further configured to: The difference information is output in a visual manner.
11. An electronic device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the steps of the method according to any one of claims 1-5.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a computer, cause the computer to perform the method as described in any one of claims 1-5.
13. A computer program product, characterized in that, The computer program product includes: computer program code, which, when run on a computer, causes the computer to perform the method described in any one of claims 1-5.
Citation Information
Patent Citations
Protocol text difference identification method and device, medium and equipment
CN119294377A