A method and device for data calling

By listening to user operations in the system and generating data call requests, combined with the query mechanism of local training data records, the problem of system availability reduction when third-party interfaces are not available is solved, and the reliability and efficiency of data call is improved.

CN110554895BActive Publication Date: 2025-03-18BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201810552460.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-05-31
Publication Date
2025-03-18
Estimated Expiration
2038-05-31

AI Technical Summary

Technical Problem

In the prior art, when the system calls a third-party interface, when the network is abnormal or the third-party interface is unavailable, the availability rate of the system will be reduced, which will affect operational production and waste time for operators.

Method used

By listening to the user's click operation on the application interface, a data call request is generated, and when the third-party interface fails, the local training data record is queried to obtain the required data. The method includes getting historical, pre- and real-time data, training and updating records to perform matching queries when interface fails.

Benefits of technology

Reduces business processing problems caused by third-party interface exceptions, improves the reliability of data calls, and reduces time waste for operators. By analyzing the matching amount and matching rate in the flow log, training data can be better monitored and updated.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110554895B_ABST
    Figure CN110554895B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for data calling, and relates to the field of computer technology. A specific implementation of the method includes: monitoring the user's click operation on the application interface, generating a corresponding data call request based on the click operation; transmitting the data call request to a third-party interface, and when receiving the call failure information fed back by the third-party interface, querying the local training data record based on the data call request; when the query shows that there is training data corresponding to the data call request, extracting the queried training data and outputting it. This implementation serves as an emergency strategy for third-party interface anomalies. In the event that the third-party interface is abnormal or even unavailable, its data can be obtained locally, which is convenient for the client to continue subsequent business processes and reduces dependence on the third-party interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for data calling. Background Art

[0002] When solving business problems, the system often needs to rely on third-party interfaces to obtain relevant business information. For example, electronic waybills rely on third-party carriers to obtain relevant information, and order after-sales operations rely on order intermediate file information.

[0003] However, in the process of implementing the present invention, the inventors found that the prior art has at least the following problems: when a network anomaly occurs or a third-party interface is unavailable, the availability of the system call interface will be reduced, affecting job production and causing a huge waste of time for system operators. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a method and device for data calling, which can at least solve the problem of high dependence on third-party interfaces in the prior art. When the call to the third-party interface fails, data cannot be obtained, resulting in the inability to perform subsequent processes.

[0005] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for data calling is provided, comprising:

[0006] Monitor the user's click operations on the application interface and generate corresponding data call requests based on the click operations;

[0007] Transmitting a data call request to a third-party interface, and when receiving a call failure message fed back by the third-party interface, querying the local training data record based on the data call request;

[0008] When the query finds that there is training data corresponding to the data call request, the queried training data is extracted and output.

[0009] Optionally, the training data record includes historical training data;

[0010] Before monitoring the user's click operation on the application interface and generating a corresponding data call request based on the click operation, it also includes:

[0011] Acquire historical data and determine address information of each historical data; based on each address information, generate a corresponding first data call request, and transmit the generated first data call request to a third-party interface; receive first data fed back by the third-party interface, extract historical data matching the received first data, determine that the extracted historical data is historical training data, and update the training data record based on the determined historical training data.

[0012] Optionally, obtaining historical data and determining address information of each historical data includes: obtaining historical data, determining address information of each historical data, and splitting each address information into five levels of address information according to a predetermined address splitting method.

[0013] Optionally, the training data record includes previous training data;

[0014] Before monitoring the user's click operation on the application interface and generating a corresponding data call request based on the click operation, it also includes:

[0015] Acquire pre-data and determine parameter information of each pre-data; wherein the pre-data is data that has been generated but has not reached the cycle of calling the third-party interface; based on a predetermined verification method, verify the parameter information in each pre-data and extract the pre-data that meets the verification rules; determine that the extracted pre-data is pre-training data, add the pre-training data to the training data record, and update the training data record.

[0016] Optionally, the front-end data is order data, and the parameter information includes at least order type and order carrier information;

[0017] Based on a predetermined verification method, the parameter information in each pre-data is verified, and the pre-data that meets the verification rules is extracted, including: obtaining a predetermined order type table, and when the order type is queried in the order type table, detecting whether the order carrier information is expired, and extracting order data whose order carrier information has not expired.

[0018] Optionally, the training data record includes real-time training data;

[0019] Before monitoring the user's click operation on the application interface and generating a corresponding data call request based on the click operation, it also includes:

[0020] Acquire real-time data and traverse training data records; when there is no training data matching the real-time data, determine that the real-time data is real-time training data; add the real-time training data to the training data record to update the training data record.

[0021] To achieve the above object, according to another aspect of an embodiment of the present invention, a data calling device is provided, comprising:

[0022] The request generation module is used to: monitor the user's click operation on the application interface and generate corresponding data call requests based on the click operation;

[0023] A request transmission module is used to: transmit a data call request to a third-party interface, and when a call failure message is received from the third-party interface, query the local training data record based on the data call request;

[0024] The data acquisition module is used to: when it is queried that there is training data corresponding to the data call request, extract the queried training data and output it.

[0025] Optionally, the training data record includes historical training data;

[0026] The device also includes a historical data training module for:

[0027] Acquire historical data and determine address information of each historical data; based on each address information, generate a corresponding first data call request, and transmit the generated first data call request to a third-party interface; receive first data fed back by the third-party interface, extract historical data matching the received first data, determine that the extracted historical data is historical training data, and update the training data record based on the determined historical training data.

[0028] Optionally, a historical data training module is used to: obtain historical data, determine the address information of each historical data, and split each address information into five levels of address information according to a predetermined address splitting method.

[0029] Optionally, the training data record includes previous training data;

[0030] The device also includes a pre-data training module, which is used to: obtain pre-data and determine parameter information of each pre-data; wherein the pre-data is data that has been generated but has not reached the cycle of calling a third-party interface; based on a predetermined verification method, the parameter information in each pre-data is verified, and the pre-data that meets the verification rules is extracted; determine that the extracted pre-data is pre-training data, add the pre-training data to the training data record, and update the training data record.

[0031] Optionally, the front-end data is order data, and the parameter information includes at least order type and order carrier information;

[0032] The pre-data training module is used to: obtain a predetermined order type table, and when an order type is found in the order type table, detect whether the order carrier information is expired, and extract order data whose order carrier information has not expired.

[0033] Optionally, the training data record includes real-time training data;

[0034] The device also includes a real-time data training module, which is used to: obtain real-time data and traverse training data records; when there is no training data matching the real-time data, determine that the real-time data is real-time training data; add the real-time training data to the training data record to update the training data record.

[0035] To achieve the above objective, according to another aspect of an embodiment of the present invention, an electronic device for data calling is provided.

[0036] The electronic device of an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement any of the data calling methods described above.

[0037] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, any of the above-mentioned data calling methods is implemented.

[0038] According to the solution provided by the present invention, one embodiment of the above invention has the following advantages or beneficial effects: by targeted training of real-time data, historical data and pre-data, multi-dimensional data training operations can be implemented. When the call to the third-party interface fails, matching queries can be performed through the locally trained data, thereby reducing the business processing problems caused by the abnormality of the third-party interface. In addition, by analyzing the matching quantity and matching rate in the flow log, the trained data can be better monitored.

[0039] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0041] Figure 1 This is a schematic diagram of the main flow of a data calling method according to an embodiment of the present invention;

[0042] Figure 2 is a flow chart of an optional data calling method according to an embodiment of the present invention;

[0043] Figure 3 is a flowchart of another optional data calling method according to an embodiment of the present invention;

[0044] Figure 4 is a flowchart of another optional data calling method according to an embodiment of the present invention;

[0045] Figure 5 is a flowchart of a specific data calling method according to an embodiment of the present invention;

[0046] Figure 6 is a schematic diagram of main modules of a data calling device according to an embodiment of the present invention;

[0047] Figure 7 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0048] Figure 8 It is a schematic diagram of the structure of a computer system of a mobile device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0049] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0050] It should be noted that the embodiment of the present invention can be regarded as an alternative solution when the third-party interface fails to be called. When the third-party interface is abnormal, the reliability of most data calls can be guaranteed through the present invention.

[0051] For the nouns involved in the present invention, the statistical explanations are as follows:

[0052] Electronic waybill: refers to a logistics service provided by express delivery companies to sellers that prints out paper logistics waybills via thermal paper.

[0053] Third-party carrier: that is, the carrier, refers to the party who enters into a contract for the transportation of goods or passengers by water or actually performs all or part of the transportation thereof, which can be understood as a logistics carrier.

[0054] Five levels of address: province, city, district, county, street and town, road / village / community / building, etc. are assigned a unique universal identification code, similar to how each building has a "postal code".

[0055] Pop: A unified name for third-party sales.

[0056] Sop: Use e-commerce platforms to sell merchants' products and provide merchants with an independent operating background, requiring shipment within 12 hours of order placement, with the merchants responsible for all services.

[0057] binlog log: binary log, which records all changes on the database and saves it in binary form on disk; it can be used to view the database change history, database incremental backup and recovery, etc.

[0058] See also Figure 1, which shows a main flow chart of a data calling method provided by an embodiment of the present invention, comprising the following steps:

[0059] S101: monitoring a user's click operation on an application interface, and generating a corresponding data call request based on the click operation.

[0060] S102: Transmit a data call request to a third-party interface. When a call failure message is received from the third-party interface, query the local training data record based on the data call request.

[0061] S103: When it is found that there is training data corresponding to the data call request, the queried training data is extracted and output.

[0062] In the above implementation, for step S101, the data call request can be generated based on a user's click operation on the application business interface, for example, when an electronic waybill needs to be printed.

[0063] For step S102, the third-party interface may be available or unavailable, so the data call may also be successful or failed. If successful, the call result is directly returned to the client to facilitate the client to perform subsequent business processing.

[0064] However, if the call fails, you need to perform a matching query from the local training data record. The training data can include various types, such as historical training data, real-time training data, pre-training data, etc. For details, see the following Figure 2 to Figure 4 Description.

[0065] For step S103, if there is training data corresponding to the data call request in the training data record, the query result is directly returned, such as data call request 1-training data 1, and the database cache is updated based on this matching situation to facilitate subsequent query operations.

[0066] If the query does not exist, it may be caused by network anomalies or other reasons. You need to record the abnormal call, such as pending task information, to enter the waiting queue for the next call. For example, you can call the data call request again through worker rotation to improve the integrity of the overall data.

[0067] It should be noted that in the case where the local query results do not exist due to reasons other than network failure, the called data still needs to be obtained based on the third-party interface. However, if the third-party interface is not available, the interface needs to be repaired by relevant personnel.

[0068] The method provided in the above embodiment can obtain some data locally when the third-party interface is abnormal or even unavailable, so that the client can continue the subsequent business process and reduce the system problems of the client itself caused by the third-party interface abnormality.

[0069] See also Figure 2 , shows a schematic flow chart of an optional data calling method according to an embodiment of the present invention, comprising the following steps:

[0070] S201: Acquire historical data and determine the address information of each historical data.

[0071] S202: Generate a corresponding first data call request based on each address information, and transmit the generated first data call request to a third-party interface.

[0072] S203: Receive first data fed back by a third-party interface.

[0073] S204: extracting historical data matching the received first data, determining the extracted historical data as historical training data, and updating the training data record based on the determined historical training data.

[0074] S205: monitoring the user's click operation on the application interface, and generating a corresponding data call request based on the click operation.

[0075] S206: Transmitting a data call request to a third-party interface, and when receiving call failure information fed back by the third-party interface, querying in local training data records based on the data call request.

[0076] S207: When it is found that there is training data corresponding to the data call request, the queried training data is extracted and output.

[0077] In the above implementation, steps S205 to S207 can be respectively referred to Figure 1 The description of steps S101 to S103 is not repeated here.

[0078] Historical training data is mainly used to re-match the original historical data, with the aim of generating training data records to facilitate subsequent data calls to obtain more real and reliable results.

[0079] In the above implementation, in step S201, the training of historical data is mainly performed based on its address information. Based on the uniqueness of the address information, the obtained addressing data is relatively accurate.

[0080] Furthermore, in order to make the addressing result more accurate, the address can be split into five levels, specifically into communities, buildings, etc., to reduce data confusion caused by similar addresses.

[0081] For step S202, the worker traverses all known historical data, and the known historical data may be all data stored in the database.

[0082] Based on the address information of the historical data, the corresponding first data call request (for example, the historical data call request) is transmitted to the third-party interface. If the call is successful, the existing training data records are judged, but if the call fails, it enters the waiting queue for the next call. If the call fails all the time, manual intervention is required.

[0083] For steps S203 and S204, there is only one record of the same data in the training data record, but multiple log records may be associated with each log record, and each log record respectively records the update and replacement of the data.

[0084] The training of historical data is actually the process of traversing and sorting the historical known data, specifically traversing according to its address information.

[0085] Compare the current data obtained from the third-party interface with the original historical data. There may be two results:

[0086] 1) The two do not match, proving that the data corresponding to the address information is subsequently changed, etc. In order to reduce the situation of abnormal business processing due to subsequent data errors, the corresponding training data record may not be generated;

[0087] 2) The two match, proving that the data corresponding to the address information has not been subsequently changed or otherwise operated, and confirming that the original historical data or the data called this time is historical training data.

[0088] There are different ways to process historical training data:

[0089] ① When the system is just launched, the training data record is empty, and the historical training data can be directly added to the training data record for storage;

[0090] ② After the system is online, the training data record already exists. If there is training data corresponding to the address information, it is necessary to determine whether the data called this time matches the original training data. If not, in order to improve the accuracy of subsequent local data calls, the original training data can be replaced with the data called this time.

[0091] When the system is initially launched, the training data record may only contain part of the original historical data, for example, due to network anomalies, the third-party interface only feeds back part of the data. Therefore, for the subsequent collation of historical data, there may be a situation where the data corresponding to the address information cannot be found. In this case, you can directly add training data to the training data record and simultaneously update the local database and cache information.

[0092] For example, a user may place multiple orders with the same order address. The first order record cannot be found in the training records. In this case, the order data is directly recorded. However, the address information of subsequent orders can be found in the training data.

[0093] Through the above steps, the training process of all historical data is completed, and the training data record is updated. The recorded data may include: historical data, data of this call to the third-party interface, etc.

[0094] The method provided in the above embodiment provides a training process for historical data, and based on the update of the training data records, the accuracy of subsequent data acquisition can be improved.

[0095] See also Figure 3 , shows a schematic flow chart of another optional method for data calling according to an embodiment of the present invention, comprising the following steps:

[0096] S301: Acquire pre-data and determine parameter information of each pre-data; wherein the pre-data is data that has been generated but has not reached the cycle of calling the third-party interface.

[0097] S302: Based on a predetermined verification method, verify the parameter information in each pre-data, and extract the pre-data that meets the verification rules.

[0098] S303: Determine that the extracted pre-data is pre-training data, and add the pre-training data to the training data record to update the training data record.

[0099] S304: monitoring the user's click operation on the application interface, and generating a corresponding data call request based on the click operation.

[0100] S305: Transmitting a data call request to a third-party interface, and when receiving call failure information fed back by the third-party interface, querying in local training data records based on the data call request.

[0101] S306: When the query finds that there is training data corresponding to the data call request, the queried training data is extracted and output.

[0102] In the above implementation, steps S304 to S306 can be respectively referred to Figure 1 The description of steps S101 to S103 is not repeated here.

[0103] There may be a time difference between the data call of the third-party interface and the actual operation. For example, after an order is placed, it may take 1 hour to call the third-party interface to print the logistics order.

[0104] In order to improve the accuracy of various training data, such data can be set as pre-data, such as data before the interface is called after an order is placed, for data training.

[0105] In the above implementation, for step S301, the pre-data may be data that may be used later and the judgment requires human participation, such as order data during a promotion period. This embodiment is described by taking order data as an example.

[0106] After the client detects that the user has completed the order operation, it will push the order information to the MQ (Queue managers) as the entry point for the front-end data source.

[0107] The training of the pre-data can be regarded as a data verification and screening process. The verification and filtering process needs to rely on its parameter information, such as order type, merchant information, carrier information, etc.

[0108] For step S302, there may be certain verification rules for the verification and screening process of the pre-data. Taking order data as an example, the verification process is as follows:

[0109] 1) First, according to the order type, determine whether it is within the pre-set type; for example, the pre-set order types include pop, self-operated, etc., which are stored in the order type table, and the order type of the order obtained this time is sop, so the verification result does not match, and the order data is directly eliminated;

[0110] 2) For orders that require transportation, there is related carrier information. Based on the merchant code in the order, the carrier maintenance system is used to check whether the merchant has a contracted third-party carrier and whether the carrier information is expired. If it does not exist or the information is expired, the order data needs to be deleted.

[0111] It should be noted that only orders that require calling third-party interfaces will have third-party carrier information. Since some orders may not involve calling third-party interfaces, these order data need to be filtered out.

[0112] For step S303, the pre-data (ie, pre-training data) that meet the verification result can be added to the training data record for subsequent query.

[0113] Furthermore, before storing the pre-training data in the training data record, it is also necessary to determine whether the data exists in the record based on the address information of the data. If both historical training data and the pre-training data are included in the same address, the historical training data can be replaced with the pre-training data to perform a data update operation.

[0114] The method provided in the above embodiment can ensure that the training data can be obtained quickly and accurately in the subsequent actual use process through pre-training of the pre-data, thereby reducing the coupling degree with the third-party interface.

[0115] See also Figure 4 , shows a schematic flow chart of another optional data calling method according to an embodiment of the present invention, comprising the following steps:

[0116] S401: Acquire real-time data and traverse training data records.

[0117] S402: When there is no training data matching the real-time data, determine that the real-time data is real-time training data.

[0118] S403: Add the real-time training data to the training data record to update the training data record.

[0119] S404: monitoring the user's click operation on the application interface, and generating a corresponding data call request based on the click operation.

[0120] S405: Transmitting a data call request to a third-party interface, and when receiving call failure information fed back by the third-party interface, querying in local training data records based on the data call request.

[0121] S406: When it is found that there is training data corresponding to the data call request, the queried training data is extracted and output.

[0122] In the above implementation, steps S404 to S406 can be respectively referred to Figure 1 The description of steps S101 to S103 is not repeated here.

[0123] Through real-time data training, the overall data can be organized to ensure the sustainability and stability of the data; among them, the overall data refers to all data obtained by calling the third-party interface.

[0124] In the above implementation, for steps S401 and S402, the real-time data involved is the data for training operation after the third-party interface is called.

[0125] The data obtained after the current call to the third-party interface ends can be stored and saved. For example, it can be stored in a database, and the creation and update of the data can be monitored by parsing the binlog log of the database. It should be noted that the storage location of the real-time data can also be other storage components of the client, and the present invention is not limited here.

[0126] The creation of data update status can be based on the identification and version number of real-time data:

[0127] 1) For real-time data that does not exist in history, you can set the corresponding new identification, update time (for example, the time when the real-time data is obtained), version 1.0, etc.;

[0128] 2) For real-time data that already exists in the past, the corresponding update identifier, update time, version number, etc. can also be set. For example, the version number of the historical data is 2.0, and the version number of the real-time data obtained this time is 3.0.

[0129] For step S403, there are different training methods for real-time data:

[0130] 1) Data update: According to the address information, etc., traverse the training data records. When there is training data corresponding to the address, compare the real-time data with the training data. If they are consistent, no processing is done; otherwise, replace the original training data with the real-time data;

[0131] For data that exists in the query and has consistent matching results, it means that the real-time data obtained this time has been trained before, and the data obtained by locally calling the third-party interface can be obtained by calling the local training data record.

[0132] 2) Adding data: According to the address information of the real-time data, the training data record is traversed. As a result, there is no training data corresponding to the address information, which means that the real-time data is obtained for the first time. It is directly added to the training data record to fill the training data.

[0133] In summary, no matter whether the real-time data already exists in the training data record, the real-time data will eventually be added to or replace the original training data, that is, the real-time data will be stored in the training data record in the end.

[0134] The method provided in the above embodiment can realize the organization of the overall data based on the training of real-time data to ensure the latest validity of the data and the accuracy of subsequent data extraction.

[0135] See also Figure 5 , shows a schematic flow chart of a specific data calling method according to an embodiment of the present invention, comprising the following steps:

[0136] S501: Acquire historical data and determine the address information of each historical data.

[0137] S502: Generate a corresponding first data call request based on each address information, and transmit the generated first data call request to a third-party interface to receive first data fed back by the third-party interface.

[0138] S503: extracting historical data matching the received first data, and determining that the extracted historical data is historical training data.

[0139] S501': Acquire pre-data and determine parameter information of each pre-data; wherein the pre-data is data that has been generated but has not reached the cycle of calling the third-party interface.

[0140] S502': based on a predetermined verification method, verify the parameter information in each pre-data, extract the pre-data that meets the verification rule, and determine that the extracted pre-data is the pre-training data.

[0141] S501": Get real-time data and traverse the training data records.

[0142] S502”: When there is no training data matching the real-time data, determine that the real-time data is real-time training data.

[0143] S504: Update the training data record based on the acquired historical training data / previous training data / real-time training data.

[0144] S505: Monitor the user's click operation on the application interface, and generate a corresponding data call request based on the click operation.

[0145] S506: Transmitting a data call request to a third-party interface, and when receiving call failure information fed back by the third-party interface, querying in local training data records based on the data call request.

[0146] S507: When it is found that there is training data corresponding to the data call request, the queried training data is extracted and output.

[0147] In the above embodiment, steps S501 to S503 can be referred to Figure 2 The description of steps S201 to S204 and steps S501' and S502' can be found in Figure 3 For the description of steps S301 to S303, steps S501″ and S502″ can be found in Figure 4 For the description of steps S401 to S403, steps S505 to S507 can be found in Figure 1 The description of steps S101 to S103 is not repeated here.

[0148] In the above implementation, for step S504, the above three different training data methods are used to improve or update the original training data records, and finally generate the training data used subsequently.

[0149] Although the training data involved are divided into pre-process, historical and real-time in the description, the training can be completed in any order, can be executed simultaneously, or can be executed one after another. What is finally formed is the training data, but the nodes and types for insertion and update are different.

[0150] It should be noted that the trained data can only alleviate the subsequent business processing problems caused by third-party interface anomalies to a certain extent. Some data is strongly dependent on third-party interfaces, such as order information, and the data is continuously increasing and not static. Therefore, most data still relies on third-party interfaces to obtain, and third-party interfaces cannot be completely replaced.

[0151] In addition, for the matching comparison between data, the corresponding transaction log, matching rate and matching amount can also be recorded to facilitate subsequent data query and use. At the same time, the information can be monitored and the accuracy of the data can be analyzed.

[0152] Among them, the matching quantity refers to the number of matches between the data obtained by calling the third-party interface this time and the original training data; the matching rate refers to the proportion of matching volume in the overall call volume, that is, matching volume / total mobilization volume.

[0153] For logbooks, there can be matching logbooks, non-matching logbooks, etc. Among them, matching logbooks indicate that the data obtained from a third party matches the historical data / training data; non-matching logbooks, also known as matching difference logs, include the original training data and the data obtained by calling the third-party interface, indicating that the data obtained by calling the third-party interface before and the data obtained by calling now are different.

[0154] The method provided in the embodiment of the present invention trains historical data, dependent data and real-time data, ensures the continuity, stability and reliability of the training data, reduces the dependence on third-party interface data calls, and alleviates the situation where local business cannot be carried out due to third-party interface anomalies.

[0155] See also Figure 6 , which shows a schematic diagram of main modules of a data calling device 600 provided in an embodiment of the present invention, including:

[0156] The request generation module 601 is used to: monitor the user's click operation on the application interface, and generate a corresponding data call request based on the click operation;

[0157] The request transmission module 602 is used to: transmit a data call request to a third-party interface, and when receiving call failure information fed back by the third-party interface, query the local training data record based on the data call request;

[0158] The data acquisition module 603 is used to: when it is queried that there is training data corresponding to the data call request, extract the queried training data and output it.

[0159] Optionally, the training data record includes historical training data;

[0160] The device also includes a historical data training module 604 (not shown in the figure), which is used to:

[0161] Obtain historical data and determine the address information of each historical data;

[0162] Based on each piece of address information, a corresponding first data call request is generated, and the generated first data call request is transmitted to a third-party interface;

[0163] Receive first data fed back by a third-party interface, extract historical data matching the received first data, determine the extracted historical data as historical training data, and update the training data record based on the determined historical training data.

[0164] Optionally, the historical data training module 604 is used to:

[0165] The historical data is obtained, the address information of each historical data is determined, and each address information is split into five levels of address information according to a predetermined address splitting method.

[0166] Optionally, the training data record includes previous training data;

[0167] The device also includes a pre-data training module 605 (not shown in the figure), which is used to:

[0168] Acquire the pre-data and determine the parameter information of each pre-data; wherein the pre-data is data that has been generated but has not reached the cycle of calling the third-party interface;

[0169] Based on a predetermined verification method, the parameter information in each pre-data is verified, and the pre-data that meets the verification rules is extracted;

[0170] Determine that the extracted pre-data is pre-training data, and add the pre-training data to the training data record to update the training data record.

[0171] Optionally, the front-end data is order data, and the parameter information includes at least order type and order carrier information;

[0172] The pre-data training module 605 is used to obtain a predetermined order type table, and when an order type is found in the order type table, detect whether the order carrier information is expired, and extract order data whose order carrier information is not expired.

[0173] Optionally, the training data record includes real-time training data;

[0174] The device also includes a real-time data training module 606 (not shown in the figure), which is used to:

[0175] Acquire real-time data and traverse training data records; when there is no training data matching the real-time data, determine that the real-time data is real-time training data; add the real-time training data to the training data record to update the training data record.

[0176] In addition, the specific implementation content of the data calling device described in the embodiment of the present invention has been described in detail in the data calling method described above, so the repeated content will not be described again here.

[0177] The device provided in the embodiment of the present invention realizes the training operation of multi-dimensional data by targeted training of real-time data, historical data and pre-set data. When the call to the third-party interface fails, the matching query can be performed through the locally trained data, thereby reducing the business processing problems caused by the abnormality of the third-party interface. In addition, by analyzing the matching amount and matching rate in the log, the trained data can be better monitored.

[0178] Figure 7 An exemplary system architecture 700 is shown to which the data calling method or data calling device according to the embodiment of the present invention can be applied.

[0179] like Figure 7 As shown, system architecture 700 may include terminal devices 701, 702, 703, network 704 and server 705 (just an example). Network 704 is used to provide a medium for communication links between terminal devices 701, 702, 703 and server 705. Network 704 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0180] Users can use terminal devices 701, 702, and 703 to interact with server 705 through network 704 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 701, 702, and 703, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0181] The terminal devices 701 , 702 , and 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0182] The server 705 may be a server that provides various services, such as a backend management server (only for example) that supports shopping websites browsed by users using the terminal devices 701, 702, and 703. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only for example) to the terminal device.

[0183] It should be noted that the data calling method provided in the embodiment of the present invention is generally executed by the server 705 , and accordingly, the data calling device is generally arranged in the server 705 .

[0184] It should be understood that Figure 7 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0185] Reference below Figure 8 , which shows a schematic diagram of the structure of a computer system 800 of a terminal device suitable for implementing an embodiment of the present invention. Figure 8 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0186] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0187] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage section 808 as needed.

[0188] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, the above-mentioned functions defined in the system of the present invention are executed.

[0189] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes a request generation module, a request transmission module, and a data acquisition module. The names of these modules do not constitute a limitation on the modules themselves in some cases, for example, the request transmission module may also be described as a "module for transmitting data call requests to a third-party interface".

[0190] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:

[0191] Monitor the user's click operations on the application interface and generate corresponding data call requests based on the click operations;

[0192] Transmitting a data call request to a third-party interface, and when receiving a call failure message fed back by the third-party interface, querying the local training data record based on the data call request;

[0193] When the query finds that there is training data corresponding to the data call request, the queried training data is extracted and output.

[0194] According to the technical solution of the embodiment of the present invention, the training operation of multi-dimensional data is realized by targeted training of real-time data, historical data and pre-data. When the call to the third-party interface fails, a matching query can be performed in the locally trained data, thereby reducing the business processing problems caused by the abnormality of the third-party interface. In addition, by analyzing the matching quantity and matching rate in the log, the trained data can be better monitored.

[0195] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A data calling method, characterized in that: include: Acquire pre-data and determine parameter information of each pre-data; wherein the pre-data is data that has been generated but has not reached the cycle of calling the third-party interface; the pre-data is order data, and the parameter information includes at least order type and order carrier information; Based on a predetermined verification rule, the parameter information in each pre-positioned data is verified, and the pre-positioned data that meets the verification rule is extracted, including: obtaining a predetermined order type table, and when the order type is found in the order type table, detecting whether the order carrier information is expired, and extracting order data whose order carrier information is not expired; Determining that the extracted pre-data is pre-training data, and adding the pre-training data to a local training data record to update the local training data record; Monitor the user's click operation on the application interface, and generate corresponding data call requests based on the click operation; Transmitting the data call request to the third-party interface, and when receiving the call failure information fed back by the third-party interface, querying in the local training data record based on the data call request; When it is found that there is training data corresponding to the data call request, the queried training data is extracted and output.

2. The method according to claim 1, characterized in that The training data record includes historical training data; Before monitoring the user's click operation on the application interface and generating a corresponding data call request based on the click operation, the method further includes: Obtain historical data and determine the address information of each historical data; Based on each piece of address information, a corresponding first data call request is generated, and the generated first data call request is transmitted to the third-party interface; Receive the first data fed back by the third-party interface, extract historical data matching the received first data, determine the extracted historical data as historical training data, and update the training data record based on the determined historical training data.

3. The method according to claim 2, characterized in that The acquiring of historical data and determining the address information of each historical data includes: The historical data is acquired, address information of each historical data is determined, and each address information is split into five levels of address information according to a predetermined address splitting method.

4. The method according to claim 1, characterized in that The training data record includes real-time training data; Before monitoring the user's click operation on the application interface and generating a corresponding data call request based on the click operation, the method further includes: Acquire real-time data and traverse the training data records; When there is no training data matching the real-time data, determining that the real-time data is real-time training data; The real-time training data is added to the training data record to update the training data record.

5. A data calling device, characterized in that: include: A pre-data training module is used to obtain pre-data and determine parameter information of each pre-data; wherein the pre-data is data that has been generated but has not reached the cycle of calling a third-party interface; the pre-data is order data, and the parameter information includes at least order type and order carrier information; based on a predetermined verification rule, the parameter information in each pre-data is verified, and the pre-data that meets the verification rule is extracted, including: obtaining a predetermined order type table, when the order type is queried in the order type table, detecting whether the order carrier information is expired, and extracting order data whose order carrier information is not expired; determining that the extracted pre-data is pre-training data, and adding the pre-training data to the local training data record to update the local training data record; The request generation module is used to: monitor the user's click operation on the application interface, and generate a corresponding data call request based on the click operation; A request transmission module, used to: transmit the data call request to a third-party interface, and when receiving call failure information fed back by the third-party interface, query the local training data record based on the data call request; The data acquisition module is used to: when it is queried that there is training data corresponding to the data call request, extract the queried training data and output it.

6. The device according to claim 5, characterized in that The training data record includes historical training data; The device also includes a historical data training module, which is used to: Obtain historical data and determine the address information of each historical data; Based on each piece of address information, a corresponding first data call request is generated, and the generated first data call request is transmitted to the third-party interface; Receive the first data fed back by the third-party interface, extract historical data matching the received first data, determine the extracted historical data as historical training data, and update the training data record based on the determined historical training data.

7. The device according to claim 6, characterized in that The historical data training module is used to: The historical data is acquired, address information of each historical data is determined, and each address information is split into five levels of address information according to a predetermined address splitting method.

8. The device according to claim 5, characterized in that The training data record includes real-time training data; The device also includes a real-time data training module, which is used to: Acquire real-time data and traverse the training data records; When there is no training data matching the real-time data, determining that the real-time data is real-time training data; The real-time training data is added to the training data record to update the training data record.

9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Method and device for degrading handling of third-party application interface

    CN105677466A

  • Method and system for directly carrying out purchasing and mailing on basis of microboss interface

    CN106779930A