Method and device for processing data packet, storage medium and electronic equipment
By automating the resending of abnormal data packets, the problem of low efficiency in existing technologies has been solved, achieving efficient data packet resending, ensuring smooth transmission of information within the airline and improving passenger satisfaction.
Patent Information
- Application Number
- CN202411374814.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2044-09-29
AI Technical Summary
The existing technology relies on manual operation to resend abnormal data packets, which is inefficient and leads to low efficiency in airlines' internal information integration and passenger services.
When an abnormal data packet transmission is detected, it is stored in the first data table, and a decision is made on whether to resend it based on a preset time interval. The abnormal data packet is automatically resent using the message middleware, and the abnormality is judged by combining the number of transmissions, server call duration and feedback information.
It has enabled automated data replenishment for high-frequency message transmission in civil aviation, reduced data loss rate, reduced manual complexity, improved the efficiency and quality of flight operations, ticketing sales and passenger services, and enhanced the integrity and reliability of data transmission.
Smart Images

Figure CN119211346B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a data message processing method and device, a storage medium and an electronic device. BACKGROUND
[0002] High-frequency messages refer to high-frequency message interaction messages generated by business system due to business event changes, for example, high-frequency flight data messages, high-frequency passenger data messages, etc. There are many high-frequency message data products that airlines need to receive. These data have an important influence on flight operations, ticket sales, passenger services, etc. However, in the data transmission process, due to network failures, data packet loss, system abnormalities, etc., some messages may not be correctly received or processed, which will bring many problems to the internal information integration of the airline, and even inconvenience to passengers, reducing the service quality and customer satisfaction of the airline.
[0003] At present, in the data transmission process, the detection, storage and retransmission of abnormal data messages in the prior art usually rely on manual operation, which is low in efficiency and easy to make mistakes, and may cause message duplication and affect business performance and passenger experience.
[0004] In view of the above problems, no effective solution has been proposed so far. SUMMARY
[0005] The embodiments of the present application provide a data message processing method and device, a storage medium and an electronic device to at least solve the technical problem of low efficiency in the prior art that relies on manual retransmission of abnormal data messages in the data transmission process.
[0006] According to an aspect of an embodiment of the present application, a data message processing method is provided, comprising: in the case where it is detected that there is a sending abnormal data message in the data message sending process, storing the sending abnormal data message in a first data table, wherein the first data table is used to record the field information and metadata information of the sending abnormal data message; obtaining the sending abnormal data message from the first data table based on a preset time interval, and determining whether to resend the sending abnormal data message to obtain a determination result; if the determination result is to resend the sending abnormal data message, sending the sending abnormal data message to a target topic corresponding to a target airline system corresponding to the sending abnormal data message in the message middleware.
[0007] Further, the method further includes: determining whether to resend the data message with the sending exception, to obtain a determination result, including: obtaining the sending times corresponding to the data message with the sending exception from the first data table, and comparing the sending times with a preset threshold; if the sending times are less than or equal to the preset threshold, resending the data message with the sending exception is taken as the determination result; if the sending times are greater than the preset threshold, not sending the data message with the sending exception is taken as the determination result.
[0008] Further, before detecting the data message with the sending exception in the data message sending process, the method further includes: calling a server of the message middleware to send the data message to be sent to the message middleware; detecting the calling duration of the server of the message middleware, and in a case where the calling duration is greater than a preset duration, determining that the data message to be sent is the data message with the sending exception; in a case where the calling duration is less than or equal to the preset duration, detecting the feedback information of the server, and in a case where the feedback information is abnormal, determining that the data message to be sent is the data message with the sending exception.
[0009] Further, the message middleware is configured to: obtain the data message with the sending exception from a target topic corresponding to the target airline system, send the data message with the sending exception to the target airline system, and store the feature information of the data message with the sending exception and the offset corresponding to the feature information in the second data table.
[0010] Further, the method further includes: receiving a data message acquisition request sent by the target airline system through the message middleware, wherein the data message acquisition request at least includes target feature information of a data message to be acquired; obtaining the offset corresponding to the feature information same as the target feature information from the second data table, and determining the data message to be acquired according to the offset; and sending the data message to be acquired to the target airline system.
[0011] Further, after determining whether to resend the data message with the sending exception, to obtain a determination result, the method further includes: if the determination result is not to send the data message with the sending exception, deleting the data message with the sending exception in the first data table.
[0012] Further, after sending the data message with the sending exception to the target topic corresponding to the target airline system of the message middleware, the method further includes: performing an increment operation on the sending times corresponding to the data message with the sending exception in the first data table.
[0013] According to another aspect of the embodiments of the present application, a data message processing apparatus is also provided, which comprises: a first processing module, configured to store a data message with sending exception in a first data table when it is detected that there is a data message with sending exception in a data message sending process, wherein the first data table is used to record field information and metadata information of the data message with sending exception; a second processing module, configured to acquire the data message with sending exception from the first data table based on a preset time interval, and determine whether to resend the data message with sending exception, to obtain a determination result; and a third processing module, configured to send the data message with sending exception to a target topic corresponding to a target airline system corresponding to the data message with sending exception in a message middleware if the determination result is to resend the data message with sending exception.
[0014] According to another aspect of the embodiments of the present application, a computer program product is also provided, which comprises a computer program, and the computer program is configured to implement the data message processing method described above when executed by a processor.
[0015] According to another aspect of the embodiments of the present application, a computer readable storage medium is also provided, which stores a computer program, and the computer program is configured to implement the data message processing method described above when executed.
[0016] According to another aspect of the embodiments of the present application, an electronic device is also provided, which comprises one or more processors, and a memory configured to store one or more programs, and the one or more programs are configured to make the one or more processors implement a program for running when executed by the one or more processors, and the program is configured to implement the data message processing method described above when executed.
[0017] In the embodiments of the present application, when it is detected that there is a data message with sending exception in a data message sending process, the data message with sending exception is stored in a first data table, wherein the first data table is used to record field information and metadata information of the data message with sending exception; the data message with sending exception is acquired from the first data table based on a preset time interval, and it is determined whether to resend the data message with sending exception, to obtain a determination result; and if the determination result is to resend the data message with sending exception, the data message with sending exception is sent to a target topic corresponding to a target airline system corresponding to the data message with sending exception in a message middleware.
[0018] In the above process, the data message with transmission exception is acquired from the first data table based on a preset time interval, and it is judged whether the data message with transmission exception is retransmitted, so that the supplement demand when the transmission exception occurs can be automatically completed in time, the automatic supplement of the civil aviation high-frequency message transmission is realized, the data loss rate caused by system failure or network interruption is reduced, the complexity and workload of manual supplement are reduced, the problems caused by repeated sending of messages are avoided, the smoothness of the integration of internal information of the airline is ensured, the efficiency and quality of flight operation, ticket sales and passenger service are improved, the integrity and reliability of data transmission of the airline are enhanced, and therefore the passenger satisfaction and the service quality of the airline are effectively improved.
[0019] Therefore, through the technical scheme of the present application, the supplement demand when the transmission exception occurs can be automatically completed in time, so that the technical effect of improving the supplement efficiency of the abnormal data message is realized, and the technical problem of low efficiency in the prior art that the abnormal data message in the data transmission process is manually supplemented is solved. BRIEF DESCRIPTION OF DRAWINGS
[0020] The accompanying drawings, which are included to provide a further understanding of the present application and are incorporated in and constitute a part of this application, illustrate embodiments of the present application and serve to explain the present application, and do not constitute improper limitations on the present application. In the drawings:
[0021] Figure 1 is a flow chart of an optional data message processing method according to an embodiment of the present application;
[0022] Figure 2 is a flow chart of an optional push system automatic supplement of data message according to an embodiment of the present application;
[0023] Figure 3 is a flow chart of an optional message middleware automatic supplement of data message according to an embodiment of the present application;
[0024] Figure 4 is a schematic diagram of an optional data message processing device according to an embodiment of the present application;
[0025] Figure 5 is a schematic diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0026] In the following, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by a person of ordinary skill in the art without creative effort should fall into the protection scope of the present application.
[0027] It should be noted that the terms "first", "second" and the like in the description and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product or device.
[0028] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, analyzed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties. For example, an interface is provided between the system and the relevant user or institution. Before obtaining the relevant information, the interface needs to send a request to the aforementioned user or institution, and after receiving the consent information feedback from the aforementioned user or institution, the relevant information is obtained.
[0029] Embodiment 1
[0030] According to the embodiments of the present application, an embodiment of a data packet processing method is provided. It should be noted that the steps shown in the flowchart of the drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in a different order.
[0031] Figure 1 is a flowchart of an optional data packet processing method according to the embodiments of the present application, as shown in Figure 1 The method comprises the following steps:
[0032] In step S101, in a case where it is detected that there is a data message with sending exception in a data message sending process, the data message with sending exception is stored in a first data table, wherein the first data table is used to record field information and metadata information of the data message with sending exception.
[0033] In step S102, the data message with sending exception is obtained from the first data table based on a preset time interval, and it is determined whether to resend the data message with sending exception, to obtain a determination result.
[0034] In step S103, if the determination result is to resend the data message with sending exception, the data message with sending exception is sent to a target topic corresponding to a target airline system corresponding to the data message with sending exception in the message middleware.
[0035] In the above steps, an application system, a processor, an electronic device, etc. can be used as an execution subject, and optionally, a data message processing system can be used as an execution subject, and the system includes a push system, a message middleware, and an airline system. For example, a data synchronization service of the push system synchronizes each high-frequency data message obtained through a dedicated line network to the message middleware in a streaming manner, and then the message middleware sends the data message to the corresponding airline system. In this process, the main reasons for data transmission failure include synchronization service exception, dedicated line network exception, middleware server exception, etc.
[0036] In an optional embodiment, before detecting that there is a data message with sending exception in a data message sending process, a server of the message middleware is called to send a data message to be sent to the message middleware. The calling duration of the server of the message middleware is detected. In a case where it is detected that the calling duration is greater than a preset duration, it is determined that the data message to be sent is the data message with sending exception. In a case where it is detected that the calling duration is less than or equal to the preset duration, feedback information of the server is detected, and in a case where it is detected that the feedback information is abnormal, it is determined that the data message to be sent is the data message with sending exception.
[0037] Optionally, the data message can be a high-frequency data message generated by a business system due to a business event change, and the push system first calls a server of the message middleware to send the data message to be sent to the message middleware. The push system performs high-frequency data message push anomaly detection, including detecting the call duration of the server of the message middleware, for example, detecting whether there is a message middleware server call timeout during the push process (i.e., a case where the call duration is greater than a preset duration). If there is a call timeout, it is considered that the current push fails, that is, it is determined that the data message to be sent is a data message with sending anomaly, and it is written into a push anomaly data table (i.e., a first data table) for storage. That is, the push system stores the data message with sending anomaly in the first data table when detecting that there is a data message with sending anomaly in the data message sending process.
[0038] Optionally, the anomaly detection further includes detecting feedback information of the server, for example, detecting whether the server has normal information feedback after the message is sent to the server of the message middleware. For example, under normal circumstances, the server will feedback the partition number and offset number of the message pushed to the message middleware. In the case of detecting abnormal feedback information (for example, no feedback information or offset number is -1), it is considered that the current push fails, and it also needs to be written into the push anomaly data table.
[0039] Optionally, a document-oriented distributed database (Elasticsearch, es) is used to store complete abnormal messages, and an abnormal information index is constructed in combination with the business meaning of the message itself, for example, an index named exception_reports is created, and its fields include: message ID (message_id), flight number (flight_number), flight date (flight_date), message source (message_source), message type (message_type), message time (message_time), and compressed message (compressed_message).
[0040] Optionally, a timing task component is used to establish an independent routing link to process abnormal messages, and the action of data remediation is executed in a specified cycle, that is, the data message with sending anomaly is obtained from the first data table based on a preset time interval, and it is determined whether to resend the data message with sending anomaly.
[0041] Optionally, a corresponding message topic is built in the message middleware for each airline to ensure that the high-frequency message data of each airline is isolated from each other, for example, the message topic corresponding to airline A is topic 1, and the message topic corresponding to airline B is topic 2. Therefore, after it is judged that the data message with sending exception needs to be re-sent, the data message with sending exception can be sent to the target topic corresponding to the target airline system corresponding to the data message with sending exception in the message middleware.
[0042] In an optional embodiment, after it is judged whether the data message with sending exception needs to be re-sent, a result is obtained. If the result is that the data message with sending exception does not need to be re-sent, the data message with sending exception is deleted from the first data table.
[0043] In an optional embodiment, after the data message with sending exception is sent to the target topic corresponding to the target airline system corresponding to the data message with sending exception in the message middleware, the sending number corresponding to the data message with sending exception in the first data table is incremented by one.
[0044] Optionally, the push number (i.e., the sending number) is recorded in the abnormal data table, which is used to judge whether the message needs to be re-pushed. For example, if the push number is greater than a set repeated push number (i.e., a preset threshold), the data needs to be deleted, i.e., the data message with sending exception is deleted from the first data table; if the push number is less than or equal to the preset threshold, the message is re-pushed, and the push number is incremented by one.
[0045] Based on the scheme defined in steps S101 to S103, it can be known that in the embodiment of the present application, when it is detected that there is a data message with sending exception in the data message sending process, the data message with sending exception is stored in the first data table, wherein the first data table is used to record the field information and the metadata information of the data message with sending exception; the data message with sending exception is obtained from the first data table based on a preset time interval, and it is judged whether the data message with sending exception needs to be re-sent, and a result is obtained; if the result is that the data message with sending exception needs to be re-sent, the data message with sending exception is sent to the target topic corresponding to the target airline system corresponding to the data message with sending exception in the message middleware.
[0046] It is easy to note that in the above process, the data message with sending exception is obtained from the first data table based on the preset time interval, and it is judged whether the data message with sending exception is re-sent, so that the supplement demand at the time of transmission exception is automatically completed in time, the automatic supplement of the civil aviation high-frequency message transmission is realized, the data loss rate caused by system failure or network interruption is reduced, the complexity and workload of manual supplement are reduced, the problems caused by repeated sending of messages are avoided, the smoothness of the integration of internal information of the airline is ensured, the efficiency and quality of flight operation, ticket sales and passenger service are improved, the integrity and reliability of data transmission of the airline are enhanced, and therefore the passenger satisfaction and service quality of the airline are effectively improved.
[0047] Therefore, through the technical scheme of the present application, the purpose of automatically completing the supplement demand at the time of transmission exception in time is achieved, thereby realizing the technical effect of improving the re-sending efficiency of the abnormal data message, and further solving the technical problem of low efficiency in the prior art that the abnormal data message in the data transmission process is re-sent by manual operation.
[0048] In an optional embodiment, judging whether the data message with sending exception is re-sent to obtain a judgment result comprises: obtaining the sending times corresponding to the data message with sending exception from the first data table, and comparing the sending times with a preset threshold; if the sending times are less than or equal to the preset threshold, the data message with sending exception is re-sent as the judgment result; if the sending times are greater than the preset threshold, the data message with sending exception is not re-sent as the judgment result.
[0049] Optionally, in the process of judging whether the data message with sending exception is re-sent to obtain a judgment result, first, the sending times corresponding to the data message with sending exception are obtained from the first data table, and the sending times are compared with a preset threshold; if the sending times are less than or equal to the preset threshold, the data message with sending exception is re-sent as the judgment result; if the sending times are greater than the preset threshold, the data message with sending exception is not re-sent as the judgment result. For example, if the push quantity is greater than the set repeated push quantity (i.e. the preset threshold), the data needs to be deleted, i.e. the data message with sending exception is deleted in the first data table; if the push quantity is less than or equal to the preset threshold, the message is re-pushed, and the push quantity is increased by 1.
[0050] In an optional embodiment, the message middleware is used to obtain the data message with sending exception from the target topic corresponding to the target airline system, send the data message with sending exception to the target airline system, and store the characteristic information of the data message with sending exception and the offset corresponding to the characteristic information in the second data table.
[0051] In an optional embodiment, the data message acquisition request sent by the target airline system is received through the message middleware, wherein the data message acquisition request at least includes target feature information of the data message to be acquired; the offset corresponding to the feature information same as the target feature information is acquired from the second data table, and the data message to be acquired is determined according to the offset; and the data message to be acquired is sent to the target airline system.
[0052] Optionally, the offset and data retransmission mechanism of each message are recorded by using the message middleware, the data in a specific time range can be supplemented, and the data supplement method with the business scene characteristic requirement of the airline is provided. For example, the message middleware can acquire the data message sent abnormally from the target topic corresponding to the target airline system, send the data message sent abnormally to the target airline system, and store the feature information (such as a feature field) of the data message sent abnormally and the offset corresponding to the feature information in the push record data table (i.e., the second data table). For another example, when a certain airline system (i.e., the target airline system) proposes a requirement for supplementing the push, the data message acquisition request sent by the target airline system is received through the message middleware, the offset value corresponding to the target feature information such as the type of the missing message and the time period of the missing message provided by the airline is acquired from the push record data table according to the missing data clue provided by the airline, and the related data (i.e., the data message to be acquired) of the airline system is pushed again by using the message middleware client through the offset value acquired, that is, the data message to be acquired is sent to the target airline system.
[0053] It should be noted that the automatic supplement through the message middleware provides a targeted data remediation method for the airline, compared with the blind batch push, the high-frequency message can be screened and filtered according to the specific requirements of the airline, the accurate and rapid supplement is achieved, and the loss of the airline is effectively reduced.
[0054] In an optional embodiment, the data message supplement can be implemented by using the schematic diagram shown in Figure 2 Figure 2 is a flow diagram of the automatic data message supplement of the push system according to an embodiment of the application, as shown in Figure 2 As shown, the push system starts data message pushing to provide high-frequency data for the airline, and when an abnormal push is found, the message of this sending failure is attempted to be resent, which can be understood as the system attempting automatic complement. Specifically, the push system performs high-frequency data message push abnormality detection, mainly including message middleware server call timeout detection and server feedback information detection, when the push abnormality occurs (for example, message middleware server call timeout or server feedback information abnormality), the high-frequency message that has not been successfully pushed is stored in the push abnormality data table in the database. By creating a separate process, the abnormal message is obtained from the database according to a period cycle and is pushed to the message middleware again, and the process can use a timing task to realize periodic execution. In order to track the push situation of the abnormal message, the push number of each abnormal message is recorded in the database, and the number is updated after each re-push. In order to maintain the normal operation of the database and avoid that the abnormal message occupies too much storage space, the abnormal message whose push number exceeds a certain threshold is deleted at a time, and the threshold can be set according to the actual situation. Optionally, in order to facilitate problem troubleshooting and performance optimization, the log of the key steps is recorded, and the whole process is monitored to generate monitoring logs, for example, monitoring the number of abnormal messages processed every day, and the proportion of successful push, etc. By screening the log, the most problem message type, the most problem time period, the message that still cannot complete the push after multiple retries after the problem occurs, etc. can be analyzed. From the collected data combined with the environment at that time, the cause of the problem is summarized, and the application is further improved to avoid similar problems.
[0055] It should be noted that the push system automatic complement is a self-help strategy for abnormal messages in the high-frequency data forwarding process, which can reduce the push abnormality caused by the failure of the push application itself.
[0056] In an optional embodiment, the data message complement can be implemented by the schematic diagram shown in FIG. 6, Figure 3 Figure 3 is a flowchart of an optional message middleware automatic reissue data message according to an embodiment of the application. By using the message middleware to record the offset and data retransmission mechanism of each message, the data in a specific time range can be supplemented, and a data supplement method with business scenario characteristics is provided for the airlines. First, a message middleware consumer is created and a corresponding message topic is constructed for each airline to ensure that the high-frequency data of each airline is isolated from each other. The consumer is responsible for reading high-frequency data from the message topic and pushing it to the corresponding airline system. A custom callback function is implemented in the consumer to record the current offset, i.e., the consumer records the current offset each time it reads data from the message topic. At the same time, the characteristic fields of each high-frequency data (such as flight number, flight date, message source, message type, message time, etc.) are also stored in the push record data table in the database, i.e., the push record data table contains these characteristic fields and the corresponding offset. Taking the high-frequency data of the Electronic Ticketing System (ETS) as an example, the flight number, flight date, PNR number, message type, message time, etc. in the ETS message need to be extracted and stored in the database. As shown in Figure 3 the push system receives the original data message, parses the message, reads the push rules from the push rule library, and pushes the data message to the topic corresponding to the airline (such as Air China, China Southern Airlines, Hainan Airlines, etc.) in the message middleware. The message middleware integrates the airline response information and the push message information to generate a push record stored in the database. When a certain airline system requests to supplement the push, according to the missing data clues (such as the type of missing messages, the time period of missing messages, etc.) and the characteristic fields provided by the airline, the corresponding offset value can be obtained from the database, and the related data is pushed to the airline system again using the message middleware client. In the push process, unnecessary high-frequency data can be filtered according to user demands, for example, specific type messages that the user wants are filtered out. Optionally, in order to facilitate problem troubleshooting and performance optimization, logs of key steps are recorded, and the entire process is monitored to generate monitoring logs, for example, the number of messages processed per day, the number of requests for supplementary push, etc., which can provide a check list for airline data supplement.
[0057] In the embodiment of the present application, the push system automatic complement scheme is provided, that is, when the push is abnormal, the push system automatically detects and stores the abnormal message, and then re-pushes the abnormal message through a timing task; the message middleware automatic complement scheme is also provided, that is, the offset and characteristic field of each message are recorded by the consumer, when the airline proposes a supplement push requirement, the corresponding offset is found according to the characteristic field, the missing message data is re-pushed by using the client, and data screening and filtering are performed according to the requirements of the airline during the push process. The data loss problem in the civil aviation high-frequency message transmission process is effectively solved, the high-frequency message can be timely and accurately complemented even if a fault occurs during the transmission process, the risk of data loss is reduced, and the integrity and reliability of data transmission are improved.
[0058] Therefore, through the technical scheme of the present application, the complement demand when the transmission exception occurs can be automatically completed in time, so that the technical effect of improving the reissue efficiency of the abnormal data message is achieved, and the technical problem of low efficiency in the prior art that the abnormal data message in the data transmission process is reissued by relying on manual work is solved.
[0059] Embodiment 2
[0060] According to the embodiment of the present application, an embodiment of a data message processing device is provided, wherein, Figure 4 is a schematic diagram of an optional data message processing device according to the embodiment of the present application, as Figure 4 shown, the device comprises: a first processing module 401, configured to store the data message with sending exception in a first data table when it is detected that the data message with sending exception exists in the data message sending process, wherein the first data table is used to record the field information and metadata information of the data message with sending exception; a second processing module 402, configured to acquire the data message with sending exception from the first data table based on a preset time interval, and judge whether to resend the data message with sending exception, to obtain a judgment result; and a third processing module 403, configured to send the data message with sending exception to a target topic corresponding to a target airline system corresponding to the data message with sending exception in the message middleware if the judgment result is to resend the data message with sending exception.
[0061] It should be noted that the first processing module 401, the second processing module 402 and the third processing module 403 correspond to steps S101 to S103 in the above embodiment, and the three modules have the same examples and application scenarios as the corresponding steps, but are not limited to the content disclosed in the above embodiment 1.
[0062] Optionally, the second processing module comprises: a comparison module, configured to acquire the sending times corresponding to the data message with sending exception from the first data table, and compare the sending times with a preset threshold; a first determination module, configured to, if the sending times are less than or equal to the preset threshold, take re-sending the data message with sending exception as the judgment result; and a second determination module, configured to, if the sending times are greater than the preset threshold, take not sending the data message with sending exception as the judgment result.
[0063] Optionally, the data message processing apparatus further comprises: a fourth processing module, configured to, before detecting the data message with sending exception in the data message sending process, invoke the server of the message middleware to send the data message to be sent to the message middleware; a third determination module, configured to detect the invocation duration of the server of the message middleware, and determine that the data message to be sent is the data message with sending exception if the invocation duration is greater than a preset duration; and a fourth determination module, configured to, if the invocation duration is less than or equal to the preset duration, detect the feedback information of the server, and determine that the data message to be sent is the data message with sending exception if the feedback information is abnormal.
[0064] Optionally, the message middleware is configured to acquire the data message with sending exception from the target topic corresponding to the target airline system, send the data message with sending exception to the target airline system, and store the feature information of the data message with sending exception and the offset corresponding to the feature information in the second data table.
[0065] Optionally, the data message processing apparatus further comprises: a receiving module, configured to receive a data message acquisition request sent by the target airline system through the message middleware, wherein the data message acquisition request at least comprises target feature information of the data message to be acquired; a fifth determination module, configured to acquire the offset corresponding to the feature information same as the target feature information from the second data table, and determine the data message to be acquired according to the offset; and a sending module, configured to send the data message to be acquired to the target airline system.
[0066] Optionally, the data message processing apparatus further comprises: a fifth processing module, configured to, after judging whether to re-send the data message with sending exception and obtaining the judgment result, delete the data message with sending exception from the first data table if the judgment result is not to send the data message with sending exception.
[0067] Optionally, the data message processing apparatus further comprises: a sixth processing module, configured to, after sending the data message with sending exception to the target topic corresponding to the target airline system corresponding to the data message with sending exception in the message middleware, perform an increment operation on the sending times corresponding to the data message with sending exception in the first data table.
[0068] Embodiment 3
[0069] According to another aspect of the embodiments of the present application, there is also provided a computer program product comprising a computer program which, when executed by a processor, implements the above-mentioned data message processing method.
[0070] Embodiment 4
[0071] According to another aspect of the embodiments of the present application, there is also provided a computer readable storage medium having a computer program stored therein, wherein the computer program is configured to perform the above-mentioned data message processing method when executed.
[0072] Embodiment 5
[0073] According to another aspect of the embodiments of the present application, there is also provided an electronic device, wherein Figure 5 is a schematic diagram of an optional electronic device according to an embodiment of the present application, as shown in Figure 5 The electronic device comprises one or more processors; a memory for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement a program for running, wherein the program is configured to perform the above-mentioned data message processing method when executed. The processor implements the following steps when executing the program: in a case where it is detected that there is a sending-exception data message in a data message sending process, storing the sending-exception data message in a first data table, wherein the first data table is used to record field information and metadata information of the sending-exception data message; obtaining the sending-exception data message from the first data table based on a preset time interval, and determining whether to resend the sending-exception data message, to obtain a determination result; if the determination result is to resend the sending-exception data message, sending the sending-exception data message to a target topic corresponding to a target airline system corresponding to the sending-exception data message in a message middleware.
[0074] Optionally, the processor further implements the following steps when executing the program: obtaining a sending frequency corresponding to the sending-exception data message from the first data table, and comparing the sending frequency with a preset threshold; if the sending frequency is less than or equal to the preset threshold, taking resending the sending-exception data message as the determination result; if the sending frequency is greater than the preset threshold, taking not sending the sending-exception data message as the determination result.
[0075] Optionally, the processor, when executing the program, further implements the following steps: calling a server of the message middleware to send the data message to be sent to the message middleware before detecting the data message with sending exception in the data message sending process; detecting a calling duration of the server of the message middleware, and determining that the data message to be sent is the data message with sending exception when detecting that the calling duration is greater than a preset duration; detecting feedback information of the server when detecting that the calling duration is less than or equal to the preset duration, and determining that the data message to be sent is the data message with sending exception when detecting that the feedback information is abnormal.
[0076] Optionally, the message middleware is configured to acquire the data message with sending exception from a target topic corresponding to the target airline system, send the data message with sending exception to the target airline system, and store the characteristic information of the data message with sending exception and the offset corresponding to the characteristic information in the second data table.
[0077] Optionally, the processor, when executing the program, further implements the following steps: receiving a data message acquisition request sent by the target airline system through the message middleware, wherein the data message acquisition request at least includes target characteristic information of a data message to be acquired; acquiring an offset corresponding to the same characteristic information as the target characteristic information from the second data table, and determining the data message to be acquired according to the offset; and sending the data message to be acquired to the target airline system.
[0078] Optionally, the processor, when executing the program, further implements the following steps: after judging whether to resend the data message with sending exception and obtaining a judgment result, if the judgment result is not to send the data message with sending exception, deleting the data message with sending exception in the first data table.
[0079] Optionally, the processor, when executing the program, further implements the following steps: after sending the data message with sending exception to a target topic corresponding to a target airline system corresponding to the data message with sending exception in the message middleware, performing a plus operation on a sending number corresponding to the data message with sending exception in the first data table.
[0080] The device herein can be a server, a PC, a PAD, a mobile phone, etc.
[0081] The above-mentioned serial numbers of the embodiments of the application only serve for description, and do not represent the advantages or disadvantages of the embodiments.
[0082] In the above-mentioned embodiments of the application, the description of each embodiment has its own emphasis, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0083] In several embodiments provided in the present application, it should be understood that the disclosed technology can be implemented by other means. Among them, the above-mentioned device embodiments are only schematic, for example, the division of the units can be a logical function division, and actual implementation can have another division mode, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be through some interface, indirect coupling or communication connection between units or modules, which can be electrical or other forms.
[0084] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed to multiple units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0085] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0086] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.
[0087] The above is only the preferred embodiment of the present application, and it should be pointed out that for ordinary skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should be considered as the protection scope of the present application.
Claims
1. A method for processing a data packet, the method comprising: The method comprises the following steps: In the case of detecting that there is a data packet with sending exception in the data packet sending process, the data packet with sending exception is stored in a first data table, wherein the first data table is used to record field information and metadata information of the data packet with sending exception; Based on a preset time interval, the data packet with sending exception is obtained from the first data table, and it is judged whether to resend the data packet with sending exception, to obtain a judgment result; If the judgment result is to resend the data packet with sending exception, the data packet with sending exception is sent to a target theme corresponding to a target airline system corresponding to the data packet with sending exception in a message middleware; The message middleware is used to obtain the data packet with sending exception from the target theme corresponding to the target airline system, send the data packet with sending exception to the target airline system, and store feature information of the data packet with sending exception and an offset corresponding to the feature information in a second data table; The method further comprises: The message middleware receives a data packet acquisition request sent by the target airline system, wherein the data packet acquisition request at least includes target feature information of a data packet to be acquired; The offset corresponding to the feature information same as the target feature information is obtained from the second data table, and the data packet to be acquired is determined according to the offset; The data packet to be acquired is sent to the target airline system.
2. The method of claim 1, wherein, Judging whether to resend the data packet with sending exception, to obtain a judgment result, comprises: The number of times of sending corresponding to the data packet with sending exception is obtained from the first data table, and the number of times of sending is compared with a preset threshold value; If the number of times of sending is less than or equal to the preset threshold value, the judgment result is to resend the data packet with sending exception; If the number of times of sending is greater than the preset threshold value, the judgment result is not to send the data packet with sending exception.
3. The method of claim 1, wherein, Before detecting that there is a data packet with sending exception in the data packet sending process, the method further comprises: The server of the message middleware is called to send a data packet to be sent to the message middleware; The calling duration of the server of the message middleware is detected, and in the case of detecting that the calling duration is greater than a preset duration, it is determined that the data packet to be sent is the data packet with sending exception; In the case of detecting that the calling duration is less than or equal to the preset duration, the feedback information of the server is detected, and in the case of detecting that the feedback information is abnormal, it is determined that the data packet to be sent is the data packet with sending exception.
4. The method of claim 1, wherein, After judging whether to resend the data packet with sending exception, to obtain a judgment result, the method further comprises: If the judgment result is not to send the data packet with sending exception, the data packet with sending exception is deleted in the first data table.
5. The method of claim 1, wherein, After the sending-exception data message is sent to a target topic corresponding to a target airline system corresponding to the sending-exception data message in a message middleware, the method further comprises: Incrementing the sending times corresponding to the sending-exception data message in the first data table.
6. A data packet processing apparatus, characterized by comprising: Comprise: A first processing module is configured to store the sending-exception data message in a first data table when it is detected that there is a sending-exception data message in a data message sending process, wherein the first data table is used to record field information and metadata information of the sending-exception data message; A second processing module is configured to acquire the sending-exception data message from the first data table based on a preset time interval, and determine whether to resend the sending-exception data message, to obtain a determination result; A third processing module is configured to send the sending-exception data message to a target topic corresponding to a target airline system corresponding to the sending-exception data message in a message middleware if the determination result is to resend the sending-exception data message; The message middleware is configured to acquire the sending-exception data message from the target topic corresponding to the target airline system, send the sending-exception data message to the target airline system, and store characteristic information of the sending-exception data message and an offset corresponding to the characteristic information in a second data table; The apparatus further comprises a receiving module configured to receive a data message acquisition request sent by the target airline system through the message middleware, wherein the data message acquisition request at least comprises target characteristic information of a data message to be acquired; a fifth determining module configured to acquire an offset corresponding to the same characteristic information as the target characteristic information from the second data table, and determine the data message to be acquired according to the offset; and a sending module configured to send the data message to be acquired to the target airline system.
7. A computer readable storage medium characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program is set to execute the data message processing method in any one of claims 1 to 5 when running.
8. An electronic device, comprising: The electronic device comprises one or more processors; A memory is configured to store one or more programs, which make the one or more processors implement a program for running when the one or more programs are executed by the one or more processors, wherein the program is set to execute the data message processing method in any one of claims 1 to 5 when running.
Citation Information
Patent Citations
Data retransmission processing method and device
CN115391097A
Abnormal message processing method and device
CN115396339A