WO2022151835A1 - 一种样例报文处理方法及装置 - Google Patents

一种样例报文处理方法及装置 Download PDF

Info

Publication number
WO2022151835A1
WO2022151835A1 PCT/CN2021/131669 CN2021131669W WO2022151835A1 WO 2022151835 A1 WO2022151835 A1 WO 2022151835A1 CN 2021131669 W CN2021131669 W CN 2021131669W WO 2022151835 A1 WO2022151835 A1 WO 2022151835A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
data
sample
pair
interface
Prior art date
Application number
PCT/CN2021/131669
Other languages
English (en)
French (fr)
Inventor
王映彤
林乐健
孙薇薇
郭杰
赵婷
Original Assignee
中国民航信息网络股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中国民航信息网络股份有限公司 filed Critical 中国民航信息网络股份有限公司
Priority to EP21919026.1A priority Critical patent/EP4280565A1/en
Publication of WO2022151835A1 publication Critical patent/WO2022151835A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present disclosure belongs to the technical field of message processing, and in particular, relates to a method and device for processing a sample message.
  • interface interaction between the interaction between information systems In order to solve the problem of isolated islands between information systems within an enterprise and the separation of front-end display and back-end services of a single application software, the current common practice is to use interface interaction between the interaction between information systems, the interaction between front-end display and back-end services form implementation, shielding implementation details.
  • interface As a data exchange method between application software and information systems, interface has become a common data interaction method. Its corresponding core services include Web services and RESTful services.
  • Web services use XML (Extensible Markup Language, Extensible Markup Language) ) form messages to provide services to the outside world; RESTful services are based on HTTP (Hypertext Transfer Protocol), using URL (Uniform Resource Locator, Uniform Resource Locator) to represent resources, and actions in HTTP to represent operations on resources, JSON (JavaScript Object Notation) , JS object notation) form messages for data exchange.
  • HTTP Hypertext Transfer Protocol
  • URL Uniform Resource Locator
  • JSON JavaScript Object Notation
  • JS object notation form messages for data exchange.
  • the core content involved in an interface is a data packet.
  • Each interface corresponds to a data packet pair, and the data packet pair includes a request packet and a response packet. Due to the different functions of each interface, there are different combinations of parameter fields in the request packets corresponding to different interfaces, and the response packets will also return different results due to different logics. Therefore, in order to better manage and use the interface for data exchange , the sample packet data called by the interface can be managed through an interface management system.
  • an interface contains at least one sample packet pair (a form of sample packet data), each Each sample message pair represents a processing logic relationship, and each sample message pair includes a sample request message and a sample response message, which are displayed by the sample request message and sample response message.
  • the request message and response message transmitted through the interface during the interface process that is, the sample request message and the sample response message, are used as the call examples provided to the callee of the interface, which can make the callee more intuitive. Learn how to use the sample request message and sample response message interface.
  • the parameter fields in the sample request message and the sample response message are constructed and filled by the user, but whether it is a sample request message or a sample response message, a single parameter field in the message needs to reflect the real business logic. Therefore, the data value of any parameter field needs to be consistent with the actual data, and a large amount of actual data needs to be manually constructed in the process of writing the sample request message and the sample response message; Multiple parameter fields in a message are related, and the relationship between multiple fields needs to be manually considered in the process of constructing actual data and writing, which makes it easy to make mistakes in the process of forming sample request message and sample response message , reducing the development efficiency of sample packet pairs.
  • the purpose of the present disclosure is to provide a sample packet processing method and device, so as to improve the development efficiency of sample packet pairs.
  • the present disclosure provides a sample packet processing method, the method comprising:
  • the additional data is used to indicate the interface to which the sample message pair belongs and the purpose of the sample message pair;
  • identification data corresponding to the interface data, where the identification data is used to point to a request message and a response message corresponding to the message version data transmitted by the interface;
  • identification data matches the historical identification data, determine that the request message and the response message corresponding to the message version data are historical sample message pairs;
  • the identification data does not match the historical identification data, it is determined that the request message and the response message corresponding to the message version data are a new sample message pair.
  • the present disclosure provides a sample message processing apparatus, the apparatus comprising:
  • an acquisition unit used to acquire the interface data generated in the process of data interaction through the interface
  • a determining unit configured to determine additional data corresponding to the interface data, where the additional data is used to indicate the interface to which the sample message pair belongs and the purpose of the sample message pair;
  • a generating unit configured to generate, based on the additional data, identification data corresponding to the interface data, where the identification data is used to point to the request message and the response message corresponding to the message version data transmitted by the interface;
  • the processing unit is used to determine that the request message and the response message corresponding to the message version data are a pair of historical sample messages if the identification data matches the historical identification data, and if the identification data matches the historical If the identification data does not match, it is determined that the request message and the response message corresponding to the message version data are a new sample message pair.
  • the present disclosure provides an electronic device, comprising:
  • a memory for storing the processor-executable instructions
  • the processor is configured to execute the instruction, so as to implement the above-mentioned sample packet processing method.
  • the present disclosure provides a computer storage medium, when a program in the computer storage medium is executed by a processor of an electronic device, the electronic device can execute the above-mentioned sample message processing method.
  • the above sample packet processing method and device obtain interface data generated in the process of data exchange through the interface, determine additional data corresponding to the interface data, and the additional data is used to indicate the interface to which the sample packet pair belongs and the sample packet pair.
  • the identification data corresponding to the interface data is generated, and the identification data is used to point to the request message and response message corresponding to the version data of the message transmitted by the interface; if the identification data matches the historical identification data, the message version data is determined.
  • the corresponding request message and response message are historical sample message pairs. If the identification data does not match the historical identification data, it is determined that the request message and response message corresponding to the message version data are new sample message pairs.
  • a sample message pair can be formed based on the interface data generated during the data interaction process through the interface.
  • the interface data generated during the data interaction process through the interface is the data generated during the real interaction process, which can reflect the real business logic and save the need for manual construction.
  • the process of reflecting the actual data of the real business logic improves the development efficiency of the sample message pair, and because the interface data generated in the process of data interaction through the interface can reflect the real business logic, the accuracy of the sample message pair is improved.
  • FIG. 1 is a flowchart of a sample packet processing method provided by an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of a calling interface provided by an embodiment of the present disclosure
  • FIG. 3 is a flowchart of another sample packet processing method provided by an embodiment of the present disclosure.
  • FIG. 5 is a schematic structural diagram of a sample packet processing apparatus provided by an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of another sample packet processing apparatus provided by an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • the term “including” and variations thereof are open-ended inclusions, ie, "including but not limited to”.
  • the term “based on” is “based at least in part on.”
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one additional embodiment”; the term “some embodiments” means “at least some embodiments”. Relevant definitions of other terms will be given in the description below.
  • FIG. 1 shows an optional flow of a data processing method provided by an embodiment of the present disclosure, which may include the following steps:
  • interface data for different services can be generated during the data interaction process.
  • the interface provides Web services and RESTful services.
  • Interface data is generated during at least one of the service and the RESTful service.
  • the interface data includes at least: request message and response message.
  • the request message and response message are used as message pairs, which are used in the process of data exchange through the interface.
  • One message pair corresponds to one purpose.
  • Web services are also RESTful services.
  • this embodiment can pass but not It is limited to the use of parameter fields and data values in the request message and response message to distinguish message pairs.
  • the interface data can be stored but is not limited to being stored in the log file, because the log file can record the events and messages that occur during the operation of the information system, application software, etc., and the interface data is the operation process of the information system and application software.
  • a kind of data generated in the network so the interface data can be stored in the log file, the corresponding log file can be stored but not limited to be stored in the network interconnection device, such as the log file can be stored in at least one gateway, through multiple The gateways store log files in a distributed manner to obtain log files from multiple gateways in parallel, and then extract interface data from the log files.
  • the additional data is used to indicate the interface to which the sample message pair belongs and the purpose of the sample message pair, that is, the additional data is used to indicate which interface the sample message pair belongs to (meaning which interface the sample message pair belongs to). interface interaction) and what the sample message pair does, such as whether the sample message pair provides a Web service or a RESTful service.
  • the interface data is generated in the process of data interaction through the interface, then the interface data can include the identification information of the interface to indicate which interface the request message and the response message belong to, because one interface may interact differently type of request message and response message, so the interface data also includes the information that distinguishes the request message and the response message.
  • the interface data also includes: the entry address information, the entry address information can be but not limited to the request message
  • the sender address information corresponding to any packet in the response packet it can be known that the interface data at least includes: the identification information of the interface, the entry address information, the request packet and the response packet.
  • the identification information, entry address information, request message, and response message of the above-mentioned interfaces can be used to distinguish different types of message pairs in different interfaces, and can indicate the interface to which the message pair belongs and the purpose of the message pair. Therefore, this implementation
  • the additional data can be determined based on the identification information, entry address information, request message and response message of the interface in the interface data, wherein the determination is based on the identification information, entry address information, request message and response message of the interface in the interface data.
  • Possible ways of additional data include but are not limited to the following possible ways:
  • the identification information of the interface, the entry address information, the request message and the response message in the interface data are determined as additional data;
  • Another feasible way extract the identification information, entry address information, request message and response message of the interface from the interface data; perform feature extraction on the request message and the response message respectively to obtain the first feature corresponding to the request message data and the second feature data corresponding to the response message; extract the message version data from the response message; determine the identification information of the interface, the entry address information, the first feature data, the second feature data and the message version data as additional data.
  • the first feature data, the second feature data, and the message version data are used to determine a message pair that includes a request message and a response message.
  • the message pair corresponds to one purpose, but the same interface corresponds to messages with different entry address information.
  • the identification information of the interface to which the interface belongs and the entry address information used to determine the entry are imported.
  • the request message and the response message are used as a message pair, and the message version data is carried in the response message to indicate the version of the response message and the request message with the same sender.
  • the message version data can be but not. It is limited to the version number, and the version number indicates the version to which the request message and the response message belong.
  • the request packet does not carry the packet version data (such as version number), and the response packet carries the packet version data.
  • the entry address information can be, but not limited to, URL (Uniform Resource Locator, Uniform Resource Locator).
  • URL Uniform Resource Locator
  • Uniform Resource Locator Uniform Resource Locator
  • a service has released three versions of V1.0, V2.0, and V3.0, and the contents of the three versions will be different.
  • electronic devices such as mobile phones, iphone5, iphone6, and iphone7 are three models.
  • Mobile phones there will be some differences between these three models of mobile phones, such as hardware differences such as processors, screens and chips, so these three models of mobile phones are regarded as three versions of mobile phones.
  • the request packet may request to switch the version, and the corresponding response packet will carry the packet version data after the switch.
  • the identification data is obtained based on the additional data and a preset identification generation algorithm, and the preset identification generation algorithm is used to generate a hash code.
  • the preset identification generation algorithm is invoked to process the additional data , which generates a hash code of the additional data (a representation of the identification data).
  • the preset identifier generation algorithm may be, but is not limited to, MD (Message-Digest Algorithm, message digest algorithm).
  • MD Message-Digest Algorithm, message digest algorithm
  • the MD is called to process the additional data and generate a hash code.
  • One form of the additional data may be, the additional data includes: identification information of the interface, entry address information, first feature data, second feature data and message version data; another form of the additional data may be, The additional data includes: the identification information of the interface, the entry address information, the request message and the response message.
  • the historical identification data is the identification data obtained before the currently generated identification data, in order to determine whether the currently obtained request message and the response message are the same as the previously obtained request message by whether the identification data matches the historical identification data.
  • the message and response message match in which the previously obtained request message and response message have been obtained before the current time (at least not earlier than the time when the interface data is currently obtained, and not later than the time when the identification data is generated)
  • the request message and the response message mean that the two messages have been called through the interface before the current time, so that the historical identification data of the two messages can be obtained before the current time.
  • the identification data matches the historical identification data, it means that the identification data is the same as the historical identification data, because the message pair including the request message and the response message uses the same method to obtain the identification data, so if the identification data matches the historical identification data, it means that the identification data is obtained.
  • the additional data of the identification data is the same as the additional data obtained from the historical identification data, which means that the data in the interface data corresponding to the two additional data are the same, so it is determined that the request message and the response message corresponding to the message version data are at the current time.
  • the request message and the response message that have been obtained before, so that the request message and the response message corresponding to the message version data are determined as the historical sample message pair.
  • the identification data does not match the historical identification data, it means that the identification data is different from the historical identification data, which means that the data in the interface data corresponding to the two additional data are different, and thus the request message and the response message corresponding to the message version data are determined. It is a request message and a response message that have not been obtained before the current time, so that the request message and the response message corresponding to the message version data are determined as a new sample message pair.
  • the interface data generated in the process of data exchange through the interface is obtained, the additional data corresponding to the interface data is determined, and the additional data is used to indicate the interface to which the sample packet belongs and the purpose of the sample packet pair;
  • the identification data corresponding to the interface data is generated, and the identification data is used to point to the request message and response message corresponding to the version data of the message transmitted by the interface; if the identification data matches the historical identification data, determine the corresponding message version data.
  • the request message and the response message are historical sample message pairs. If the identification data does not match the historical identification data, it is determined that the request message and response message corresponding to the message version data are new sample message pairs.
  • the interface data generated in the process of data interaction through the interface forms a sample message pair
  • the interface data generated in the process of data interaction through the interface is the data generated in the real interaction process, which can reflect the real business logic and saves the need for manual construction to reflect the real
  • the process of actual data of business logic improves the development efficiency of sample message pairs, and because the interface data generated in the process of data interaction through interfaces can reflect real business logic, the accuracy of sample message pairs is improved.
  • FIG. 3 shows a flowchart of another sample packet processing method provided by an embodiment of the present disclosure, which may include the following steps:
  • the additional data is used to indicate the interface to which the sample packet pair belongs and the purpose of the sample packet pair, that is, the additional data is used to indicate which interface the sample packet pair belongs to (meaning which interface the sample packet pair belongs to). interface interaction) and what the sample message pair does, such as whether the sample message pair provides a Web service or a RESTful service.
  • the request message, the response message and the generated identification data in the interface data are stored in the message set, and the request message, the response message and the identification data are stored in a corresponding form, so as to point to a pair of request messages through the identification data and response message, the request message and response message stored in the message set are regarded as a sample message pair, and the identification data corresponding to the sample message pair is called historical identification data.
  • the request message and response message corresponding to the currently obtained message version data are historical sample message pairs, and the activity of the sample message pair pointed to by the historical sample message pair in the message set can be updated.
  • the activity level of the sample packet pair is used to indicate whether the sample packet pair is still valid within the preset time range.
  • the activity level is used to indicate whether the sample packet pair is still in use within the preset time range.
  • the degree of use, the preset time range can be, but is not limited to, relative to the current time, starting from the current time as the end time, moving the preset time forward from the current time to obtain the start time, and determining the preset time from the start time to the end time Whether the sample message pair is still in use within the time range and indicates the degree of its use.
  • the activity of the sample packet pair can be represented by, but not limited to, a numerical value. If it is determined that the request packet and the response packet corresponding to the packet version data are historical sample In this historical sample message, the activity level of the pointed sample message pair is added. For example, the activity level is increased by one. The higher the value, the higher the usage level. On the contrary, the lower the value, the lower the usage level.
  • the request message and the response message corresponding to the message version data are the historical sample message pair, it means that the historical sample message pair is stored in the message set, and the obtained request message and response message at this time The number of message pairs in the message set can be reduced without storing in the message set.
  • the new sample message pair is used as the message pair.
  • the sample message pairs in the message set are stored in the message set, and the identification data of the new sample message pair can also be stored in the message set, so as to perform comparison and matching after the identification data is subsequently acquired.
  • the sample message archiving instruction is used to file the sample message pairs in the message set.
  • the task will perform archiving processing every preset archiving time, and correspondingly, it will trigger a response to the sample message archiving command every preset archiving time. Therefore, if the current time reaches the preset archiving time, it will trigger the response sample message.
  • Archive instructions can also be triggered in other ways.
  • the sample packet archiving instruction is triggered when the device implementing the sample packet processing method is in an idle period. The idle period can be determined by, but not limited to, the performance of the device. , such as processor usage and memory usage, etc.
  • valid sample message pairs and invalid sample message pairs can be determined according to the message version data of the sample message pairs in the message set and the activity of the sample message pairs.
  • the text is right, one way to determine is as follows:
  • the current time reaches the preset archiving time, trigger the response to the sample packet archiving instruction; obtain the packet version data of the sample packet pair in the sample set; if the packet version data of the sample packet pair indicates the sample packet pair For the latest sample packet pair, determine the latest sample packet pair as a valid sample packet pair; if the packet version data of the sample packet pair indicates that the sample packet pair is not the latest sample packet pair , to obtain the activity of the sample packet pair; if the activity of the sample packet pair indicates that the activity of the sample packet pair has increased within the preset time range before the current time, it is determined that the sample packet pair is valid Sample message pair. If the activity of the sample message pair indicates that the activity of the sample message pair does not increase within the preset time range before the current time, the sample message pair is determined to be an invalid sample message pair.
  • the latest sample message pair can be regarded as the sample message pair of the latest version.
  • the version of the application includes: 1.0, 2.0, 4.0, then 4.0 is the latest application, and the others are not the latest application.
  • the packet version data of the sample packet pair indicates that the sample packet pair is the latest sample packet pair, it means that the sample packet pair is the latest version of the sample packet pair currently applied, and it is directly determined as A valid sample packet pair, otherwise, the sample packet pair that is not the latest version will be further determined based on the activity.
  • a valid sample message pair indicates that the sample message pair is still in use, and the valid sample message pair can be maintained in a valid state to continue to use the valid sample message pair; an invalid sample message pair indicates that the sample message pair is valid. If the sample message pair is very likely to be unused, the invalid sample message pair can be controlled to be in an invalid state to indicate that the invalid sample message pair can be deleted.
  • the above-mentioned sample packet processing method responds to the sample packet archiving instruction, and according to the packet version data of the sample packet pair in the packet set and the activity of the sample packet pair, files the sample packet in the packet set.
  • the message pair is archived to realize the automatic classification of the sample message pair in the message set, eliminating the manual classification process and improving the processing efficiency.
  • the feature extraction process of the above request message and response message is shown in FIG. 4 , and may include the following steps:
  • the message structure corresponding to the request message and the response message is a key-value pair structure, extract the key in the key-value pair structure.
  • the expression form of the key-value pair structure is ⁇ key:value ⁇ , the key is the key, and the value is the value, then the key is extracted.
  • the message structure corresponding to the request message and the response message is an array structure and the structure in the array is parsed, extract the keys in the dictionary structure when the structure in the array is a dictionary structure, and extract when the structure in the array is a numerical array structure
  • extraction is prohibited when the structure in the array is a string array structure.
  • the keys in the key-value pair structure are deduplicated and extracted.
  • Whether the message structure corresponding to the request message and the response message is an array structure can be determined by the processSwitch (processing switch) value of the interface metadata; if the value of processSwitch is true, the structure in the array is determined to be parsed. If it is false, it is determined not to parse the structure in the array.
  • processSwitch processing switch
  • the representation of the dictionary structure is ⁇ key:[ ⁇ key1:value,key2:vlue2 ⁇ ] ⁇ , the key is the key, and [ ⁇ key1:value,key2:vlue2 ⁇ ] is the value, then the key key in the dictionary structure is extracted;
  • the representation form of the array structure is ⁇ key: [1234,1215] ⁇ , key is the key, [1234,1215] is the numerical array, here is just an example, extract the key key in the numerical array structure, ignore the numerical array; string
  • string The expression form of the array structure is ⁇ key: ["aac", "sdef"] ⁇ , key is the key, and ["aac", “sdef”] is the string array, here is only an example, it is forbidden to extract the string array;
  • the expression form of the key-value pair structure is ⁇ key:["key1":value,”key2”:value] ⁇ . The keys in the key-value pair structure are deduplicated, and then the deduplicated keys are extracted
  • the 304 Sort the content extracted from the request message to obtain the first feature data, and sort the content extracted from the response message to obtain the second feature data. Due to the characteristics of JSON packets, the contents of the request packet and the response packet may be reversed. For example, the content of one packet is ⁇ a:1,b:2,c:3 ⁇ , and the content of another packet is ⁇ c:3,a:1,b:2 ⁇ , the contents of these two packets are the same but are reversed to a certain extent (that is, the ordering is different). Therefore, in this embodiment, the request message and the response message need to be ordered. , to ensure the consistency of the content in the message. In addition, after sorting, the packets with the same content can also be deduplicated, so as to prevent the occurrence of the packets with the same content.
  • the above feature extraction process performs different processing for different message structures, so as to automatically extract the content of the request message and the response message, obtain their corresponding feature data, and realize the automatic extraction of feature data.
  • each block in the flowcharts may represent a module, segment, or portion of code, which contains one or more options for implementing the specified logical function(s) Execute the instruction.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the flowchart illustrations, and combinations of blocks in the flowchart illustrations can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or by special purpose hardware and computer A combination of instructions is implemented.
  • Computer program code for performing operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and This includes conventional procedural programming languages - such as the "C" language or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through Internet connection).
  • LAN local area network
  • WAN wide area network
  • the embodiments of the present disclosure further provide a sample packet processing apparatus, the optional structure of which is shown in FIG. 40.
  • the acquiring unit 10 is used for acquiring interface data generated during the data exchange process through the interface; the interface data at least includes: a request message and a response message, the request message and the response message are used as a message pair, and the data interaction is performed through the interface.
  • a message pair corresponds to a purpose, such as providing a Web service or a RESTful service through a message pair.
  • the processing logic relationship of the message pair will also be different, and the parameter fields and data values in the corresponding message pair will also be different. Therefore, this embodiment can pass but not It is limited to the purpose of distinguishing message pairs by the parameter fields and data values in the request message and the response message. For details, please refer to the above method embodiments.
  • the determination unit 20 is used to determine the additional data corresponding to the interface data, the additional data is used to indicate the interface to which the sample message pair belongs and the purpose of the sample message pair, that is, the additional data is used to indicate which interface the sample message pair belongs to ( means through which interface to interact) and what the sample message pair does, such as whether the sample message pair provides a Web service or a RESTful service.
  • the interface data at least includes: the identification information of the interface, the entry address information, the request message and the response message, and the corresponding feasible ways to determine the additional data include but are not limited to the following feasible ways:
  • the identification information of the interface, the entry address information, the request message and the response message in the interface data are determined as additional data;
  • Another feasible way extract the identification information, entry address information, request message and response message of the interface from the interface data; perform feature extraction on the request message and the response message respectively to obtain the first feature corresponding to the request message data and the second feature data corresponding to the response message; extract the message version data from the response message; determine the identification information of the interface, the entry address information, the first feature data, the second feature data and the message version data as additional data.
  • the first feature data, the second feature data, and the message version data are used to determine a message pair that includes a request message and a response message.
  • the message pair corresponds to one purpose, but the same interface corresponds to messages with different entry address information.
  • the identification information of the interface to which the interface belongs and the entry address information used to determine the entry are imported.
  • the process of performing feature extraction on the request message and the response message respectively to obtain the first feature data corresponding to the request message and the second feature data corresponding to the response message is as follows:
  • the message structure corresponding to the request message and the response message is a key-value pair structure
  • extract the key in the key-value pair structure If the message structure corresponding to the request message and the response message is a key-value pair structure, extract the key in the key-value pair structure; if the message structure corresponding to the request message and the response message is an array structure and the structure in the array is parsed, Then extract the keys in the dictionary structure when the structure in the array is a dictionary structure, extract the keys when the structure in the array is a numeric array structure, and prohibit extraction when the structure in the array is a string array structure, and the structure in the array is a key-value pair structure Deduplication extraction is performed on the keys in the key-value pair structure; if the message structure corresponding to the request message and the response message is an array structure and it is forbidden to parse the structure in the array, the extraction is prohibited; the data extracted from the request message The content is sorted to obtain the first characteristic data, and the content extracted from the response message is sorted to obtain the second characteristic
  • the generating unit 30 is configured to generate, based on the additional data, identification data corresponding to the interface data, and the identification data is used to point to the request message and the response message corresponding to the message version data transmitted by the interface.
  • the identification data is obtained based on the additional data and a preset identification generation algorithm, and the preset identification generation algorithm is used to generate a hash code.
  • the preset identification generation algorithm is invoked to process the additional data , which generates a hash code of the additional data (a representation of the identification data).
  • the processing unit 40 is used to determine that the request message and the response message corresponding to the message version data are historical sample message pairs if the identification data matches the historical identification data, and if the identification data does not match the historical identification data, It is determined that the request message and the response message corresponding to the message version data are new sample message pairs.
  • the historical identification data is the identification data obtained before the currently generated identification data, in order to determine whether the currently obtained request message and the response message are the same as the previously obtained request message by whether the identification data matches the historical identification data.
  • the message and response message match in which the previously obtained request message and response message have been obtained before the current time (at least not earlier than the time when the interface data is currently obtained, and not later than the time when the identification data is generated)
  • the request message and the response message mean that the two messages have been called through the interface before the current time, so that the historical identification data of the two messages can be obtained before the current time.
  • the identification data matches the historical identification data, it means that the identification data is the same as the historical identification data, because the message pair including the request message and the response message uses the same method to obtain the identification data, so if the identification data matches the historical identification data, it means that the identification data is obtained.
  • the additional data of the identification data is the same as the additional data obtained from the historical identification data, which means that the data in the interface data corresponding to the two additional data are the same, so it is determined that the request message and the response message corresponding to the message version data are at the current time.
  • the request message and the response message that have been obtained before, so that the request message and the response message corresponding to the message version data are determined as the historical sample message pair.
  • the identification data does not match the historical identification data, it means that the identification data is different from the historical identification data, which means that the data in the interface data corresponding to the two additional data are different, and thus the request message and the response message corresponding to the message version data are determined. It is a request message and a response message that have not been obtained before the current time, so that the request message and the response message corresponding to the message version data are determined as a new sample message pair.
  • the above-mentioned sample message processing device obtains the interface data generated in the process of data exchange through the interface, determines additional data corresponding to the interface data, and the additional data is used to indicate the interface to which the sample message pair belongs and the purpose of the sample message pair; Based on the additional data, the identification data corresponding to the interface data is generated, and the identification data is used to point to the request message and response message corresponding to the version data of the message transmitted by the interface; if the identification data matches the historical identification data, determine the corresponding message version data.
  • the request message and the response message are historical sample message pairs. If the identification data does not match the historical identification data, it is determined that the request message and response message corresponding to the message version data are new sample message pairs.
  • the interface data generated in the process of data interaction through the interface forms a sample message pair
  • the interface data generated in the process of data interaction through the interface is the data generated in the real interaction process, which can reflect the real business logic and saves the need for manual construction to reflect the real
  • the process of actual data of business logic improves the development efficiency of sample message pairs, and because the interface data generated in the process of data interaction through interfaces can reflect real business logic, the accuracy of sample message pairs is improved.
  • FIG. 6 it shows an optional structure of another sample packet processing apparatus provided by an embodiment of the present disclosure, which may further include: an update unit 50 , a storage unit 60 , and an archive unit 70 .
  • the updating unit 50 is used to update the activity of the sample message pair pointed to by the historical sample message pair in the message set if the request message and the response message corresponding to the message version data are historical sample message pairs;
  • the request message, the response message and the generated identification data in the interface data are stored in the message set, and the request message, the response message and the identification data are stored in a corresponding form, so as to point to a pair of request messages through the identification data and response message, the request message and response message stored in the message set are regarded as a sample message pair, and the identification data corresponding to the sample message pair is called historical identification data.
  • the activity level of the sample packet pair is used to indicate whether the sample packet pair is still valid within the preset time range.
  • the activity level is used to indicate whether the sample packet pair is still in use within the preset time range.
  • the degree of use, the preset time range can be, but is not limited to, relative to the current time, starting from the current time as the end time, moving the preset time forward from the current time to obtain the start time, and determining the preset time from the start time to the end time Whether the sample message pair is still in use within the time range and indicates the degree of its use.
  • the activity of the sample packet pair can be represented by, but not limited to, a numerical value. If it is determined that the request packet and the response packet corresponding to the packet version data are historical sample In this historical sample message, the activity level of the pointed sample message pair is added. For example, the activity level is increased by one. The higher the value, the higher the usage level. On the contrary, the lower the value, the lower the usage level.
  • the request message and the response message corresponding to the message version data are the historical sample message pair, it means that the historical sample message pair is stored in the message set, and the obtained request message and response message at this time The number of message pairs in the message set can be reduced without storing in the message set.
  • the storage unit 60 is configured to store the new sample message pair as a sample message pair in the message set in the message if the request message and the response message corresponding to the message version data are new sample message pairs. In the collection; if the request message and response message corresponding to the message version data are new sample message pairs, it means that the new sample message pair is not stored in the message collection. In this case, the new sample message The pair is stored in the message set as a sample message pair in the message set, and the identification data of the new sample message pair can also be stored in the message set, so as to compare and match after the identification data is obtained subsequently .
  • the archiving unit 70 is configured to respond to the sample message archiving instruction, and according to the message version data of the sample message pair in the message set and the activity of the sample message pair, file the sample message in the message set. Archive for processing.
  • the sample message archiving instruction is used to file the sample message pairs in the message set.
  • the task will perform archiving processing every preset archiving time, and correspondingly, it will trigger a response to the sample message archiving command every preset archiving time. Therefore, if the current time reaches the preset archiving time, it will trigger the response sample message.
  • Archive instructions can also be triggered in other ways.
  • the sample packet archiving instruction is triggered when the device implementing the sample packet processing method is in an idle period. The idle period can be determined by, but not limited to, the performance of the device. , such as processor usage and memory usage, etc.
  • the archiving unit 70 may determine the valid sample message pair and the invalid sample message pair according to the message version data of the sample message pair in the message set and the activity of the sample message pair A sample packet pair is determined as follows:
  • the current time reaches the preset archiving time, trigger the response to the sample packet archiving instruction; obtain the packet version data of the sample packet pair in the sample set; if the packet version data of the sample packet pair indicates the sample packet pair For the latest sample packet pair, determine the latest sample packet pair as a valid sample packet pair; if the packet version data of the sample packet pair indicates that the sample packet pair is not the latest sample packet pair , to obtain the activity of the sample packet pair; if the activity of the sample packet pair indicates that the activity of the sample packet pair has increased within the preset time range before the current time, it is determined that the sample packet pair is valid Sample message pair. If the activity of the sample message pair indicates that the activity of the sample message pair does not increase within the preset time range before the current time, the sample message pair is determined to be an invalid sample message pair.
  • the above sample message processing device responds to the sample message archiving instruction, and according to the message version data of the sample message pair in the message set and the activity degree of the sample message pair, files the sample message in the message set.
  • the message pair is archived to realize the automatic classification of the sample message pair in the message set, eliminating the manual classification process and improving the processing efficiency.
  • the units involved in the embodiments of the present disclosure may be implemented in a software manner, and may also be implemented in a hardware manner. Wherein, the name of the unit does not constitute a limitation of the unit itself under certain circumstances.
  • the first determination unit can also be described as "After the first clustering control unit instructs the completion of one clustering of the data set to be processed, A unit that determines the amount of data in the dataset to be processed that is not joined to an existing cluster".
  • exemplary types of hardware logic components include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chips (SOCs), Complex Programmable Logical Devices (CPLDs) and more.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs Systems on Chips
  • CPLDs Complex Programmable Logical Devices
  • FIG. 7 it shows a schematic structural diagram of an electronic device 300 suitable for implementing an embodiment of the present disclosure.
  • Electronic devices in embodiments of the present disclosure may include, but are not limited to, mobile terminals such as notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), etc., and stationary terminals such as desktop computers and the like.
  • the electronic device shown in FIG. 7 is only an example, and should not impose any limitation on the function and scope of use of the embodiments of the present disclosure.
  • the electronic device 300 may include a processor (eg, a central processing unit, a graphics processor, etc.) 301, which may execute executable instructions stored in the memory 302 to implement the above-described sample message processing method.
  • the memory 302 may be, but is not limited to, at least one of read only memory (ROM) and random access memory (RAM).
  • the processor 301 and the memory 302 may be connected through a bus 303 for communication through the bus 303 .
  • the electronic device 300 may also include an input/output (I/O) interface 304 , which is also connected to the bus 303 .
  • I/O input/output
  • the following devices may be connected to the I/O interface 304: input devices 305 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, vibration An output device 306 of a computer, etc.; a storage device 307 such as a magnetic tape, a hard disk, etc., and a communication device 308 are included.
  • Communication means 308 may allow electronic device 300 to communicate wirelessly or by wire with other devices to exchange data. While FIG. 7 illustrates electronic device 300 having various means, it should be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
  • Embodiments of the present disclosure also provide a computer storage medium, when a program in the computer storage medium is executed by a processor of an electronic device, the electronic device can execute the above-mentioned sample packet processing method.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal in baseband or propagated as part of a carrier wave with a computer-readable program embodied therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, electrical wire, optical fiber cable, RF (radio frequency), etc., or any suitable combination of the foregoing.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or may exist alone without being assembled into the electronic device.
  • embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from a network via a communication device, or installed from a memory.
  • the computer program is executed by the processor, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
  • a sample packet processing method includes:
  • identification data corresponding to the interface data, where the identification data is used to point to a request message and a response message corresponding to the message version data transmitted by the interface;
  • identification data matches the historical identification data, determine that the request message and the response message corresponding to the message version data are historical sample message pairs;
  • the identification data does not match the historical identification data, it is determined that the request message and the response message corresponding to the message version data are a new sample message pair.
  • the method further includes:
  • request message and the response message corresponding to the message version data are historical sample message pairs, update the activity of the sample message pair pointed to by the historical sample message pair in the message set;
  • the new sample message pair is stored as a sample message pair in the message set in the in the message collection;
  • the sample message pair in the message set is processed. Archive processing.
  • the response to the sample packet archiving instruction, according to the packet version data of the sample packet pair in the packet set and the activity of the sample packet pair, the The sample message pair in the message set for archiving processing includes:
  • the message version data of the sample message pair indicates that the sample message pair is the latest sample message pair, determine that the latest sample message pair is a valid sample message pair;
  • the sample message pair is determined to be a valid sample message If the activity of the sample message pair indicates that the activity of the sample message pair does not increase within the preset time range before the current time, it is determined that the sample message pair is invalid Sample message pair.
  • the determining the additional data corresponding to the interface data includes:
  • the identification information of the interface, the entry address information, the first characteristic data, the second characteristic data and the packet version data are determined as additional data.
  • the generating, based on the additional data, the identification data corresponding to the interface data includes:
  • a hash code is generated based on the identification information of the interface, the entry address information, the first characteristic data, the second characteristic data, and the packet version data.
  • the feature extraction is performed on the request message and the response message, respectively, to obtain first feature data corresponding to the request message and first feature data corresponding to the response message.
  • the second characteristic data includes:
  • the message structure corresponding to the request message and the response message is a key-value pair structure, extract the key in the key-value pair structure;
  • the key in the dictionary structure are extracted, and the keys in the dictionary structure are extracted when the structure in the array is a dictionary structure. Extracting keys when the internal structure is a numerical array structure, prohibiting extraction when the internal structure of the array is a string array structure, and deduplicating and extracting keys in the key-value pair structure when the internal structure of the array is a key-value pair structure;
  • the message structure corresponding to the request message and the response message is an array structure and it is forbidden to parse the structure in the array, then extraction is forbidden;
  • the content extracted from the request message is sorted to obtain the first feature data, and the content extracted from the response message is sorted to obtain the second feature data.
  • An embodiment of the present disclosure further provides an apparatus for processing a sample packet, and the apparatus includes:
  • an acquisition unit used to acquire the interface data generated in the process of data interaction through the interface
  • a determining unit configured to determine additional data corresponding to the interface data, where the additional data is used to indicate the interface to which the sample message pair belongs and the purpose of the sample message pair;
  • Generation unit for generating the identification data corresponding to the interface data based on the additional data, and the identification data is used to point to the request message and the response message corresponding to the message version data of the interface transmission;
  • the processing unit is used to determine that the request message and the response message corresponding to the message version data are a pair of historical sample messages if the identification data matches the historical identification data, and if the identification data matches the historical If the identification data does not match, it is determined that the request message and the response message corresponding to the message version data are a new sample message pair.
  • the apparatus further includes:
  • the updating unit is configured to update the sample message pair pointed to by the historical sample message pair in the message set if the request message and the response message corresponding to the message version data are historical sample message pairs. Activity;
  • a storage unit configured to use the new sample message pair as a sample message in the message set if the request message and the response message corresponding to the message version data are new sample message pairs pairs are stored in the message set;
  • the archiving unit is used for responding to the sample message archiving instruction, according to the message version data of the sample message pair in the message set and the activity of the sample message pair, for the sample message pair in the message set.
  • Example message pairs are archived.
  • the filing unit is configured to:
  • the message version data of the sample message pair indicates that the sample message pair is the latest sample message pair, determine that the latest sample message pair is a valid sample message pair;
  • the sample message pair is determined to be a valid sample message If the activity of the sample message pair indicates that the activity of the sample message pair does not increase within the preset time range before the current time, it is determined that the sample message pair is invalid Sample message pair.
  • the determining unit is configured to extract the identification information, the entry address information, the request message and the response message of the interface from the interface data; Extract the feature from the message and the response message to obtain the first feature data corresponding to the request message and the second feature data corresponding to the response message; extract message version data from the response message;
  • the identification information of the interface, the entry address information, the first feature data, the second feature data, and the packet version data are determined as additional data.
  • the generating unit is configured to, based on the identification information of the interface, the entry address information, the first feature data, the second feature data, and the message Version data, generate a hash code.
  • obtaining, by the determining unit, the first feature data corresponding to the request message and the second feature data corresponding to the response message includes:
  • the message structure corresponding to the request message and the response message is a key-value pair structure, extract the key in the key-value pair structure;
  • the key in the dictionary structure are extracted, and the keys in the dictionary structure are extracted when the structure in the array is a dictionary structure. Extracting keys when the internal structure is a numerical array structure, prohibiting extraction when the internal structure of the array is a string array structure, and deduplicating and extracting keys in the key-value pair structure when the internal structure of the array is a key-value pair structure;
  • the message structure corresponding to the request message and the response message is an array structure and it is forbidden to parse the structure in the array, the extraction is forbidden;
  • the content extracted from the request message is sorted to obtain the first feature data, and the content extracted from the response message is sorted to obtain the second feature data.
  • Embodiments of the present disclosure also provide an electronic device, including:
  • memory for storing instructions executable by the processor
  • the processor is configured to execute the instruction, so as to implement the above-mentioned sample packet processing method.
  • Embodiments of the present disclosure also provide a computer storage medium, when a program in the computer storage medium is executed by a processor of an electronic device, the electronic device can execute the above-mentioned sample packet processing method.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

一种样例报文处理方法及装置,获取通过接口进行数据交互过程中生成的接口数据,确定接口数据对应的附加数据;基于附加数据,生成接口数据对应的标识数据;如果标识数据与历史标识数据匹配,确定报文版本数据对应的请求报文和响应报文为历史样例报文对,如果标识数据与历史标识数据不匹配,确定报文版本数据对应的请求报文和响应报文为新样例报文对,从而能够基于接口数据形成样例报文对,通过接口进行数据交互过程中生成的接口数据是真实交互过程中生成的数据,能够反映真实业务逻辑,省去人工构建反映真实业务逻辑的实际数据的过程,提高样例报文对的开发效率,提高样例报文对的准确性。

Description

一种样例报文处理方法及装置
本申请要求于2021年01月18日提交中国专利局、申请号为202110062659.X、发明名称为“一种样例报文处理方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本公开属于报文处理技术领域,尤其涉及一种样例报文处理方法及装置。
背景技术
为了解决企业内部的信息系统之间孤岛问题、单个应用软件的前端展示和后端服务的分离,目前常用做法是将信息系统之间的交互、前端展示和后端服务之间的交互以接口交互的形式实现,屏蔽实现细节。接口作为一种应用软件之间、信息系统之间的数据交换方式,已成为常用数据交互方式,其对应的核心服务包括Web服务和RESTful服务,Web服务通过XML(Extensible Markup Language,可扩展标记语言)形式报文对外提供服务;RESTful服务基于HTTP(超文本传输协议),利用URL(Uniform Resource Locator,统一资源定位系统)表示资源,通过HTTP中动作表示对资源的操作,以JSON(JavaScript Object Notation,JS对象表示法)形式报文进行数据交换。
无论是Web服务还是RESTful服务,接口涉及的核心内容是数据报文,每个接口对应一个数据报文对,数据报文对包括一个请求报文和一个响应报文。因每个接口根据功能的不同,在不同接口对应的请求报文中有不同的参数字段组合,响应报文也会因为逻辑不同,返回不同的结果,所以为了更好管理和使用接口进行数据交互,可通过一个接口管理系统对接口调用的样例报文数据进行管理,在接口管理系统中,一个接口包含有至少一个样例报文对(样例报文数据的一种表现形式),每个样例报文对代表着一种处理逻辑关系,且每个样例报文对包括一个样例请求报文和样例响应报文,以通过样例请求报文和样例响应报文展示使用接口过程中通过接口传输的请求报文和响应报文遵循的要求,即样例请求报文和样例响应报文作为提供给接口被调用者的调用示例,能够让被调用者更直观根据样例请求报文和样例响应报文学习接口的使用方法。
但是样例请求报文和样例响应报文中的参数字段是由用户构建填写,但是无论是样例请求报文还是样例响应报文,报文中的单个参数字段需要反映真实 业务逻辑,因此任一参数字段的数据值需要能符合实际数据,在编写样例请求报文和样例响应报文过程中需要手工构建大量实际数据;并且样例请求报文和样例响应报文中任一报文中多个参数字段有相关性关系,在构建实际数据和编写过程中需要人工考虑多个字段的关联关系,从而导致形成样例请求报文和样例响应报文过程中极易出错,降低样例报文对的开发效率。
发明内容
有鉴于此,本公开的目的在于提供一种样例报文处理方法及装置,提高样例报文对的开发效率。
一方面,本公开提供一种样例报文处理方法,所述方法包括:
获取通过接口进行数据交互过程中生成的接口数据;
确定所述接口数据对应的附加数据,所述附加数据用于指示样例报文对所属接口以及所述样例报文对的用途;
基于所述附加数据,生成所述接口数据对应的标识数据,所述标识数据用于指向所述接口传输的报文版本数据对应的请求报文和响应报文;
如果所述标识数据与历史标识数据匹配,确定所述报文版本数据对应的请求报文和响应报文为历史样例报文对;
如果所述标识数据与历史标识数据不匹配,确定所述报文版本数据对应的请求报文和响应报文为新样例报文对。
另一方面,本公开提供一种样例报文处理装置,所述装置包括:
获取单元,用于获取通过接口进行数据交互过程中生成的接口数据;
确定单元,用于确定所述接口数据对应的附加数据,所述附加数据用于指示样例报文对所属接口以及所述样例报文对的用途;
生成单元,用于基于所述附加数据,生成所述接口数据对应的标识数据,所述标识数据用于指向所述接口传输的报文版本数据对应的请求报文和响应报文;
处理单元,用于如果所述标识数据与历史标识数据匹配,确定所述报文版本数据对应的请求报文和响应报文为历史样例报文对,以及用于如果所述标识数据与历史标识数据不匹配,确定所述报文版本数据对应的请求报文和响应报文为新样例报文对。
再一方面,本公开提供一种电子设备,包括:
处理器;
用于存储所述处理器可执行指令的存储器;
其中,所述处理器被配置为执行所述指令,以实现上述样例报文处理方法。
再一方面,本公开提供一种计算机存储介质,当所述计算机存储介质中的程序由电子设备的处理器执行时,使得电子设备能够执行上述样例报文处理方法。
上述样例报文处理方法及装置,获取通过接口进行数据交互过程中生成的接口数据,确定接口数据对应的附加数据,附加数据用于指示样例报文对所属接口以及样例报文对的用途;基于附加数据,生成接口数据对应的标识数据,标识数据用于指向接口传输的报文版本数据对应的请求报文和响应报文;如果标识数据与历史标识数据匹配,确定报文版本数据对应的请求报文和响应报文为历史样例报文对,如果标识数据与历史标识数据不匹配,确定报文版本数据对应的请求报文和响应报文为新样例报文对,从而能够基于通过接口进行数据交互过程中生成的接口数据形成样例报文对,通过接口进行数据交互过程中生成的接口数据是真实交互过程中生成的数据,能够反映真实业务逻辑,省去人工构建反映真实业务逻辑的实际数据的过程,提高样例报文对的开发效率,且因为通过接口进行数据交互过程中生成的接口数据能够反映真实业务逻辑,提高样例报文对的准确性。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。
图1是本公开实施例提供的一种样例报文处理方法的流程图;
图2是本公开实施例提供的一种调用接口的示意图;
图3是本公开实施例提供的另一种样例报文处理方法的流程图;
图4是本公开实施例提供的特征数据提取的流程图;
图5是本公开实施例提供的一种样例报文处理装置的结构示意图;
图6是本公开实施例提供的另一种样例报文处理装置的结构示意图;
图7是本公开实施例提供的一种电子设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
请参见图1,其示出了本公开实施例提供的一种数据处理方法的可选流程,可以包括以下步骤:
101:获取通过接口进行数据交互过程中生成的接口数据。
接口作为应用软件之间、信息系统之间的数据交互方式,在进行数据交互过程中可生成针对不同服务的接口数据,例如接口提供诸如Web服务和RESTful服务,在向应用软件或信息系统提供Web服务和RESTful服务中的至少一种服务过程中会生成接口数据。
接口数据至少包括:请求报文和响应报文,请求报文和响应报文作为报文对,在通过接口进行数据交互过程中使用,一个报文对对应一种用途,例如通过报文对提供Web服务还是RESTful服务。在报文对的用途不同的情况下,报文对的处理逻辑关系也会不同,相对应的报文对中的参数字段和数据值也会有所不同,因此本实施例中可通过但不限于请求报文和响应报文中的参数字段和数据值区分报文对的用途。
其中,接口数据可以存储但不限于存储在日志文件中,这是因为日志文件能够记录在信息系统、应用软件等运行中发生的事件和消息等等,接口数据是 信息系统和应用软件等运行过程中生成的一种数据,所以能够将接口数据存储在日志文件中,相对应的日志文件可以存储但不限于存储在网络互连设备中,如日志文件可以存储在至少一个网关中,通过多个网关分布式存储日志文件,以从多个网关中并行获取日志文件,进而从日志文件中提取出接口数据。
102:确定接口数据对应的附加数据,附加数据用于指示样例报文对所属接口以及样例报文对的用途,即附加数据用于指示样例报文对属于哪个接口(意味着通过哪个接口交互)以及样例报文对是做什么用,如样例报文对是提供Web服务还是RESTful服务。
针对任一接口数据来说,接口数据是通过接口进行数据交互过程中生成,那么接口数据可以包括接口的标识信息,以指示请求报文和响应报文属于哪个接口,因为一个接口可能会交互不同类型的请求报文和响应报文,所以接口数据还包括对请求报文和响应报文进行区分的信息,例如接口数据还包括:入口地址信息,入口地址信息可以是但不限于是请求报文和响应报文中任一报文对应的发送方地址信息,由此可知接口数据至少包括:接口的标识信息、入口地址信息、请求报文和响应报文。
上述接口的标识信息、入口地址信息、请求报文和响应报文能够用于区分不同接口中不同类型的报文对,且能够指示出报文对所属接口以及报文对的用途,因此本实施例能够基于接口数据中的接口的标识信息、入口地址信息、请求报文和响应报文确定附加数据,其中基于接口数据中的接口的标识信息、入口地址信息、请求报文和响应报文确定附加数据的可行方式包括但不限于如下可行方式:
一种可行方式:将接口数据中的接口的标识信息、入口地址信息、请求报文和响应报文确定为附加数据;
另一种可行方式:从接口数据中提取接口的标识信息、入口地址信息、请求报文和响应报文;分别对请求报文和响应报文进行特征提取,得到请求报文对应的第一特征数据和响应报文对应的第二特征数据;从响应报文中提取报文版本数据;将接口的标识信息、入口地址信息、第一特征数据、第二特征数据和报文版本数据确定为附加数据。
第一特征数据、第二特征数据和报文版本数据用于确定包含请求报文和响应报文的报文对,报文对对应一种用途,但是同一个接口对应不同入口地址信 息的报文对可能用途相同版本不同,同样不同接口传输的多个报文对也可能存在用途相同版本相同或用途相同版本不同的情况,为了能够区分这些报文对,在附加数据中引入用于确定报文对所属接口的接口的标识信息和引入用于确定入口的入口地址信息。
请求报文和响应报文作为报文对,在响应报文中携带报文版本数据,以指示响应报文和与其具有相同发送方的请求报文所属版本,如报文版本数据可以是但不限于是版本号,通过版本号指示请求报文和响应报文所属版本。如图2所示,在调用接口时,在请求报文中不携带报文版本数据(如版本号),响应报文中携带有报文版本数据,同一个接口的不同版本通过入口地址信息区分,入口地址信息可以采用但不限于采用URL(Uniform Resource Locator,统一资源定位系统)。以一个示例说明在响应报文中携带报文版本数据的原因:
例如一个服务发布了V1.0、V2.0、V3.0三个版本,三个版本中的内容会有所差异,以手机这种电子设备来说,iphone5、iphone6、iphone7是三个型号的手机,这三个型号的手机会存在一定差异,如处理器、屏幕和芯片等硬件会存在差异,因此这三个型号的手机视为是三个版本的手机。在请求报文中可以请求切换版本,相对应的响应报文中则会携带切换之后的报文版本数据。
103:基于附加数据,生成接口数据对应的标识数据,标识数据用于指向接口传输的报文版本数据对应的请求报文和响应报文。
在本实施例中,标识数据基于附加数据和预设标识生成算法得到,预设标识生成算法用于生成哈希码,则在确定出附加数据后,调用预设标识生成算法对附加数据进行处理,生成附加数据的哈希码(标识数据的一种表现形式)。
如预设标识生成算法可以是但不限于是MD(Message-Digest Algorithm,信息摘要算法),在确定出附加数据后调用MD对附加数据进行处理,生成哈希码。其中附加数据的一种表现形式可以是,附加数据包括:接口的标识信息、入口地址信息、第一特征数据、第二特征数据和报文版本数据;附加数据的另一种表现形式可以是,附加数据包括:接口的标识信息、入口地址信息、请求报文和响应报文。
104:如果标识数据与历史标识数据匹配,确定报文版本数据对应的请求报文和响应报文为历史样例报文对。
历史标识数据是在当前生成的标识数据之前获取到的标识数据,以通过标 识数据与历史标识数据是否匹配的方式,确定当前获取到的请求报文和响应报文是否与之前获取到的请求报文和响应报文匹配,其中之前获取到的请求报文和响应报文是在当前时间(至少不早于当前获取到接口数据的时间,不晚于生成标识数据的时间)之前已经获取过的请求报文和响应报文,意味着在当前时间之前已通过接口调用过这两个报文,这样才能够在当前时间之前获取到这两个报文的历史标识数据。
如果标识数据与历史标识数据匹配,说明标识数据与历史标识数据相同,因为包括请求报文和响应报文的报文对采用相同方式获取标识数据,所以如果标识数据与历史标识数据匹配,说明获得标识数据的附加数据与获得历史标识数据的附加数据相同,意味着两个附加数据对应的接口数据中的数据相同,由此确定报文版本数据对应的请求报文和响应报文是在当前时间之前已经获取过的请求报文和响应报文,从而确定报文版本数据对应的请求报文和响应报文为历史样例报文对。
105:如果标识数据与历史标识数据不匹配,确定报文版本数据对应的请求报文和响应报文为新样例报文对。
如果标识数据与历史标识数据不匹配,说明标识数据与历史标识数据不同,意味着两个附加数据对应的接口数据中的数据不同,由此确定报文版本数据对应的请求报文和响应报文是在当前时间之前没有获取过的请求报文和响应报文,从而确定报文版本数据对应的请求报文和响应报文为新样例报文对。
上述样例报文处理方法,获取通过接口进行数据交互过程中生成的接口数据,确定接口数据对应的附加数据,附加数据用于指示样例报文对所属接口以及样例报文对的用途;基于附加数据,生成接口数据对应的标识数据,标识数据用于指向接口传输的报文版本数据对应的请求报文和响应报文;如果标识数据与历史标识数据匹配,确定报文版本数据对应的请求报文和响应报文为历史样例报文对,如果标识数据与历史标识数据不匹配,确定报文版本数据对应的请求报文和响应报文为新样例报文对,从而能够基于通过接口进行数据交互过程中生成的接口数据形成样例报文对,通过接口进行数据交互过程中生成的接口数据是真实交互过程中生成的数据,能够反映真实业务逻辑,省去人工构建反映真实业务逻辑的实际数据的过程,提高样例报文对的开发效率,且因为通过接口进行数据交互过程中生成的接口数据能够反映真实业务逻辑,提高样例 报文对的准确性。
请参见图3,其示出了本公开实施例提供的另一种样例报文处理方法的流程图,可以包括以下步骤:
201:获取通过接口进行数据交互过程中生成的接口数据。
202:确定接口数据对应的附加数据,附加数据用于指示样例报文对所属接口以及样例报文对的用途,即附加数据用于指示样例报文对属于哪个接口(意味着通过哪个接口交互)以及样例报文对是做什么用,如样例报文对是提供Web服务还是RESTful服务。
203:基于附加数据,生成接口数据对应的标识数据,标识数据用于指向接口传输的报文版本数据对应的请求报文和响应报文。
204:如果标识数据与历史标识数据匹配,确定报文版本数据对应的请求报文和响应报文为历史样例报文对。
205:如果报文版本数据对应的请求报文和响应报文为历史样例报文对,更新报文集合中历史样例报文对指向的样例报文对的活跃度。
其中报文集合中存储有接口数据中的请求报文、响应报文和生成的标识数据,且请求报文和响应报文与标识数据以对应形式存储,以通过标识数据指向一对请求报文和响应报文,报文集合中存储的请求报文和响应报文作为一个样例报文对,样例报文对对应的标识数据称为历史标识数据。
在获取到任一接口数据的标识数据后,将标识数据与报文集合中的历史标识数据比对,以确定标识数据是否与报文集合中的历史标识数据匹配,如果确定出标识数据与报文集合中的历史标识数据匹配,说明当前获取到的请求报文与历史标识数据对应的历史请求报文相同,当前获取到的响应报文与历史标识数据对应的历史响应报文相同,从而确定当前获取到的报文版本数据对应的请求报文和响应报文为历史样例报文对,并能够更新报文集合中该历史样例报文对指向的样例报文对的活跃度。
样例报文对的活跃度用于指示样例报文对在预设时间范围内是否仍有效,如活跃度用于指示样例报文对在预设时间范围内是否仍在使用且指示其使用程度,预设时间范围可以是但不限于是相对当前时间而言,从当前时间作为结束时间,从当前时间向前推移预设时间,以得到开始时间,确定开始时间至结 束时间的预设时间范围内样例报文对是否仍在使用且指示其使用程度。
在本实施例中,样例报文对的活跃度可通过但不限于数值表示,如果确定报文版本数据对应的请求报文和响应报文为历史样例报文对,会对报文集合中该历史样例报文对指向的样例报文对的活跃度进行加值操作,如对活跃度进行加一操作,数值越高使用程度越高,相反数值越低使用程度越低。在确定报文版本数据对应的请求报文和响应报文为历史样例报文对,说明报文集合中存储有该历史样例报文对,此时获取到的请求报文和响应报文可以不在存储至报文集合中,减少报文集合中的报文对数量。
206:如果标识数据与历史标识数据不匹配,确定报文版本数据对应的请求报文和响应报文为新样例报文对。
207:如果报文版本数据对应的请求报文和响应报文为新样例报文对,将新样例报文对作为报文集合中的样例报文对存储在报文集合中。
如果报文版本数据对应的请求报文和响应报文为新样例报文对,说明新样例报文对没有存储在报文集合中,这种情况下将新样例报文对作为报文集合中的样例报文对存储在报文集合中,并且还可以存储新样例报文对的标识数据至报文集合中,以在后续获取到标识数据之后进行比对匹配。
208:响应样例报文归档指令,根据报文集合中的样例报文对的报文版本数据和样例报文对的活跃度,对报文集合中的样例报文对进行归档处理。
可以理解的是,样例报文归档指令用于对报文集合中的样例报文对进行归档处理,在本实施例中针对样例报文的归档处理可以作为一个定时任务进行处理,定时任务会每间隔预设归档时间进行一次归档处理,相对应的会每间隔预设归档时间触发响应一次样例报文归档指令,由此如果当前时间到达预设归档时间,触发响应样例报文归档指令。当然样例报文归档指令还可以通过其他方式触发,如在实施样例报文处理方法的设备处于空闲时段下触发样例报文归档指令,空闲时段可通过但不限于通过设备的性能而定,如处理器的使用率和内存的占用率等等。
在响应样例报文归档指令过程中,可根据报文集合中的样例报文对的报文版本数据和样例报文对的活跃度,确定有效样例报文对和无效样例报文对,一种确定方式如下:
如果当前时间到达预设归档时间,触发响应样例报文归档指令;获取样本 集合中样例报文对的报文版本数据;如果样例报文对的报文版本数据指示样例报文对为最新的样例报文对,确定最新的样例报文对为有效样例报文对;如果样例报文对的报文版本数据指示样例报文对不是最新的样例报文对,获取样例报文对的活跃度;如果样例报文对的活跃度指示在当前时间之前的预设时间范围内样例报文对的活跃度有增长,确定样例报文对为有效样例报文对。如果样例报文对的活跃度指示在当前时间之前的预设时间范围内样例报文对的活跃度没有增长,确定样例报文对为无效样例报文对。
最新的样例报文对可视为是最新版本的样例报文对,对于最新的样例报文对来说,没有版本级别比其更新的样例报文对,类似于目前的应用程序来说,应用程序的版本包括:1.0、2.0、4.0,则4.0是最新的应用程序,其他都不是最新的应用程序。
如果样例报文对的报文版本数据指示样例报文对为最新的样例报文对,说明该样例报文对是目前应用的最新版本的样例报文对,直接确定其为有效样例报文对,否则针对不是最新版本的样例报文对,会进一步根据活跃度确定。有效样例报文对表示该样例报文对仍处于使用中,则可以维持有效样例报文对处于有效状态,以继续使用有效样例报文对;无效样例报文对表示该样例报文对极有可能不再使用,则可以控制无效样例报文对处于无效状态,以指示可以删除无效样例报文对。
上述样例报文处理方法,响应样例报文归档指令,根据报文集合中的样例报文对的报文版本数据和样例报文对的活跃度,对报文集合中的样例报文对进行归档处理,实现对报文集合中的样例报文对的自动分类,省去人工分类过程,提高处理效率。
在本实施例中,上述请求报文和响应报文的特征提取过程如图4所示,可以包括以下步骤:
301:如果请求报文和响应报文对应的报文结构为键值对结构,提取键值对结构中的键。键值对结构的表现形式为{key:value},key为键,value为值,则提取key。
302:如果请求报文和响应报文对应的报文结构为数组结构且解析数组内结构,则在数组内结构为字典结构时提取字典结构中的键,在数组内结构为数值数组结构时提取键key,在数组内结构为字符串数组结构时禁止提取,在数 组内结构为键值对结构时对键值对结构中的键进行去重提取。
请求报文和响应报文对应的报文结构是否为数组结构,可通过接口元数据的processSwitch(处理开关)值确定;如果processSwitch的取值为true,确定解析数组内结构,如果processSwitch的取值为false,确定不解析数组内结构。
字典结构的表现形式为{key:[{key1:value,key2:vlue2}]},key为键,[{key1:value,key2:vlue2}]为值,则提取字典结构中的键key;数值数组结构的表现形式为{key:[1234,1215]},key为键,[1234,1215]为数值数组,此处仅是示例,提取数值数组结构中的键key,忽略数值数组;字符串数组结构的表现形式为{key:["aac","sdef"]},key为键,["aac","sdef"]为字符串数组,此处仅是示例,禁止提取字符串数组;键值对结构的表现形式为{key:["key1":value,"key2":value]},针对键值对结构中的键进行去重处理,然后提取去重后的键。
303:如果请求报文和响应报文对应的报文结构为数组结构且禁止解析数组内结构,则禁止提取。
304:将从请求报文中提取到的内容进行排序,得到第一特征数据,将从响应报文中提取到的内容进行排序,得到第二特征数据。因为JSON报文的特点,请求报文和响应报文中的内容可能存在颠倒,如一个报文中的内容是{a:1,b:2,c:3},另一个报文中的内容是{c:3,a:1,b:2},这两个报文中的内容相同但是存在一定颠倒(即排序不同),为此本实施例需要针对请求报文和响应报文进行排序,以保证报文中内容的一致性。并且通过排序之后还能够将内容相同的报文进行去重处理,防止出现内容相同的报文。
上述特征提取过程针对不同报文结构分别进行不同处理,以自动提取出请求报文和响应报文中的内容,得到各自对应的特征数据,实现特征数据的自动提取。
附图中的流程图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有 时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,流程图中的每个方框、以及流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
与上述方法实施例相对应,本公开实施例还提供一种样例报文处理装置,其可选结构如图5所示,可以包括:获取单元10、确定单元20、生成单元30和处理单元40。
获取单元10,用于获取通过接口进行数据交互过程中生成的接口数据;接口数据至少包括:请求报文和响应报文,请求报文和响应报文作为报文对,在通过接口进行数据交互过程中使用,一个报文对对应一种用途,例如通过报文对提供Web服务还是RESTful服务。在报文对的用途不同的情况下,报文对的处理逻辑关系也会不同,相对应的报文对中的参数字段和数据值也会有所不同,因此本实施例中可通过但不限于请求报文和响应报文中的参数字段和数据值区分报文对的用途,详细说明请参见上述方法实施例。
确定单元20,用于确定接口数据对应的附加数据,附加数据用于指示样 例报文对所属接口以及样例报文对的用途,即附加数据用于指示样例报文对属于哪个接口(意味着通过哪个接口交互)以及样例报文对是做什么用,如样例报文对是提供Web服务还是RESTful服务。
在本实施例中,接口数据至少包括:接口的标识信息、入口地址信息、请求报文和响应报文,对应的确定附加数据的可行方式包括但不限于如下可行方式:
一种可行方式:将接口数据中的接口的标识信息、入口地址信息、请求报文和响应报文确定为附加数据;
另一种可行方式:从接口数据中提取接口的标识信息、入口地址信息、请求报文和响应报文;分别对请求报文和响应报文进行特征提取,得到请求报文对应的第一特征数据和响应报文对应的第二特征数据;从响应报文中提取报文版本数据;将接口的标识信息、入口地址信息、第一特征数据、第二特征数据和报文版本数据确定为附加数据。
第一特征数据、第二特征数据和报文版本数据用于确定包含请求报文和响应报文的报文对,报文对对应一种用途,但是同一个接口对应不同入口地址信息的报文对可能用途相同版本不同,同样不同接口传输的多个报文对也可能存在用途相同版本相同或用途相同版本不同的情况,为了能够区分这些报文对,在附加数据中引入用于确定报文对所属接口的接口的标识信息和引入用于确定入口的入口地址信息。
其中分别对请求报文和响应报文进行特征提取,得到请求报文对应的第一特征数据和响应报文对应的第二特征数据的过程如下:
如果请求报文和响应报文对应的报文结构为键值对结构,提取键值对结构中的键;如果请求报文和响应报文对应的报文结构为数组结构且解析数组内结构,则在数组内结构为字典结构时提取字典结构中的键,在数组内结构为数值数组结构时提取键,在数组内结构为字符串数组结构时禁止提取,在数组内结构为键值对结构时对键值对结构中的键进行去重提取;如果请求报文和响应报文对应的报文结构为数组结构且禁止解析数组内结构,则禁止提取;将从请求报文中提取到的内容进行排序,得到第一特征数据,将从响应报文中提取到的内容进行排序,得到第二特征数据。
生成单元30,用于基于附加数据,生成接口数据对应的标识数据,标识 数据用于指向接口传输的报文版本数据对应的请求报文和响应报文。
在本实施例中,标识数据基于附加数据和预设标识生成算法得到,预设标识生成算法用于生成哈希码,则在确定出附加数据后,调用预设标识生成算法对附加数据进行处理,生成附加数据的哈希码(标识数据的一种表现形式)。
处理单元40,用于如果标识数据与历史标识数据匹配,确定报文版本数据对应的请求报文和响应报文为历史样例报文对,以及用于如果标识数据与历史标识数据不匹配,确定报文版本数据对应的请求报文和响应报文为新样例报文对。
历史标识数据是在当前生成的标识数据之前获取到的标识数据,以通过标识数据与历史标识数据是否匹配的方式,确定当前获取到的请求报文和响应报文是否与之前获取到的请求报文和响应报文匹配,其中之前获取到的请求报文和响应报文是在当前时间(至少不早于当前获取到接口数据的时间,不晚于生成标识数据的时间)之前已经获取过的请求报文和响应报文,意味着在当前时间之前已通过接口调用过这两个报文,这样才能够在当前时间之前获取到这两个报文的历史标识数据。
如果标识数据与历史标识数据匹配,说明标识数据与历史标识数据相同,因为包括请求报文和响应报文的报文对采用相同方式获取标识数据,所以如果标识数据与历史标识数据匹配,说明获得标识数据的附加数据与获得历史标识数据的附加数据相同,意味着两个附加数据对应的接口数据中的数据相同,由此确定报文版本数据对应的请求报文和响应报文是在当前时间之前已经获取过的请求报文和响应报文,从而确定报文版本数据对应的请求报文和响应报文为历史样例报文对。
如果标识数据与历史标识数据不匹配,说明标识数据与历史标识数据不同,意味着两个附加数据对应的接口数据中的数据不同,由此确定报文版本数据对应的请求报文和响应报文是在当前时间之前没有获取过的请求报文和响应报文,从而确定报文版本数据对应的请求报文和响应报文为新样例报文对。
上述样例报文处理装置,获取通过接口进行数据交互过程中生成的接口数据,确定接口数据对应的附加数据,附加数据用于指示样例报文对所属接口以及样例报文对的用途;基于附加数据,生成接口数据对应的标识数据,标识数据用于指向接口传输的报文版本数据对应的请求报文和响应报文;如果标识数 据与历史标识数据匹配,确定报文版本数据对应的请求报文和响应报文为历史样例报文对,如果标识数据与历史标识数据不匹配,确定报文版本数据对应的请求报文和响应报文为新样例报文对,从而能够基于通过接口进行数据交互过程中生成的接口数据形成样例报文对,通过接口进行数据交互过程中生成的接口数据是真实交互过程中生成的数据,能够反映真实业务逻辑,省去人工构建反映真实业务逻辑的实际数据的过程,提高样例报文对的开发效率,且因为通过接口进行数据交互过程中生成的接口数据能够反映真实业务逻辑,提高样例报文对的准确性。
请参见图6,其示出了本公开实施例提供的另一种样例报文处理装置的可选结构,还可以包括:更新单元50、存储单元60和归档单元70。
更新单元50,用于如果报文版本数据对应的请求报文和响应报文为历史样例报文对,更新报文集合中历史样例报文对指向的样例报文对的活跃度;其中报文集合中存储有接口数据中的请求报文、响应报文和生成的标识数据,且请求报文和响应报文与标识数据以对应形式存储,以通过标识数据指向一对请求报文和响应报文,报文集合中存储的请求报文和响应报文作为一个样例报文对,样例报文对对应的标识数据称为历史标识数据。
样例报文对的活跃度用于指示样例报文对在预设时间范围内是否仍有效,如活跃度用于指示样例报文对在预设时间范围内是否仍在使用且指示其使用程度,预设时间范围可以是但不限于是相对当前时间而言,从当前时间作为结束时间,从当前时间向前推移预设时间,以得到开始时间,确定开始时间至结束时间的预设时间范围内样例报文对是否仍在使用且指示其使用程度。
在本实施例中,样例报文对的活跃度可通过但不限于数值表示,如果确定报文版本数据对应的请求报文和响应报文为历史样例报文对,会对报文集合中该历史样例报文对指向的样例报文对的活跃度进行加值操作,如对活跃度进行加一操作,数值越高使用程度越高,相反数值越低使用程度越低。在确定报文版本数据对应的请求报文和响应报文为历史样例报文对,说明报文集合中存储有该历史样例报文对,此时获取到的请求报文和响应报文可以不在存储至报文集合中,减少报文集合中的报文对数量。
存储单元60,用于如果报文版本数据对应的请求报文和响应报文为新样例报文对,将新样例报文对作为报文集合中的样例报文对存储在报文集合中; 如果报文版本数据对应的请求报文和响应报文为新样例报文对,说明新样例报文对没有存储在报文集合中,这种情况下将新样例报文对作为报文集合中的样例报文对存储在报文集合中,并且还可以存储新样例报文对的标识数据至报文集合中,以在后续获取到标识数据之后进行比对匹配。
归档单元70,用于响应样例报文归档指令,根据报文集合中的样例报文对的报文版本数据和样例报文对的活跃度,对报文集合中的样例报文对进行归档处理。
可以理解的是,样例报文归档指令用于对报文集合中的样例报文对进行归档处理,在本实施例中针对样例报文的归档处理可以作为一个定时任务进行处理,定时任务会每间隔预设归档时间进行一次归档处理,相对应的会每间隔预设归档时间触发响应一次样例报文归档指令,由此如果当前时间到达预设归档时间,触发响应样例报文归档指令。当然样例报文归档指令还可以通过其他方式触发,如在实施样例报文处理方法的设备处于空闲时段下触发样例报文归档指令,空闲时段可通过但不限于通过设备的性能而定,如处理器的使用率和内存的占用率等等。
在响应样例报文归档指令过程中,归档单元70可根据报文集合中的样例报文对的报文版本数据和样例报文对的活跃度,确定有效样例报文对和无效样例报文对,一种确定方式如下:
如果当前时间到达预设归档时间,触发响应样例报文归档指令;获取样本集合中样例报文对的报文版本数据;如果样例报文对的报文版本数据指示样例报文对为最新的样例报文对,确定最新的样例报文对为有效样例报文对;如果样例报文对的报文版本数据指示样例报文对不是最新的样例报文对,获取样例报文对的活跃度;如果样例报文对的活跃度指示在当前时间之前的预设时间范围内样例报文对的活跃度有增长,确定样例报文对为有效样例报文对。如果样例报文对的活跃度指示在当前时间之前的预设时间范围内样例报文对的活跃度没有增长,确定样例报文对为无效样例报文对。
上述样例报文处理装置,响应样例报文归档指令,根据报文集合中的样例报文对的报文版本数据和样例报文对的活跃度,对报文集合中的样例报文对进行归档处理,实现对报文集合中的样例报文对的自动分类,省去人工分类过程,提高处理效率。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定,例如,第一确定单元还可以被描述为“第一聚类控制单元指示完成对待处理数据集的一次聚类后,确定待处理数据集中没有加入已有簇的数据的数量的单元”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
下面参考图7,其示出了适于用来实现本公开实施例的电子设备300的结构示意图。本公开实施例中的电子设备可以包括但不限于诸如笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)等等的移动终端以及诸如台式计算机等等的固定终端。图7示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图7所示,电子设备300可以包括处理器(例如中央处理器、图形处理器等)301,其可以执行存储在存储器302中的可执行指令以实现上述样例报文处理方法。存储器302可以是但不限于是只读存储器(ROM)和随机访问存储器(RAM)中的至少一种。处理器301和存储器302之间可以通过总线303相连,以通过总线303通信。此外电子设备300还可以包括输入/输出(I/O)接口304,输入/输出(I/O)接口304也连接至总线303。
通常,以下装置可以连接至I/O接口304:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置305;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置306;包括例如磁带、硬盘等的存储装置307以及通信装置308。通信装置308可以允许电子设备300与其他设备进行无线或有线通信以交换数据。虽然图7示出了具有各种装置的电子设备300,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
本公开实施例还提供一种计算机存储介质,当所述计算机存储介质中的程序由电子设备的处理器执行时,使得电子设备能够执行上述样例报文处理方法。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。
在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置从网络上被下载和安装,或者从存储器被安装。在该计算机程序被处理器执行时,执行本公开实施例的方法中限定的上述功能。
根据本公开的一个或多个实施例,提供了一种样例报文处理方法,所述方法包括:
获取通过接口进行数据交互过程中生成的接口数据;
确定所述接口数据对应的附加数据,所述附加数据用于指示样例报文对所 属接口以及所述样例报文对的用途;
基于所述附加数据,生成所述接口数据对应的标识数据,所述标识数据用于指向所述接口传输的报文版本数据对应的请求报文和响应报文;
如果所述标识数据与历史标识数据匹配,确定所述报文版本数据对应的请求报文和响应报文为历史样例报文对;
如果所述标识数据与历史标识数据不匹配,确定所述报文版本数据对应的请求报文和响应报文为新样例报文对。
根据本公开的一个或多个实施例,所述方法还包括:
如果所述报文版本数据对应的请求报文和响应报文为历史样例报文对,更新报文集合中所述历史样例报文对指向的样例报文对的活跃度;
如果所述报文版本数据对应的请求报文和响应报文为新样例报文对,将所述新样例报文对作为所述报文集合中的样例报文对存储在所述报文集合中;
响应样例报文归档指令,根据所述报文集合中的样例报文对的报文版本数据和样例报文对的活跃度,对所述报文集合中的样例报文对进行归档处理。
根据本公开的一个或多个实施例,所述响应样例报文归档指令,根据所述报文集合中的样例报文对的报文版本数据和样例报文对的活跃度,对所述报文集合中的样例报文对进行归档处理包括:
如果当前时间到达预设归档时间,触发响应所述样例报文归档指令;
获取所述样本集合中样例报文对的报文版本数据;
如果所述样例报文对的报文版本数据指示所述样例报文对为最新的样例报文对,确定所述最新的样例报文对为有效样例报文对;
如果所述样例报文对的报文版本数据指示所述样例报文对不是最新的样例报文对,获取所述样例报文对的活跃度;
如果所述样例报文对的活跃度指示在所述当前时间之前的预设时间范围内所述样例报文对的活跃度有增长,确定所述样例报文对为有效样例报文对;如果所述样例报文对的活跃度指示在所述当前时间之前的预设时间范围内所述样例报文对的活跃度没有增长,确定所述样例报文对为无效样例报文对。
根据本公开的一个或多个实施例,所述确定所述接口数据对应的附加数据包括:
从所述接口数据中提取所述接口的标识信息、入口地址信息、请求报文和 响应报文;
分别对所述请求报文和所述响应报文进行特征提取,得到所述请求报文对应的第一特征数据和所述响应报文对应的第二特征数据;
从所述响应报文中提取报文版本数据;
将所述接口的标识信息、所述入口地址信息、所述第一特征数据、所述第二特征数据和所述报文版本数据确定为附加数据。
根据本公开的一个或多个实施例,所述基于所述附加数据,生成所述接口数据对应的标识数据包括:
基于所述接口的标识信息、所述入口地址信息、所述第一特征数据、所述第二特征数据和所述报文版本数据,生成哈希码。
根据本公开的一个或多个实施例,所述分别对所述请求报文和所述响应报文进行特征提取,得到所述请求报文对应的第一特征数据和所述响应报文对应的第二特征数据包括:
如果所述请求报文和所述响应报文对应的报文结构为键值对结构,提取键值对结构中的键;
如果所述请求报文和所述响应报文对应的报文结构为数组结构且解析所述数组内结构,则在所述数组内结构为字典结构时提取字典结构中的键,在所述数组内结构为数值数组结构时提取键,在所述数组内结构为字符串数组结构时禁止提取,在所述数组内结构为键值对结构时对键值对结构中的键进行去重提取;
如果所述请求报文和所述响应报文对应的报文结构为数组结构且禁止解析所述数组内结构,则禁止提取;
将从所述请求报文中提取到的内容进行排序,得到所述第一特征数据,将从所述响应报文中提取到的内容进行排序,得到所述第二特征数据。
本公开实施例还提供一种样例报文处理装置,所述装置包括:
获取单元,用于获取通过接口进行数据交互过程中生成的接口数据;
确定单元,用于确定所述接口数据对应的附加数据,所述附加数据用于指示样例报文对所属接口以及所述样例报文对的用途;
生成单元,用于基于所述附加数据,生成所述接口数据对应的标识数据,所述标识数据用于指向所述接口传输的报文版本数据对应的请求报文和响应 报文;
处理单元,用于如果所述标识数据与历史标识数据匹配,确定所述报文版本数据对应的请求报文和响应报文为历史样例报文对,以及用于如果所述标识数据与历史标识数据不匹配,确定所述报文版本数据对应的请求报文和响应报文为新样例报文对。
根据本公开的一个或多个实施例,所述装置还包括:
更新单元,用于如果所述报文版本数据对应的请求报文和响应报文为历史样例报文对,更新报文集合中所述历史样例报文对指向的样例报文对的活跃度;
存储单元,用于如果所述报文版本数据对应的请求报文和响应报文为新样例报文对,将所述新样例报文对作为所述报文集合中的样例报文对存储在所述报文集合中;
归档单元,用于响应样例报文归档指令,根据所述报文集合中的样例报文对的报文版本数据和样例报文对的活跃度,对所述报文集合中的样例报文对进行归档处理。
根据本公开的一个或多个实施例,所述归档单元,用于:
如果当前时间到达预设归档时间,触发响应所述样例报文归档指令;
获取所述样本集合中样例报文对的报文版本数据;
如果所述样例报文对的报文版本数据指示所述样例报文对为最新的样例报文对,确定所述最新的样例报文对为有效样例报文对;
如果所述样例报文对的报文版本数据指示所述样例报文对不是最新的样例报文对,获取所述样例报文对的活跃度;
如果所述样例报文对的活跃度指示在所述当前时间之前的预设时间范围内所述样例报文对的活跃度有增长,确定所述样例报文对为有效样例报文对;如果所述样例报文对的活跃度指示在所述当前时间之前的预设时间范围内所述样例报文对的活跃度没有增长,确定所述样例报文对为无效样例报文对。
根据本公开的一个或多个实施例,所述确定单元,用于从所述接口数据中提取所述接口的标识信息、入口地址信息、请求报文和响应报文;分别对所述请求报文和所述响应报文进行特征提取,得到所述请求报文对应的第一特征数据和所述响应报文对应的第二特征数据;从所述响应报文中提取报文版本数 据;将所述接口的标识信息、所述入口地址信息、所述第一特征数据、所述第二特征数据和所述报文版本数据确定为附加数据。
根据本公开的一个或多个实施例,所述生成单元,用于基于所述接口的标识信息、所述入口地址信息、所述第一特征数据、所述第二特征数据和所述报文版本数据,生成哈希码。
根据本公开的一个或多个实施例,所述确定单元得到所述请求报文对应的第一特征数据和所述响应报文对应的第二特征数据包括:
如果所述请求报文和所述响应报文对应的报文结构为键值对结构,提取键值对结构中的键;
如果所述请求报文和所述响应报文对应的报文结构为数组结构且解析所述数组内结构,则在所述数组内结构为字典结构时提取字典结构中的键,在所述数组内结构为数值数组结构时提取键,在所述数组内结构为字符串数组结构时禁止提取,在所述数组内结构为键值对结构时对键值对结构中的键进行去重提取;
如果所述请求报文和所述响应报文对应的报文结构为数组结构且禁止解析所述数组内结构,则禁止提取;
将从所述请求报文中提取到的内容进行排序,得到所述第一特征数据,将从所述响应报文中提取到的内容进行排序,得到所述第二特征数据。
本公开实施例还提供一种电子设备,包括:
处理器;
用于存储所述处理器可执行指令的存储器;
其中,所述处理器被配置为执行所述指令,以实现上述样例报文处理方法。
本公开实施例还提供一种计算机存储介质,当所述计算机存储介质中的程序由电子设备的处理器执行时,使得电子设备能够执行上述样例报文处理方法。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。
虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对 本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (10)

  1. 一种样例报文处理方法,其特征在于,所述方法包括:
    获取通过接口进行数据交互过程中生成的接口数据;
    确定所述接口数据对应的附加数据,所述附加数据用于指示样例报文对所属接口以及所述样例报文对的用途;
    基于所述附加数据,生成所述接口数据对应的标识数据,所述标识数据用于指向所述接口传输的报文版本数据对应的请求报文和响应报文;
    如果所述标识数据与历史标识数据匹配,确定所述报文版本数据对应的请求报文和响应报文为历史样例报文对;
    如果所述标识数据与历史标识数据不匹配,确定所述报文版本数据对应的请求报文和响应报文为新样例报文对。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    如果所述报文版本数据对应的请求报文和响应报文为历史样例报文对,更新报文集合中所述历史样例报文对指向的样例报文对的活跃度;
    如果所述报文版本数据对应的请求报文和响应报文为新样例报文对,将所述新样例报文对作为所述报文集合中的样例报文对存储在所述报文集合中;
    响应样例报文归档指令,根据所述报文集合中的样例报文对的报文版本数据和样例报文对的活跃度,对所述报文集合中的样例报文对进行归档处理。
  3. 根据权利要求2所述的方法,其特征在于,所述响应样例报文归档指令,根据所述报文集合中的样例报文对的报文版本数据和样例报文对的活跃度,对所述报文集合中的样例报文对进行归档处理包括:
    如果当前时间到达预设归档时间,触发响应所述样例报文归档指令;
    获取所述样本集合中样例报文对的报文版本数据;
    如果所述样例报文对的报文版本数据指示所述样例报文对为最新的样例报文对,确定所述最新的样例报文对为有效样例报文对;
    如果所述样例报文对的报文版本数据指示所述样例报文对不是最新的样例报文对,获取所述样例报文对的活跃度;
    如果所述样例报文对的活跃度指示在所述当前时间之前的预设时间范围内所述样例报文对的活跃度有增长,确定所述样例报文对为有效样例报文对; 如果所述样例报文对的活跃度指示在所述当前时间之前的预设时间范围内所述样例报文对的活跃度没有增长,确定所述样例报文对为无效样例报文对。
  4. 根据权利要求1所述的方法,其特征在于,所述确定所述接口数据对应的附加数据包括:
    从所述接口数据中提取所述接口的标识信息、入口地址信息、请求报文和响应报文;
    分别对所述请求报文和所述响应报文进行特征提取,得到所述请求报文对应的第一特征数据和所述响应报文对应的第二特征数据;
    从所述响应报文中提取报文版本数据;
    将所述接口的标识信息、所述入口地址信息、所述第一特征数据、所述第二特征数据和所述报文版本数据确定为附加数据。
  5. 根据权利要求4所述的方法,其特征在于,所述基于所述附加数据,生成所述接口数据对应的标识数据包括:
    基于所述接口的标识信息、所述入口地址信息、所述第一特征数据、所述第二特征数据和所述报文版本数据,生成哈希码。
  6. 根据权利要求4所述的方法,其特征在于,所述分别对所述请求报文和所述响应报文进行特征提取,得到所述请求报文对应的第一特征数据和所述响应报文对应的第二特征数据包括:
    如果所述请求报文和所述响应报文对应的报文结构为键值对结构,提取键值对结构中的键;
    如果所述请求报文和所述响应报文对应的报文结构为数组结构且解析所述数组内结构,则在所述数组内结构为字典结构时提取字典结构中的键,在所述数组内结构为数值数组结构时提取键,在所述数组内结构为字符串数组结构时禁止提取,在所述数组内结构为键值对结构时对键值对结构中的键进行去重提取;
    如果所述请求报文和所述响应报文对应的报文结构为数组结构且禁止解析所述数组内结构,则禁止提取;
    将从所述请求报文中提取到的内容进行排序,得到所述第一特征数据,将从所述响应报文中提取到的内容进行排序,得到所述第二特征数据。
  7. 一种样例报文处理装置,其特征在于,所述装置包括:
    获取单元,用于获取通过接口进行数据交互过程中生成的接口数据;
    确定单元,用于确定所述接口数据对应的附加数据,所述附加数据用于指示样例报文对所属接口以及所述样例报文对的用途;
    生成单元,用于基于所述附加数据,生成所述接口数据对应的标识数据,所述标识数据用于指向所述接口传输的报文版本数据对应的请求报文和响应报文;
    处理单元,用于如果所述标识数据与历史标识数据匹配,确定所述报文版本数据对应的请求报文和响应报文为历史样例报文对,以及用于如果所述标识数据与历史标识数据不匹配,确定所述报文版本数据对应的请求报文和响应报文为新样例报文对。
  8. 根据权利要求7所述的装置,其特征在于,所述装置还包括:
    更新单元,用于如果所述报文版本数据对应的请求报文和响应报文为历史样例报文对,更新报文集合中所述历史样例报文对指向的样例报文对的活跃度;
    存储单元,用于如果所述报文版本数据对应的请求报文和响应报文为新样例报文对,将所述新样例报文对作为所述报文集合中的样例报文对存储在所述报文集合中;
    归档单元,用于响应样例报文归档指令,根据所述报文集合中的样例报文对的报文版本数据和样例报文对的活跃度,对所述报文集合中的样例报文对进行归档处理。
  9. 一种电子设备,其特征在于,包括:
    处理器;
    用于存储所述处理器可执行指令的存储器;
    其中,所述处理器被配置为执行所述指令,以实现如权利要求1至6中任一项所述的样例报文处理方法。
  10. 一种计算机存储介质,其特征在于,当所述计算机存储介质中的程序由电子设备的处理器执行时,使得电子设备能够执行如权利要求1至6中任一项所述的样例报文处理方法。
PCT/CN2021/131669 2021-01-18 2021-11-19 一种样例报文处理方法及装置 WO2022151835A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP21919026.1A EP4280565A1 (en) 2021-01-18 2021-11-19 Sample message processing method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110062659.X 2021-01-18
CN202110062659.XA CN112910855B (zh) 2021-01-18 2021-01-18 一种样例报文处理方法及装置

Publications (1)

Publication Number Publication Date
WO2022151835A1 true WO2022151835A1 (zh) 2022-07-21

Family

ID=76115168

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/131669 WO2022151835A1 (zh) 2021-01-18 2021-11-19 一种样例报文处理方法及装置

Country Status (3)

Country Link
EP (1) EP4280565A1 (zh)
CN (1) CN112910855B (zh)
WO (1) WO2022151835A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112910855B (zh) * 2021-01-18 2023-04-07 中国民航信息网络股份有限公司 一种样例报文处理方法及装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107317811A (zh) * 2017-06-23 2017-11-03 北京威努特技术有限公司 一种模拟plc的实现方法
CN107528839A (zh) * 2017-08-18 2017-12-29 深圳乐信软件技术有限公司 一种接口报文的配置方法及装置
CN109460220A (zh) * 2018-10-19 2019-03-12 泰康保险集团股份有限公司 报文预定义代码生成方法、装置、电子设备和存储介质
US20190391985A1 (en) * 2018-06-22 2019-12-26 Otsuka America Pharmaceutical, Inc. Application programming interface using digital templates to extract information from mulitple data sources
CN110716870A (zh) * 2019-09-23 2020-01-21 中国建设银行股份有限公司 服务的自动化测试方法及装置
CN112910855A (zh) * 2021-01-18 2021-06-04 中国民航信息网络股份有限公司 一种样例报文处理方法及装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10545811B2 (en) * 2017-01-11 2020-01-28 International Business Machines Corporation Automatic root cause analysis for web applications
CN110399293B (zh) * 2019-06-21 2024-05-03 平安科技(深圳)有限公司 系统测试方法、装置、计算机设备和存储介质
CN111782452A (zh) * 2020-07-03 2020-10-16 携程商旅信息服务(上海)有限公司 接口对比测试的方法、系统、设备和介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107317811A (zh) * 2017-06-23 2017-11-03 北京威努特技术有限公司 一种模拟plc的实现方法
CN107528839A (zh) * 2017-08-18 2017-12-29 深圳乐信软件技术有限公司 一种接口报文的配置方法及装置
US20190391985A1 (en) * 2018-06-22 2019-12-26 Otsuka America Pharmaceutical, Inc. Application programming interface using digital templates to extract information from mulitple data sources
CN109460220A (zh) * 2018-10-19 2019-03-12 泰康保险集团股份有限公司 报文预定义代码生成方法、装置、电子设备和存储介质
CN110716870A (zh) * 2019-09-23 2020-01-21 中国建设银行股份有限公司 服务的自动化测试方法及装置
CN112910855A (zh) * 2021-01-18 2021-06-04 中国民航信息网络股份有限公司 一种样例报文处理方法及装置

Also Published As

Publication number Publication date
EP4280565A1 (en) 2023-11-22
CN112910855A (zh) 2021-06-04
CN112910855B (zh) 2023-04-07

Similar Documents

Publication Publication Date Title
WO2022127838A1 (zh) 文档处理方法、装置和电子设备
US20240004917A1 (en) Data processing method and device, terminal, and storage medium
CN109783562B (zh) 一种业务处理方法和装置
WO2021190129A1 (zh) 页面处理方法、装置、电子设备及计算机可读存储介质
WO2022048422A1 (zh) 数据处理的方法、装置、设备及存储介质
US20240126417A1 (en) Method, form data processing method, apparatus, and electronic device for form generation
CN111857720B (zh) 用户界面状态信息的生成方法、装置、电子设备及介质
WO2023035964A1 (zh) 数据操作方法、装置、存储介质及电子设备
WO2022183977A1 (zh) 文档更新方法、装置、设备和介质
WO2022151835A1 (zh) 一种样例报文处理方法及装置
US10887373B2 (en) Proactively sending hosted content items to user computing devices
CN115079873B (zh) 信息显示方法、装置、电子设备和存储介质
WO2022184024A1 (zh) 电子文档的处理方法、装置、终端和存储介质
CN116226189A (zh) 缓存数据查询方法、装置、电子设备和计算机可读介质
CN113347052B (zh) 通过访问日志统计用户访问数据的方法和装置
CN112817874A (zh) 一种用户界面的测试方法、装置、设备及介质
CN113761433A (zh) 业务处理方法和装置
CN112699116A (zh) 一种数据处理方法和系统
CN115422131B (zh) 业务审核知识库检索方法、装置、设备和计算机可读介质
CN112988857A (zh) 一种业务数据的处理方法和装置
WO2022184079A1 (zh) 一种文档处理方法、装置、设备和介质
WO2022184037A1 (zh) 文档处理方法、装置、设备和介质
CN113760860B (zh) 一种数据读取方法和装置
CN115374320B (zh) 文本匹配方法、装置、电子设备、计算机介质
CN110750410B (zh) 一种监听数据库日志的方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21919026

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18272561

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2021919026

Country of ref document: EP

Effective date: 20230818