CN109309712B - Data transmission method based on interface asynchronous call, server and storage medium - Google Patents

Data transmission method based on interface asynchronous call, server and storage medium Download PDF

Info

Publication number
CN109309712B
CN109309712B CN201811044784.2A CN201811044784A CN109309712B CN 109309712 B CN109309712 B CN 109309712B CN 201811044784 A CN201811044784 A CN 201811044784A CN 109309712 B CN109309712 B CN 109309712B
Authority
CN
China
Prior art keywords
asynchronous
interface
task
call
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811044784.2A
Other languages
Chinese (zh)
Other versions
CN109309712A (en
Inventor
肖泉海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811044784.2A priority Critical patent/CN109309712B/en
Publication of CN109309712A publication Critical patent/CN109309712A/en
Application granted granted Critical
Publication of CN109309712B publication Critical patent/CN109309712B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention relates to a big data transmission technology and provides a data transmission method based on interface asynchronous calling, a server and a computer readable storage medium. The method comprises the following steps: receiving an interface calling request sent by a client, wherein the interface calling request comprises main key information, a data operation type and operation timestamp information; generating an asynchronous calling task according to the interface calling request, and storing the asynchronous calling task to an asynchronous task table; and executing the asynchronous call task in the asynchronous task table, reading data returned by the interface, and transmitting the data to the client. The invention solves the problem of calling thread blocking during high concurrency by establishing the asynchronous task table, avoids repeated calling by using the main key information, prevents reverse calling by using the operation timestamp information, improves the data transmission quality and ensures the response speed of the server.

Description

Data transmission method based on interface asynchronous call, server and storage medium
Technical Field
The invention relates to the field of computer data transmission, in particular to a data transmission method based on interface asynchronous calling, a server and a computer readable storage medium.
Background
With the rapid development of internet technology, network information resources present an explosive growth situation, and computer data exchange technology is in force for the communication of increasingly huge information. Among them, data transmission between the client and the server is a very interesting research direction.
At present, each client transmits data by calling a server interface, and problems such as repeated calling, reverse calling and the like may occur due to network delay, high concurrency and the like, for example, the interface is successfully called, but the client does not receive a callback result due to a network problem, and then the interface is called again; for another example, transient high concurrency may cause a call thread to be blocked, thereby causing a reverse order call, and preventing data transmission quality and server performance from being guaranteed.
Disclosure of Invention
The invention provides a data transmission method based on interface asynchronous calling, a server and a computer readable storage medium, and mainly aims to solve the problem of high concurrency, avoid repeated calling and reverse calling, and improve the data transmission quality and the server response speed.
In order to achieve the above object, the present invention provides a data transmission method based on interface asynchronous call, which is applied to a server, and the method includes:
a receiving step: receiving an interface calling request sent by a client, wherein the interface calling request comprises main key information, a data operation type and operation timestamp information;
a storage step: generating an asynchronous calling task according to the interface calling request, and storing the asynchronous calling task to an asynchronous task table; and
the execution steps are as follows: and executing the asynchronous call task in the asynchronous task table, reading data returned by the interface, and transmitting the data to the client.
Preferably, the asynchronous call tasks in the asynchronous task table are stored according to the time sequence of receiving the interface call requests.
Preferably, the storing step further comprises:
and when the primary key information carried by the interface calling request is the same as the primary key information of any asynchronous task in the asynchronous task table, rejecting the interface calling request and finishing the storage process.
Preferably, the interface call request includes a data operation object, and before the executing step, the method further includes:
before executing a certain asynchronous call task, judging whether an asynchronous call task which has the same data operation object and the prior operation time but is not executed exists in the asynchronous task table according to the data operation object and the operation timestamp information;
if yes, skipping the asynchronous calling task;
and if not, executing the asynchronous calling task.
Preferably, after the performing step, the method further comprises:
and cleaning the asynchronous task table at regular time, and deleting the executed asynchronous tasks with the storage time exceeding the preset time limit from the asynchronous task table.
The invention also provides a server, which comprises a memory and a processor, wherein the memory comprises a data transmission program based on interface asynchronous call, and the data transmission program based on interface asynchronous call realizes the following steps when being executed by the processor:
a receiving step: receiving an interface calling request sent by a client, wherein the interface calling request comprises main key information, a data operation type and operation timestamp information;
a storage step: generating an asynchronous calling task according to the interface calling request, and storing the asynchronous calling task to an asynchronous task table; and
the execution steps are as follows: and executing the asynchronous call task in the asynchronous task table, reading data returned by the interface, and transmitting the data to the client.
Preferably, the storing step further comprises:
and when the primary key information carried by the interface calling request is the same as the primary key information of any asynchronous task in the asynchronous task table, rejecting the interface calling request and finishing the storage process.
Preferably, the interface call request includes a data operation object, and before the executing step, the interface asynchronous call based data transmission program further implements the following steps when executed by the processor:
before executing a certain asynchronous call task, judging whether an asynchronous call task which has the same data operation object and the prior operation time but is not executed exists in the asynchronous task table according to the data operation object and the operation timestamp information;
if yes, skipping the asynchronous calling task;
and if not, executing the asynchronous calling task.
Preferably, after the executing step, the interface-based asynchronously invoked data transfer program when executed by the processor further implements the steps of:
and cleaning the asynchronous task table at regular time, and deleting the executed asynchronous tasks with the storage time exceeding the preset time limit from the asynchronous task table.
The present invention also provides a computer-readable storage medium, which includes an interface asynchronous call-based data transmission program, and when the interface asynchronous call-based data transmission program is executed by a processor, the computer-readable storage medium implements the following operations:
a receiving step: receiving an interface calling request sent by a client, wherein the interface calling request comprises main key information, a data operation type and operation timestamp information;
a storage step: generating an asynchronous call task according to the interface call request, and storing the asynchronous call task into an asynchronous task table; and
the execution steps are as follows: and executing the asynchronous call task in the asynchronous task table, reading data returned by the interface, and transmitting the data to the client.
In particular, any of the steps in the interface-based asynchronously-invoked data transfer method described above may be implemented.
According to the data transmission method based on interface asynchronous call, the server and the computer readable storage medium, the interface call request which is sent by the client and carries the main key information, the data operation type and the operation timestamp information is received, the asynchronous call task is generated according to the interface call request and is stored in the asynchronous task list, then the asynchronous call task in the asynchronous task list is executed, the data returned by the interface is read, and the data are transmitted to the client. By using the asynchronous task list, the problem of high concurrency can be solved, the uniqueness of each asynchronous calling task in the asynchronous task list can be ensured by using the main key information, the problem of repeated calling is avoided, and a plurality of data of the same data operation object can be called in sequence by using the operation timestamp information. Therefore, the invention can improve the data transmission quality and ensure the response speed of the server.
Drawings
FIG. 1 is a diagram illustrating an application environment of a server according to a preferred embodiment of the present invention;
FIG. 2 is a block diagram of a preferred embodiment of the interface asynchronous call based data transfer process of FIG. 1;
FIG. 3 is a flowchart illustrating a first preferred embodiment of the data transmission method based on interface asynchronous call according to the present invention;
fig. 4 is a flowchart illustrating a second preferred embodiment of the data transmission method based on interface asynchronous call according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to several drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
The invention provides a server. Fig. 1 is a schematic diagram of an application environment of a server 1 according to a preferred embodiment of the present invention. In this embodiment, the server 1 is an execution subject of the data transmission method based on interface asynchronous call, the server 1 is respectively connected with the first client 3 and the second client 5 through the network 2 and the network 4, a user initiates an interface call request on the client or the client periodically and automatically sends the interface call request, and the server 1 responds to the request by using the data transmission program 10 based on interface asynchronous call provided by the present invention to transmit data to the corresponding client.
The server 1 may be composed of one or more computers, and may be one or more of a rack server, a blade server, a tower server, or a cabinet server.
The server 1 comprises a memory 11, a processor 12, a network interface 13 and a communication bus 14.
Wherein the memory 11 includes at least one type of readable storage medium. The at least one type of readable storage medium may be a non-volatile storage medium such as a flash memory, a hard disk, a multimedia card, a card-type memory, and the like. In some embodiments, the readable storage medium may be an internal storage unit of the server 1, such as a hard disk of the server 1. In other embodiments, the readable storage medium may also be an external memory 11 of the server 1, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the server 1.
In this embodiment, the readable storage medium of the memory 11 is generally used for storing an operating system, the data transmission program 10 based on interface asynchronous call, an asynchronous task table, and the like. The memory 11 may also be used to temporarily store data that has been output or is to be output.
The processor 12 may be a Central Processing Unit (CPU), microprocessor or other data Processing chip in some embodiments, and is used for executing program codes stored in the memory 11 or Processing data, such as executing the data transmission program 10 based on interface asynchronous call.
The network interface 13 may include a standard wired interface, a wireless interface (e.g., WI-FI interface). Typically for establishing a communication connection between the server 1 and other electronic devices or systems.
The communication bus 14 is used to realize connection communication between the above components.
Fig. 1 only shows the server 1 and the first client 3 and the second client 5 with components 11-14 and an interface-based asynchronously invoked data transfer program 10, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. For example, the server 1 may provide data transfer services to more or fewer clients.
Optionally, the server 1 may further include a user interface, which may include an input unit such as a Keyboard (Keyboard), a voice input device such as a Microphone (Microphone) or other devices having a voice recognition function, a voice output device such as a stereo, a headset, and the like. Optionally, the user interface may also include a standard wired interface, a wireless interface.
Optionally, the server 1 may further comprise a display, which may also be referred to as a display screen or a display unit. In some embodiments, the display device may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an Organic Light-Emitting Diode (OLED) display, or the like. The display is used for displaying information processed in the server 1 and for displaying a visualized user interface.
Optionally, the server 1 further comprises a touch sensor. The area provided by the touch sensor for the user to perform touch operation is called a touch area. Further, the touch sensor described herein may be a resistive touch sensor, a capacitive touch sensor, or the like. The touch sensor may include not only a contact type touch sensor but also a proximity type touch sensor. Further, the touch sensor may be a single sensor, or may be a plurality of sensors arranged in an array, for example. The user may initiate the interface-based asynchronously invoked data transfer procedure 10 by touching the touch area.
The area of the display of the server 1 may be the same as or different from the area of the touch sensor. Optionally, a display is stacked with the touch sensor to form a touch display screen. The device detects touch operation triggered by a user based on the touch display screen.
The server 1 may further include Radio Frequency (RF) circuits, sensors, audio circuits, and the like, which will not be described in detail herein.
In the above embodiment, the processor 12 executes the interface-based asynchronously invoked data transfer program 10 stored in the memory 11 to implement the following steps:
a receiving step: receiving an interface calling request sent by a client, wherein the interface calling request comprises main key information, a data operation type and operation timestamp information;
a storage step: generating an asynchronous calling task according to the interface calling request, and storing the asynchronous calling task to an asynchronous task table; and
the execution steps are as follows: and executing the asynchronous call task in the asynchronous task table, reading data returned by the interface, and transmitting the data to the client.
For detailed description of the above steps, please refer to the following description of fig. 2 regarding a program module diagram of a preferred embodiment of the data transmission program 10 based on interface asynchronous call and fig. 3 and 4 regarding a flowchart of a preferred embodiment of the data transmission method based on interface asynchronous call.
In other embodiments, the interface-based asynchronously invoked data transfer program 10 may be partitioned into multiple modules that are stored in the memory 11 and executed by the processor 12 to implement the present invention. The modules referred to herein are referred to as a series of computer program instruction segments capable of performing specified functions.
Referring to fig. 2, a block diagram of a preferred embodiment of the interface asynchronous call based data transfer program 10 of fig. 1 is shown. In this embodiment, the data transfer program 10 based on the interface asynchronous call may be divided into: a receiving module 110, a storage module 120 and an execution module 130.
The receiving module 110 is configured to receive an interface call request sent by a client. The interface call request includes primary key information, a data operation type and operation time stamp information. The primary key information may include a data operation object, and the data operation object may also exist independently of the primary key information. For example, assuming that the server 1 is a server of a certain insurance system, when a client sends an interface call request to the server 1 through the first client 3 or the second client 5, the receiving module 110 receives n interface call requests which are sent by the client and carry primary key information, data operation type and operation timestamp information. The interface call request may include information such as a system number, a transaction number, a document number, a processing type, a processing time, and the like. The processing time may include underwriting time, claims time, and the like. In an embodiment, the receiving module 110 may establish a request record table for the interface call request, and use two fields of the system number and the transaction number as primary keys of the request record table, so as to uniquely identify one interface call request in the request record table, use the document number as a data operation object, use the processing type as a data operation type, and use the processing time as operation timestamp information.
And the storage module 120 is configured to generate an asynchronous call task according to the interface call request, and store the asynchronous call task in an asynchronous task table. For example, the storage module 120 stores the n interface call requests to an asynchronous task table in the form of asynchronous call tasks according to a chronological order.
Assuming that the server 1 is a server of the insurance system, the storage module 120 may use two fields of a system number and a transaction number as primary keys of an asynchronous task table, and when the storage module 120 stores an asynchronous call task, if primary key information carried by the interface call request is the same as primary key information of any asynchronous task in the asynchronous task table, an error is automatically reported, the interface call request is directly rejected, and the storage process is ended. By utilizing the characteristics of the primary key of the asynchronous task table, repeated asynchronous call tasks can be prevented from being stored, and the problem of repeated call is further avoided.
And the execution module 130 is configured to execute the asynchronous call task in the asynchronous task table, read data returned by the interface, and transmit the data to the client. For example, the execution module 130 calls a preset number of threads, processes the asynchronous call task at the front in the asynchronous task table, reads data returned by the interface, and transmits the data to the corresponding client.
In the present invention, the asynchronous call tasks with the same data operation object can be called as the same group of asynchronous tasks. In one embodiment, the same set of asynchronous tasks may be executed sequentially in chronological order. Specifically, before executing a certain asynchronous call task, the execution module 130 may determine, according to the data operation object and the operation timestamp information, whether an asynchronous call task that is not executed but has the same data operation object and the previous operation time exists in the asynchronous task table. Assuming that the server 1 is the server of the insurance system, the insurance acceptance, the underwriting and the claim settlement data of the same document number are called, and belong to the same group of asynchronous tasks. The guarantee period is undoubtedly before the claim settlement period, if there are multiple claim settlement conditions, the claim settlement periods are also in sequence, the execution module 130 sequentially executes the asynchronous calling tasks of the same group of asynchronous tasks according to the sequence of the operation periods, and the orderliness and integrity of the returned data can be ensured. For example, before the execution module 130 calls the claim data of a certain document number, if the asynchronous call table has a call task of the document number insurance acceptance data, the execution module 130 skips the call task of the claim data, and after the call task of the insurance acceptance data is completed, executes the call task of the claim data. In other words, if an asynchronous call task which has the same data operation object and is not executed before the operation time exists in the asynchronous task table, the asynchronous call task is skipped; and if the asynchronous call task which has the same data operation object and the prior operation time but is not executed does not exist in the asynchronous task table, executing the asynchronous call task, reading data returned by the interface, and transmitting the data to the client. With the operation time stamp information, i.e. the processing time information in the example, the problem of reverse order calling can be avoided.
In another embodiment, the memory module 120 includes a memory unit and a cleaning unit (not shown in fig. 2). The storage unit is used for generating an asynchronous call task according to the interface call request and storing the asynchronous call task into an asynchronous task table, and the cleaning unit is used for cleaning the asynchronous task table at regular time and deleting the asynchronous task which is stored for a time exceeding a preset time limit and is executed and completed from the asynchronous task table. For example, the asynchronous task table is cleaned up once a week, and the asynchronous call task which is stored in the asynchronous task table for more than three months and is completed in processing is deleted from the asynchronous task table.
In another embodiment, the storage module 120 further comprises an aggregation ordering unit (not shown in fig. 2). And the aggregation sequencing unit is used for managing the asynchronous call tasks in the asynchronous task table and realizing aggregation and sequencing of the asynchronous tasks in the same group. For example, the asynchronous calling tasks with the same data operation objects are adjacent in the asynchronous task table, and the adjacent same group of asynchronous tasks are ordered according to the operation timestamp information, so that the server 1 preferentially executes the asynchronous calling tasks with the previous operation time in the same group of asynchronous tasks in sequence.
In addition, the invention also provides a data transmission method based on interface asynchronous call. Fig. 3 is a schematic flow chart showing a data transmission method based on interface asynchronous call according to a first preferred embodiment of the present invention. The processor 12 of the server 1 executes the interface asynchronous call based data transfer program 10 stored in the memory 11 to implement the following steps of the interface asynchronous call based data transfer method:
in step S300, the receiving module 110 receives an interface call request sent by the client, where the interface call request includes the primary key information, the data operation type, and the operation timestamp information. For example, when a client sends an interface call request to the server 1 through the first client 3 or the second client 5, the receiving module 110 receives n interface call requests which are sent by the client and carry information of a main key, a data operation type, and operation timestamp.
Step S301, the storage module 120 generates an asynchronous call task according to the interface call request, and stores the asynchronous call task in an asynchronous task table. For example, the storage module 120 stores the n interface call requests to an asynchronous task table in the form of asynchronous call tasks according to a chronological order. When the primary key information carried by an interface calling request is the same as the primary key information of any asynchronous task in the asynchronous task table, rejecting the interface calling request and ending the storage process.
Step S302, the execution module 130 executes the asynchronous call task in the asynchronous task table, reads the data returned by the interface, and transmits the data to the client. For example, the execution module 130 calls a preset number of threads, processes the asynchronous call task at the front in the asynchronous task table, reads data returned by the interface, and transmits the data to the corresponding client. Before executing a certain asynchronous call task, if an asynchronous call task which is the same as the data operation object of the asynchronous call task and has the operation time before but is not executed exists in the asynchronous task table, executing a subsequent asynchronous call task first, and skipping the execution process of the asynchronous call task.
Fig. 4 is a flowchart illustrating a second preferred embodiment of the data transmission method based on interface asynchronous call according to the present invention. In this embodiment, steps S400 to S402 of the data transmission method based on interface asynchronous call are similar to steps S300 to S302 of the first preferred embodiment, except that the embodiment further includes step S403.
In step S403, the storage module 120 cleans the asynchronous task table at regular time, and deletes the executed asynchronous task whose storage time exceeds the predetermined time limit from the asynchronous task table. For example, the storage module 120 cleans up the asynchronous task table once a week, and deletes the asynchronously called task that has been stored in the asynchronous task table for more than three months and that has been executed by the execution module 130, from the asynchronous task table. It can be understood that the reasonable setting of the cleaning period and the predetermined period helps to ensure the orderliness and the integrity of the returned data, so that a plurality of data of the same data operation object can be called in sequence.
The technical features and technical effects of the data transmission method based on interface asynchronous call proposed in the above embodiment are substantially the same as those described in the above fig. 2 with respect to the program module diagram of the preferred embodiment of the data transmission program 10 based on interface asynchronous call, and are not described herein again.
The data transmission method based on interface asynchronous call provided by the embodiment receives an interface call request which is sent by a client and carries main key information, a data operation type and operation timestamp information, generates an asynchronous call task according to the interface call request, stores the asynchronous call task into an asynchronous task table, then executes the asynchronous call task in the asynchronous task table, reads data returned by an interface, and transmits the data to the client. By establishing the asynchronous task table, the influence of high concurrency on the performance of the server is reduced by using an asynchronous processing mechanism, the problem of calling thread blocking during high concurrency is solved, the uniqueness of each asynchronous calling task in the table can be ensured by using the main key information in the table, the problem of repeated calling is avoided, and the reverse calling can be prevented by using the operation timestamp information in the table. Therefore, the invention can improve the data transmission quality and ensure the response speed of the server.
Furthermore, the embodiment of the present invention also provides a computer-readable storage medium, which may be any one or any combination of a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), a portable compact disc read only memory (CD-ROM), a USB memory, and the like. The computer readable storage medium stores therein an interface asynchronous call based data transfer program 10, and when executed by the processor 12, the interface asynchronous call based data transfer program 10 implements the following operations:
a receiving step: receiving an interface calling request sent by a client, wherein the interface calling request comprises main key information, a data operation type and operation timestamp information;
a storage step: generating an asynchronous calling task according to the interface calling request, and storing the asynchronous calling task to an asynchronous task table; and
the execution steps are as follows: and executing the asynchronous call task in the asynchronous task table, reading data returned by the interface, and transmitting the data to the client.
The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the above-mentioned data transmission method and server 1 based on interface asynchronous call, and will not be described herein again.
It should be noted that the same or similar parts between the above embodiments are not described repeatedly, and may be referred to each other. In this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on this understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium as described above and includes several instructions for causing a server to execute the methods according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A data transmission method based on interface asynchronous call is applied to a server, and is characterized in that the method comprises the following steps:
a receiving step: receiving an interface calling request sent by a client, wherein the interface calling request comprises main key information, a data operation type and operation timestamp information, and the main key information comprises a system number and a transaction number;
a storage step: generating an asynchronous calling task according to the interface calling request, storing the asynchronous calling task into an asynchronous task table, refusing the interface calling request when the primary key information carried by the interface calling request is the same as the primary key information of any asynchronous task in the asynchronous task table, and ending the storage process; and
the execution steps are as follows: and executing the asynchronous call task in the asynchronous task table, reading data returned by the interface, and transmitting the data to the client.
2. The interface-based asynchronous call data transmission method according to claim 1, wherein the asynchronous call tasks in the asynchronous task table are stored in chronological order in which the interface call requests are received.
3. The interface-based asynchronously called data transfer method of claim 1, wherein said interface call request includes a data operand, and prior to said performing step, the method further comprises:
before executing a certain asynchronous call task, judging whether an asynchronous call task which has the same data operation object and the prior operation time but is not executed exists in the asynchronous task table according to the data operation object and the operation timestamp information;
if yes, skipping the asynchronous calling task;
and if not, executing the asynchronous calling task.
4. The interface-based asynchronously-invoked data transfer method of any of claims 1 to 3, wherein after the performing step, the method further comprises:
and cleaning the asynchronous task table at regular time, and deleting the executed asynchronous tasks with the storage time exceeding the preset time limit from the asynchronous task table.
5. A server, comprising a memory and a processor, wherein the memory includes an interface-based asynchronously called data transfer program, and the interface-based asynchronously called data transfer program implements the following steps when executed by the processor:
a receiving step: receiving an interface calling request sent by a client, wherein the interface calling request comprises main key information, a data operation type and operation timestamp information, and the main key information comprises a system number and a transaction number;
a storage step: generating an asynchronous calling task according to the interface calling request, storing the asynchronous calling task into an asynchronous task table, refusing the interface calling request when the primary key information carried by the interface calling request is the same as the primary key information of any asynchronous task in the asynchronous task table, and ending the storage process; and
the execution steps are as follows: and executing the asynchronous call task in the asynchronous task table, reading data returned by the interface, and transmitting the data to the client.
6. The server according to claim 5, wherein the interface call request includes a data operation object, and wherein the interface asynchronous call based data transfer program when executed by the processor further performs the following steps before the executing step:
before executing a certain asynchronous call task, judging whether an asynchronous call task which has the same data operation object and the prior operation time but is not executed exists in the asynchronous task table according to the data operation object and the operation timestamp information;
if yes, skipping the asynchronous calling task;
if not, executing the asynchronous call task.
7. The server according to any of claims 5 to 6, wherein after the executing step, the interface-asynchronously-invoked data transfer program, when executed by the processor, further implements the steps of:
and cleaning the asynchronous task table at regular time, and deleting the executed asynchronous tasks with the storage time exceeding the preset time limit from the asynchronous task table.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium includes a data transmission program based on interface asynchronous call, and the data transmission program based on interface asynchronous call realizes the steps of the data transmission method based on interface asynchronous call according to any one of claims 1 to 4 when being executed by a processor.
CN201811044784.2A 2018-09-07 2018-09-07 Data transmission method based on interface asynchronous call, server and storage medium Active CN109309712B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811044784.2A CN109309712B (en) 2018-09-07 2018-09-07 Data transmission method based on interface asynchronous call, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811044784.2A CN109309712B (en) 2018-09-07 2018-09-07 Data transmission method based on interface asynchronous call, server and storage medium

Publications (2)

Publication Number Publication Date
CN109309712A CN109309712A (en) 2019-02-05
CN109309712B true CN109309712B (en) 2022-06-17

Family

ID=65224755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811044784.2A Active CN109309712B (en) 2018-09-07 2018-09-07 Data transmission method based on interface asynchronous call, server and storage medium

Country Status (1)

Country Link
CN (1) CN109309712B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110071806B (en) * 2019-03-13 2021-08-20 平安科技(深圳)有限公司 Data processing method and system based on interface verification
CN110333954B (en) * 2019-04-04 2024-02-23 平安科技(深圳)有限公司 Interface call recording method, device, equipment and storage medium based on django framework
CN110442434A (en) * 2019-07-05 2019-11-12 中国平安财产保险股份有限公司 A kind of method for scheduling task, device, storage medium and server
CN110619204A (en) * 2019-08-28 2019-12-27 深圳市融壹买信息科技有限公司 Invitation code generation method and device, terminal equipment and storage medium
CN112885452A (en) * 2019-11-29 2021-06-01 深圳市大雅医疗技术有限公司 Data transmission method, device, server and storage medium
CN111159138B (en) * 2019-12-30 2022-06-10 浪潮电子信息产业股份有限公司 Asynchronous data storage method, device, equipment and readable storage medium
CN111506368B (en) * 2020-04-21 2023-09-22 北京同邦卓益科技有限公司 Method, device, equipment and storage medium for converting asynchronous call into synchronous call
CN112818265B (en) * 2021-02-22 2023-11-10 北京拉勾网络技术有限公司 Interaction method and mobile terminal
CN112988356A (en) * 2021-03-30 2021-06-18 北京大米科技有限公司 Asynchronous calling method and device, storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878367A (en) * 2016-07-19 2017-06-20 阿里巴巴集团控股有限公司 The implementation method and device of service interface asynchronous call
CN107888656A (en) * 2017-10-09 2018-04-06 北京京东尚科信息技术有限公司 Service the call method and calling device of end interface
CN107957903A (en) * 2017-11-13 2018-04-24 中国平安财产保险股份有限公司 Asynchronous task scheduling method, server and storage medium
CN108427599A (en) * 2017-09-30 2018-08-21 平安科技(深圳)有限公司 Method, apparatus and storage medium is uniformly processed in asynchronous task

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7346656B2 (en) * 2001-10-15 2008-03-18 Unity Works Media Asynchronous, networked publication and collaborative communication system
US7079481B2 (en) * 2002-01-04 2006-07-18 Avaya Technology Corp. Redundant network controller management system
US8234387B2 (en) * 2003-06-05 2012-07-31 Intertrust Technologies Corp. Interoperable systems and methods for peer-to-peer service orchestration
CN106027506A (en) * 2016-05-11 2016-10-12 天津市鼎隆科技有限公司 Video online social contact system and video online social contact method thereof
US10915348B2 (en) * 2017-01-31 2021-02-09 Intel Corporation Technologies for duplicating virtual machine states
CN107247634A (en) * 2017-06-06 2017-10-13 广州视源电子科技股份有限公司 A kind of method and apparatus of Robotic Dynamic asynchronous remote procedure call

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878367A (en) * 2016-07-19 2017-06-20 阿里巴巴集团控股有限公司 The implementation method and device of service interface asynchronous call
CN108427599A (en) * 2017-09-30 2018-08-21 平安科技(深圳)有限公司 Method, apparatus and storage medium is uniformly processed in asynchronous task
CN107888656A (en) * 2017-10-09 2018-04-06 北京京东尚科信息技术有限公司 Service the call method and calling device of end interface
CN107957903A (en) * 2017-11-13 2018-04-24 中国平安财产保险股份有限公司 Asynchronous task scheduling method, server and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种针对LDAP客户端与服务器通信的改进方案;胡鹏等;《舰船电子工程》;20150120(第01期);全文 *

Also Published As

Publication number Publication date
CN109309712A (en) 2019-02-05

Similar Documents

Publication Publication Date Title
CN109309712B (en) Data transmission method based on interface asynchronous call, server and storage medium
CN110851253B (en) Remote operation and maintenance method, system, storage medium and electronic equipment
WO2019041753A1 (en) Information modification method, apparatus, computer device and computer-readable storage medium
EP3404538B1 (en) Data processing method, and data processing apparatus
CN110225104B (en) Data acquisition method and device and terminal equipment
CN108038112B (en) File processing method, mobile terminal and computer readable storage medium
CN110865888A (en) Resource loading method and device, server and storage medium
CN110753084B (en) Uplink data reading method, cache server and computer readable storage medium
CN104601696A (en) Service processing method and service invoking frame, device and architecture
CN108446171B (en) Electronic device, distributed system execution task allocation method and storage medium
CN110008041B (en) Message processing method and device
CN111125057B (en) Method and device for processing service request and computer system
CN110879742A (en) Method and device for asynchronously creating internal snapshot of virtual machine and storage medium
EP3497586A1 (en) Discovery of calling application for control of file hydration behavior
CN110555068A (en) Data export method and device
CN112631751A (en) Task scheduling method and device, computer equipment and storage medium
US10223407B2 (en) Asynchronous processing time metrics
CN111294377B (en) Dependency network request sending method, terminal device and storage medium
CN109298956B (en) File transmission method and device and terminal equipment
CN109271266B (en) File transmission method and device and terminal equipment
CN111679895A (en) Execution method, device and equipment of distributed timing task and readable storage medium
CN116302271A (en) Page display method and device and electronic equipment
US9659041B2 (en) Model for capturing audit trail data with reduced probability of loss of critical data
CN111352357B (en) Robot control method and device and terminal equipment
CN110245016B (en) Data processing method, system, device and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant