Search

CN-122027689-A - Method and device for automatic joint debugging of interfaces of different manufacturers

CN122027689ACN 122027689 ACN122027689 ACN 122027689ACN-122027689-A

Abstract

The invention relates to the technical field of data interaction testing, in particular to a method and a device for automatic joint debugging of interfaces of different manufacturers. The method comprises the steps of receiving heterogeneous service messages from different manufacturers, preprocessing each heterogeneous service message to obtain intermediate messages with uniform structure and consistent semantics, generating structural fingerprints for each intermediate message based on key names of the intermediate messages, generating semantic fingerprints based on key values of the intermediate messages, combining the structural fingerprints with the semantic fingerprints to obtain composite fingerprints, carrying out hierarchical logic retrieval and semantic reasoning based on the composite fingerprints to obtain joint debugging templates corresponding to the heterogeneous service messages of each manufacturer, and carrying out joint debugging on equipment interfaces of each manufacturer based on the joint debugging templates. The invention can carry out interface joint debugging of different factories in the collaboration environment of different factories, and realize automatic data butt joint and joint debugging of cross-platform, cross-protocol and cross-system.

Inventors

  • HUANG XIANGLU
  • YI ZHIBIAO
  • LI JING

Assignees

  • 武汉绿色网络股份有限公司

Dates

Publication Date
20260512
Application Date
20260226

Claims (10)

  1. 1. The method for automatically joint debugging the interface of the different factories is characterized by being applied to the collaboration environment of the different factories and comprising the following steps: Receiving heterogeneous service messages from different manufacturers; preprocessing each heterogeneous service message respectively to obtain intermediate messages with uniform structures and consistent semantics; For each intermediate message, generating a structural fingerprint based on the key name of the intermediate message, generating a semantic fingerprint based on the key value of the intermediate message, and combining the structural fingerprint and the semantic fingerprint to obtain a composite fingerprint; and carrying out hierarchical logic retrieval and semantic reasoning based on the composite fingerprint to respectively obtain joint debugging templates corresponding to heterogeneous service messages of each manufacturer, and carrying out joint debugging on equipment interfaces of each manufacturer based on the joint debugging templates.
  2. 2. The method for automatically intermodulating different manufacturer interfaces according to claim 1, wherein the preprocessing each heterogeneous service message to obtain an intermediate message with uniform structure and consistent semantics respectively comprises: For each heterogeneous service message, converting the format in the heterogeneous service message into a unified general tree object to obtain a first message; converting the fields in the first message into standard field names by combining with a field semantic mapping table to obtain a second message; Reserving a field name of noise in the second message, and replacing the field value with a preset value to obtain a third message; and reordering the message data in the third message according to the ASCII code dictionary order to obtain an intermediate message.
  3. 3. The method for automatic joint debugging of different manufacturer interfaces according to claim 1, wherein generating a structural fingerprint based on the key name of the intermediate message comprises: Traversing from the root node of the intermediate message, and extracting the complete path key name of each leaf node; reordering the complete path key names of all the leaf nodes according to the ASCII code dictionary sequence; And splicing the ordered complete path key names into character strings, performing hash calculation to obtain hash values, and intercepting the first N bits of the hash values as structural fingerprints.
  4. 4. The method for automatic joint debugging of a different vendor interface according to claim 1, wherein generating a semantic fingerprint based on the key value of the intermediate message comprises: extracting a target key name matched with a key service field configuration table from the intermediate message; And normalizing the key values corresponding to all the target key names, splicing the normalized key values into character strings, and carrying out hash calculation on the character strings to obtain semantic fingerprints.
  5. 5. The method for automatic joint debugging of different manufacturer interfaces according to claim 1, wherein the step of combining the structural fingerprint and the semantic fingerprint to obtain a composite fingerprint comprises the steps of: respectively converting the structural fingerprint and the semantic fingerprint into hexadecimal character strings with fixed length to obtain a fixed-length structural fingerprint and a fixed-length semantic fingerprint; And splicing the fixed-length structural fingerprint and the fixed-length semantic fingerprint with a specific separator to generate a composite fingerprint.
  6. 6. The method for automatically associating the different manufacturer interfaces according to claim 1, wherein the performing hierarchical logic search and semantic reasoning based on the composite fingerprint to obtain association templates corresponding to heterogeneous service messages of each manufacturer respectively comprises: for each composite fingerprint, carrying out structural query in an RAG knowledge base by using the composite fingerprint to obtain a judging result; if the judging result is not hit or partially hit, vector retrieval is carried out in an RAG template library to obtain a plurality of candidate templates; if the highest similarity of the candidate templates is smaller than the preset similarity, a large language reasoning model is used for reasoning out the joint debugging template which is most matched with the heterogeneous service message from the plurality of candidate templates.
  7. 7. The method for automatic joint debugging of different manufacturer interfaces according to claim 6, wherein if the determination result is a miss or a partial hit, vector retrieval is performed in a RAG template library to obtain a plurality of candidate templates, comprising: acquiring a field value corresponding to a key field in the intermediate message; weighting the field values and splicing the field values into natural language texts, and generating semantic vectors based on the natural language texts; and carrying out similarity calculation on the semantic vector and templates in the RAG template library to obtain a plurality of candidate templates.
  8. 8. The method for automatically intermodulating a heterogeneous manufacturer interface according to claim 6, wherein if the highest similarity of the candidate templates is smaller than a preset similarity, a large language reasoning model is used to infer a intermodulating template that is most matched with a heterogeneous service message from a plurality of candidate templates, comprising: Combining the heterogeneous service message with a plurality of candidate templates to generate an enhanced prompt word, and taking the enhanced prompt word as the input of a large language reasoning model; The large language reasoning model takes the candidate templates as associational references, and identifies the difference points of the heterogeneous service messages and the candidate templates, so that the joint debugging templates which are most matched with the heterogeneous service messages are deduced.
  9. 9. The method for automatically intermodulating the interfaces of different manufacturers according to claim 1, wherein intermodulating the device interfaces of each manufacturer based on the intermodulating template comprises: For each manufacturer, based on the operation defined in the corresponding joint debugging template, a specific service interface is called for execution, and a return result is received; the returned result and the heterogeneous service message corresponding to the manufacturer are packaged into a reply message and sent to the corresponding manufacturer; And optimizing templates in the RAG template library based on feedback results of manufacturers.
  10. 10. An automatic joint debugging device for interfaces of different manufacturers, which is characterized by comprising: And a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor for executing the method of inter-vendor interface auto-tuning as recited in any one of claims 1-9.

Description

Method and device for automatic joint debugging of interfaces of different manufacturers Technical Field The invention relates to the technical field of data interaction testing, in particular to a method and a device for automatic joint debugging of interfaces of different manufacturers. Background In an operator network and a large-scale enterprise internet (Internet Technology, abbreviated as IT) system, a plurality of devices and systems of different factories are usually required to cooperate, that is, in a cooperation environment of different factories, a service system of a client company integrates a plurality of devices developed by different factories, and data interaction and cooperation are required to be performed between different devices, but communication protocols and interface standards adopted by the devices are different, so that joint debugging must be performed on interfaces of the devices before the service system is deployed and online, so that the devices can be correctly docked, stably communicate, and expected service functions are realized. The traditional interface joint debugging work mainly depends on manual work, and technicians need to read a large number of interface documents and manually write programs and test scripts. However, because of the wide variety of interface standards, data formats (such as JavaScript object notation (JavaScript Object Notation, abbreviated: JSON), extensible markup language (Extensible Markup Language, abbreviated: XML), and TLV (english: tag-Length-Value), etc. and communication protocols (hypertext transfer protocol (HypertextTransfer Protocol, abbreviated: HTTP), transmission control protocol (Transmission Control Protocol, abbreviated: TCP), and user datagram protocol (User Datagram Protocol, abbreviated: UDP), etc. of different manufacturers, manually performing interface interdebugging works has the problems that, first, manual adaptation and debugging take very long, resulting in inefficiency, second, once one party interface is changed, another party often needs to redevelop adaptation, resulting in difficult maintenance, third, manual configuration is prone to error, and difficult to cover all abnormal scenes, resulting in poor security and accuracy. In view of this, overcoming the drawbacks of the prior art is a problem to be solved in the art. Disclosure of Invention Aiming at the above defects or improvement demands of the prior art, the invention provides a method and a device for automatic joint debugging of interfaces of different manufacturers, which can carry out joint debugging of interfaces of different manufacturers in a cooperation environment of different manufacturers, and realize automatic data butt joint and joint debugging of cross-platform, cross-protocol and cross-system. The embodiment of the invention adopts the following technical scheme: in a first aspect, the present invention provides a method for automatic joint debugging of interfaces of different manufacturers, the method is applied to a collaboration environment of different manufacturers, and specifically, the method includes receiving heterogeneous service messages from different manufacturers; preprocessing each heterogeneous service message respectively to obtain intermediate messages with uniform structures and consistent semantics; For each intermediate message, generating a structural fingerprint based on the key name of the intermediate message, generating a semantic fingerprint based on the key value of the intermediate message, and combining the structural fingerprint and the semantic fingerprint to obtain a composite fingerprint; and carrying out hierarchical logic retrieval and semantic reasoning based on the composite fingerprint to respectively obtain joint debugging templates corresponding to heterogeneous service messages of each manufacturer, and carrying out joint debugging on equipment interfaces of each manufacturer based on the joint debugging templates. Preferably, the preprocessing is performed on each heterogeneous service message to obtain an intermediate message with uniform structure and consistent semantics, including: For each heterogeneous service message, converting the format in the heterogeneous service message into a unified general tree object to obtain a first message; converting the fields in the first message into standard field names by combining with a field semantic mapping table to obtain a second message; Reserving a field name of noise in the second message, and replacing the field value with a preset value to obtain a third message; and reordering the message data in the third message according to the ASCII code dictionary order to obtain an intermediate message. Preferably, generating a structural fingerprint based on the key name of the intermediate message includes: Traversing from the root node of the intermediate message, and extracting the complete path key name of each leaf node; reordering the complete p