A data processing method and apparatus

By adding callback functions to data processing requests, the problem of existing technologies failing to meet the real-time and diverse needs of external systems is solved. This enables the requester to have autonomous control over the callback results, expands the applicable scenarios, and improves the user experience.

CN114625420BActive Publication Date: 2026-04-14BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
Filing Date
2022-03-11
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In existing technologies, since they only return parameter values ​​corresponding to pre-agreed parameter names, they cannot meet the real-time and diverse needs of external systems, have a narrow range of applicable scenarios, and result in a poor user experience.

Method used

Add a callback function to the data processing request. By receiving the data processing request sent by the requester, determine whether a callback function is included, determine the callback parameter value according to the parameter information indicated in the callback function, and redirect the callback address to increase the requester's autonomy over the callback result.

Benefits of technology

It meets the real-time and diverse needs of requesters, expands the applicable scenarios of data processing methods, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114625420B_ABST
    Figure CN114625420B_ABST
Patent Text Reader

Abstract

The application discloses a data processing method and device, and relates to the technical field of computers. A specific implementation of the method comprises the following steps: receiving a data processing request sent by a requester, wherein the data processing request comprises a callback address; judging whether the data processing request comprises a callback function; if yes, determining a callback parameter value according to parameter information indicated in the callback function, performing redirection processing on the callback address according to the callback function and the callback parameter value; and calling the callback address after the redirection processing to the requester. The implementation increases the autonomous control right of the requester on the callback result, meets the real-time and diversity requirements of the requester, expands the applicable scene of the data processing method, and improves the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a data processing method and apparatus. Background Technology

[0002] In open systems, address callbacks are frequently involved, meaning that after an external system accesses an open system, the open system notifies the external system of the access result via a callback address.

[0003] In existing technologies, the external system (requester) and the open system usually agree in advance on the parameter names corresponding to the data to be returned. After receiving the request, the open system fills the parameter values ​​corresponding to the agreed parameter names into the callback address and sends the callback to the external system. The external system then parses and processes the request to obtain the returned parameter values.

[0004] The existing technology has at least the following problems:

[0005] The existing solution only returns the parameter values ​​corresponding to the pre-agreed parameter names, which cannot meet the real-time and diverse needs of external systems (requesters), has a narrow range of applicable scenarios, and results in a poor user experience. Summary of the Invention

[0006] In view of this, embodiments of the present invention provide a data processing method and apparatus that can add callback functions to data processing requests to increase the requester's autonomy in controlling the callback results, meet the requester's real-time and diverse needs, expand the applicable scenarios of the data processing method, and improve the user experience.

[0007] To achieve the above objectives, according to a first aspect of the present invention, a data processing method is provided, comprising:

[0008] Receive data processing requests sent by the requester, wherein the data processing requests include a callback address;

[0009] Determine whether the data processing request includes a callback function;

[0010] If so, determine the callback parameter value based on the parameter information indicated in the callback function, and redirect the callback address according to the callback function and the callback parameter value;

[0011] The callback address after redirection is sent back to the requester.

[0012] Furthermore, prior to the step of receiving the data processing request sent by the requester, the following steps are also included:

[0013] Construct a callback function template, which indicates the format information corresponding to the parameter information;

[0014] Send the callback function template to the requester.

[0015] Furthermore, it also includes:

[0016] Using the requester, determine the parameters to be called back based on business requirements, and determine the callback function based on the format information indicated in the callback function template and the parameters to be called back.

[0017] Furthermore, the callback parameter value is determined based on the parameter information indicated in the callback function, and the callback address is redirected according to the callback function and the callback parameter value, including:

[0018] Call the callback function to obtain the parameter information to be called back as indicated by the requester;

[0019] Determine the callback parameter value based on the parameter information;

[0020] The callback address is redirected based on the callback parameter values ​​and the format and parameter information indicated by the callback function.

[0021] Furthermore, the parameter information to be called back, as indicated by the requester, is stored in the requester's database, while the callback parameter values ​​are stored in the local database; the callback function is invoked to retrieve the parameter information to be called back, as indicated by the requester; and the callback parameter values ​​are determined based on the parameter information, including:

[0022] Call the callback function to retrieve the parameter information to be called from the requester's database;

[0023] The callback parameter value is determined by querying the local database based on the parameter information.

[0024] Furthermore, if the callback information does not include a callback function, it also includes:

[0025] Determine the default callback parameter value, and redirect the callback address based on the default callback parameter value;

[0026] The callback address after redirection is sent back to the requester.

[0027] According to a second aspect of the present invention, a data processing apparatus is provided, comprising:

[0028] The receiving module is used to receive data processing requests sent by the requester, wherein the data processing request includes a callback address;

[0029] The judgment module is used to determine whether a callback function is included in the data processing request.

[0030] The parameter value determination module, if the data processing request includes a callback function, is used to determine the callback parameter value based on the parameter information indicated in the callback function, and to redirect the callback address based on the callback function and the callback parameter value.

[0031] The callback module is used to send the callback address after redirection to the requester.

[0032] Furthermore, if the data processing request does not include a callback function, the parameter value determination module is used for:

[0033] Determine the default callback parameter value. Based on the parameter information indicated in the callback function, determine the callback parameter value and redirect the callback address according to the default callback parameter value.

[0034] According to a third aspect of the present invention, an electronic device is provided, comprising:

[0035] One or more processors;

[0036] Storage device for storing one or more programs.

[0037] When one or more programs are executed by one or more processors, the one or more processors implement any of the data processing methods described above.

[0038] According to a fourth aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements any of the data processing methods described above.

[0039] One embodiment of the above invention has the following advantages or beneficial effects: Because it employs a method of receiving a data processing request sent by the requester, wherein the data processing request includes a callback address; determining whether the data processing request includes a callback function; if so, determining the callback parameter value based on the parameter information indicated in the callback function; redirecting the callback address based on the callback function and the callback parameter value; and returning the redirected callback address to the requester, it overcomes the technical problem in existing solutions where only the parameter values ​​corresponding to pre-agreed parameter names are returned, resulting in an inability to meet the real-time and diverse needs of external systems (requesters), a narrow range of applicable scenarios, and a poor user experience. This achieves the technical effect of adding a callback function to the data processing request to increase the requester's autonomy over the callback result, meet the requester's real-time and diverse needs, expand the applicable scenarios of the data processing method, and improve the user experience.

[0040] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description

[0041] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:

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

[0043] Figure 2 This is a schematic diagram of the main flow of another data processing method provided according to an embodiment of the present invention;

[0044] Figure 3 This is a schematic diagram of the main modules of a data processing apparatus provided according to an embodiment of the present invention;

[0045] Figure 4 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;

[0046] Figure 5 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation

[0047] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0048] Figure 1 This is a schematic diagram of the main flow of a data processing method provided according to an embodiment of the present invention; as shown below. Figure 1 As shown, the data processing method provided in this embodiment of the invention mainly includes:

[0049] Step S101: Receive a data processing request sent by the requester, wherein the data processing request includes a callback address.

[0050] Specifically, the requester (an external system connected to the open system) sends a data processing request containing a callback address to the open system, which helps the open system to send the callback data back to the requester based on the callback address after obtaining the callback data.

[0051] Step S102: Determine whether the data processing request includes a callback function.

[0052] Based on this callback function, the requester can pass the parameter information it wants to obtain to the open system, and then the open system determines the corresponding callback parameter values ​​based on the above parameter information. This setting allows the requester to have autonomy over the callback results, satisfying its real-time and diverse needs.

[0053] Furthermore, according to an embodiment of the present invention, prior to the step of receiving a data processing request sent by the requesting party, the above method further includes:

[0054] Construct a callback function template, which indicates the format information corresponding to the parameter information;

[0055] Send the callback function template to the requester.

[0056] Specifically, by using open systems to build callback function templates and specifying the format of the parameter information added to the callback address, it is helpful for the requester to send a callback function that meets the format requirements. It is also helpful for the open system to accurately and quickly obtain the parameter information required by the requester after obtaining the callback function, and thus accurately determine the corresponding parameter values.

[0057] Preferably, according to an embodiment of the present invention, the above method further includes:

[0058] Using the requester, determine the parameters to be called back based on business requirements, and determine the callback function based on the format information indicated in the callback function template and the parameters to be called back.

[0059] Specifically, according to embodiments of the present invention, the parameter information determined by the requester based on business requirements can either be sent directly to the open system via a callback function, or it can be stored in the requester's database, allowing the open system to retrieve the target parameter information from the database by calling the callback function. This setup, by determining the parameter function based on the callback parameters determined by business requirements, satisfies the requester's real-time and diverse needs, thus improving the user experience.

[0060] Step S103: If yes, determine the callback parameter value according to the parameter information indicated in the callback function, and redirect the callback address according to the callback function and the callback parameter value.

[0061] Specifically, according to an embodiment of the present invention, the above-described method of determining the callback parameter value based on the parameter information indicated in the callback function, and redirecting the callback address based on the callback function and the callback parameter value, includes:

[0062] Call the callback function to obtain the parameter information to be called back as indicated by the requester;

[0063] Determine the callback parameter value based on the parameter information;

[0064] The callback address is redirected based on the callback parameter values ​​and the format and parameter information indicated by the callback function.

[0065] According to an embodiment of the present invention, parameter information (specifically, parameter names) and corresponding parameter values ​​can be concatenated into the callback address to achieve redirection processing of the callback address.

[0066] With the above settings, when the data processing request includes a callback function, the callback function is called to obtain the parameter information to be called back as indicated by the requester, and then the callback parameter value is determined. The callback address is then redirected, which increases the self-service processing rights of the requester system (an external system connected to the open system) for the callback information, enabling the external system to realize personalized and diversified callback requirements.

[0067] Further, according to an embodiment of the present invention, the parameter information to be called back indicated by the requester is stored in the requester's database, and the callback parameter value is stored in the local database; calling the callback function to obtain the parameter information to be called back indicated by the requester; determining the callback parameter value based on the parameter information includes:

[0068] Call the callback function to retrieve the parameter information to be called from the requester's database;

[0069] The callback parameter value is determined by querying the local database based on the parameter information.

[0070] Step S104: The callback address after redirection is sent back to the requester.

[0071] Furthermore, according to an embodiment of the present invention, if the callback information does not include a callback function, the method further includes step S105:

[0072] Determine the default callback parameter value, and redirect the callback address based on the default callback parameter value;

[0073] The callback address after redirection is sent back to the requester.

[0074] If the requester has no specific requirements, the parameter information to be returned can be directly agreed upon with the open system. In this case, there is no need to add new parameter information through the callback function, which can complete the data callback processing more quickly and improve the data processing efficiency.

[0075] According to the technical solution of the present invention, by receiving a data processing request sent by the requester, wherein the data processing request includes a callback address; determining whether the data processing request includes a callback function; if so, determining the callback parameter value according to the parameter information indicated in the callback function; redirecting the callback address according to the callback function and the callback parameter value; and returning the redirected callback address to the requester, the technical solution overcomes the technical problem in the existing solution that only returns the parameter value corresponding to the pre-agreed parameter name, which fails to meet the real-time and diverse needs of external systems, has a narrow applicable scenario, and a poor user experience. Therefore, the solution achieves the technical effect of adding a callback function to the data processing request to increase the requester's autonomy in controlling the callback result, meet the requester's real-time and diverse needs, expand the applicable scenario of the data processing method, and improve the user experience.

[0076] Figure 2 This is a schematic diagram of the main flow of another data processing method provided according to an embodiment of the present invention; as shown below. Figure 2 As shown, the data processing method provided in this embodiment of the invention mainly includes:

[0077] Step S201: Construct a callback function template, which indicates the format information corresponding to the parameter information; send the callback function template to the requester.

[0078] Specifically, by using open systems to build callback function templates and specifying the format of the parameter information added to the callback address, it is helpful for the requester to send a callback function that meets the format requirements. It is also helpful for the open system to accurately and quickly obtain the parameter information required by the requester after obtaining the callback function, and thus accurately determine the corresponding parameter values.

[0079] According to a preferred embodiment of the present invention, the created callback function template can be:

[0080] def main(url,outerContext,resultContext):

[0081] pass

[0082] Here, url is the callback address, outerContext is the parameter information that the requester wants to call back, which is stored in the requester's database; resultContext is the callback data information that the open system can return to the requester according to its own permissions, which is stored in the open system's database.

[0083] Step S202: Using the requester, determine the parameter information to be called back based on business requirements, and determine the callback function based on the format information indicated in the callback function template and the parameter information to be called back.

[0084] Specifically, according to embodiments of the present invention, the parameter information determined by the requester based on business requirements can either be sent directly to the open system via a callback function, or it can be stored in the requester's database, allowing the open system to retrieve the target parameter information from the database by calling the callback function. This setup, by determining the parameter function based on the callback parameters determined by business requirements, satisfies the requester's real-time and diverse needs, thus improving the user experience.

[0085] According to a preferred embodiment of the present invention, if the requesting party wishes to obtain authorization from the open system, it needs to obtain the login password "code" and status information "state". The password parameter name and status parameter name can be used to determine the callback function. The password parameter name and status parameter name are then placed in a database maintained by the requesting party. In another embodiment, if the requesting party wants to obtain the callback source, the parameter information "source = xx" can be placed in the requesting party's database. This allows the open system to retrieve the parameter information to be called from the requesting party's database by invoking the callback function, and thus determine the corresponding callback parameter value.

[0086] Step S203: Receive a data processing request sent by the requester, which includes a callback address and a callback function.

[0087] Specifically, the requester (an external system connected to the open system) sends a data processing request containing a callback address to the open system, which helps the open system to send the callback data back to the requester based on the callback address after obtaining the callback data.

[0088] Step S204: Call the callback function to obtain the parameter information to be called back as indicated by the requester; determine the callback parameter value based on the parameter information; and redirect the callback address according to the callback parameter value and the format information and parameter information indicated by the callback function.

[0089] According to embodiments of the present invention, parameter information (specifically, parameter names) and corresponding parameter values ​​can be concatenated into the callback address to achieve redirection processing of the callback address. Specifically, if there are multiple parameters to be callbackd, when concatenating them into the callback address, the multiple parameters to be callbackd are connected by a connector. Through the above settings, when the data processing request includes a callback function, the callback function is called to obtain the parameter information to be callbackd as indicated by the requester, and then the callback parameter values ​​are determined to redirect the callback address. This increases the self-service processing rights of the requesting system (an external system connected to the open system) regarding callback information, enabling the external system to realize personalized and diversified callback requirements.

[0090] According to a preferred embodiment of the present invention, the redirected callback address example can be: https: / / www.fake.com?code=xxx&state=123. Wherein, https: / / www.fake.com? is the original callback address, and the password parameter information "code=xxx" and the status parameter information "state=123" are the callback data, consisting of callback parameter names and callback parameter values.

[0091] According to an optional embodiment of the present invention, the redirected callback address example can also be: https: / / www.fake.com?code=xxx&state=123&source=xx. It can be seen that in this example, the requester has three types of callback parameters: password parameter "code=xxx", status parameter "state=123", and callback source parameter "source=xx".

[0092] Further, according to an embodiment of the present invention, the parameter information to be called back indicated by the requester is stored in the requester's database, and the callback parameter value is stored in the local database; calling the callback function to obtain the parameter information to be called back indicated by the requester; determining the callback parameter value based on the parameter information includes:

[0093] Call the callback function to retrieve the parameter information to be called from the requester's database;

[0094] The callback parameter value is determined by querying the local database based on the parameter information.

[0095] Step S205: The callback address after redirection is sent back to the requester.

[0096] Furthermore, according to an embodiment of the present invention, if the requesting party has no specific requirements, it can directly agree on the parameter information to be returned with the open system. That is, after agreeing on the parameter information to be returned with the open system in advance, when accessing the system, the requester directly sends a data processing request including a callback address to the open system. After determining the default callback parameter value, the open system redirects the callback address according to the default callback parameter value; then, it sends the redirected callback address back to the requesting party. With the above settings, in this case, there is no need to add new parameter information through the callback function, which can complete the data callback processing more quickly and improve data processing efficiency.

[0097] According to the technical solution of the present invention, by receiving a data processing request sent by the requester, wherein the data processing request includes a callback address; determining whether the data processing request includes a callback function; if so, determining the callback parameter value according to the parameter information indicated in the callback function; redirecting the callback address according to the callback function and the callback parameter value; and returning the redirected callback address to the requester, the technical solution overcomes the technical problem in the existing solution that only returns the parameter value corresponding to the pre-agreed parameter name, which fails to meet the real-time and diverse needs of external systems, has a narrow applicable scenario, and a poor user experience. Therefore, the solution achieves the technical effect of adding a callback function to the data processing request to increase the requester's autonomy in controlling the callback result, meet the requester's real-time and diverse needs, expand the applicable scenario of the data processing method, and improve the user experience.

[0098] Figure 3 This is a schematic diagram of the main modules of a data processing apparatus provided according to an embodiment of the present invention; as shown Figure 3 As shown, the data processing device 300 provided in this embodiment of the invention mainly includes:

[0099] The receiving module 301 is used to receive a data processing request sent by the requester, wherein the data processing request includes a callback address.

[0100] Specifically, the requester (an external system connected to the open system) sends a data processing request containing a callback address to the open system, which helps the open system to send the callback data back to the requester based on the callback address after obtaining the callback data.

[0101] The judgment module 302 is used to determine whether the data processing request includes a callback function.

[0102] Based on this callback function, the requester can pass the parameter information it wants to obtain to the open system, and then the open system determines the corresponding callback parameter values ​​based on the above parameter information. This setting allows the requester to have autonomy over the callback results, satisfying its real-time and diverse needs.

[0103] Furthermore, according to an embodiment of the present invention, the data processing apparatus 300 further includes a callback function template construction module, which, before the step of receiving a data processing request sent by the requester, is used to:

[0104] Construct a callback function template, which indicates the format information corresponding to the parameter information;

[0105] Send the callback function template to the requester.

[0106] Specifically, by using open systems to build callback function templates and specifying the format of the parameter information added to the callback address, it is helpful for the requester to send a callback function that meets the format requirements. It is also helpful for the open system to accurately and quickly obtain the parameter information required by the requester after obtaining the callback function, and thus accurately determine the corresponding parameter values.

[0107] Preferably, according to an embodiment of the present invention, the data processing apparatus 300 further includes a callback function determination module, used for:

[0108] Using the requester, determine the parameters to be called back based on business requirements, and determine the callback function based on the format information indicated in the callback function template and the parameters to be called back.

[0109] Specifically, according to embodiments of the present invention, the parameter information determined by the requester based on business requirements can either be sent directly to the open system via a callback function, or it can be stored in the requester's database, allowing the open system to retrieve the target parameter information from the database by calling the callback function. This setup, by determining the parameter function based on the callback parameters determined by business requirements, satisfies the requester's real-time and diverse needs, thus improving the user experience.

[0110] The parameter value determination module 303, if the data processing request includes a callback function, is used to determine the callback parameter value based on the parameter information indicated in the callback function, and to redirect the callback address based on the callback function and the callback parameter value.

[0111] Specifically, according to an embodiment of the present invention, the parameter value determination module 303 is used for:

[0112] Call the callback function to obtain the parameter information to be called back as indicated by the requester;

[0113] Determine the callback parameter value based on the parameter information;

[0114] The callback address is redirected based on the callback parameter values ​​and the format and parameter information indicated by the callback function.

[0115] According to an embodiment of the present invention, parameter information (specifically, parameter names) and corresponding parameter values ​​can be concatenated into the callback address to achieve redirection processing of the callback address.

[0116] With the above settings, when the data processing request includes a callback function, the callback function is called to obtain the parameter information to be called back as indicated by the requester, and then the callback parameter value is determined. The callback address is then redirected, which increases the self-service processing rights of the requester system (an external system connected to the open system) for the callback information, enabling the external system to realize personalized and diversified callback requirements.

[0117] Furthermore, according to an embodiment of the present invention, the parameter information to be called back indicated by the requester is stored in the requester's database, and the callback parameter value is stored in the local database; the parameter value determination module 303 is further configured to:

[0118] Call the callback function to retrieve the parameter information to be called from the requester's database;

[0119] The callback parameter value is determined by querying the local database based on the parameter information.

[0120] The callback module 304 is used to send the redirected callback address back to the requester.

[0121] Furthermore, according to an embodiment of the present invention, if the callback information does not include a callback function, the parameter value determination module 303 is used to determine a default callback parameter value and perform redirection processing on the callback address according to the default callback parameter value; the callback module 304 is used to send the redirected callback address back to the requester.

[0122] If the requester has no specific requirements, the parameter information to be returned can be directly agreed upon with the open system. In this case, there is no need to add new parameter information through the callback function, which can complete the data callback processing more quickly and improve the data processing efficiency.

[0123] According to the technical solution of the present invention, by receiving a data processing request sent by the requester, wherein the data processing request includes a callback address; determining whether the data processing request includes a callback function; if so, determining the callback parameter value according to the parameter information indicated in the callback function; redirecting the callback address according to the callback function and the callback parameter value; and returning the redirected callback address to the requester, the technical solution overcomes the technical problem in the existing solution that only returns the parameter value corresponding to the pre-agreed parameter name, which fails to meet the real-time and diverse needs of external systems, has a narrow applicable scenario, and a poor user experience. Therefore, the solution achieves the technical effect of adding a callback function to the data processing request to increase the requester's autonomy in controlling the callback result, meet the requester's real-time and diverse needs, expand the applicable scenario of the data processing method, and improve the user experience.

[0124] Figure 4 An exemplary system architecture 400 is shown that can be applied to the data processing method or data processing apparatus of the present invention.

[0125] like Figure 4As shown, system architecture 400 may include terminal devices 401, 402, and 403, network 404, and server 405 (this architecture is merely an example; the components included in a specific architecture may be adjusted according to the specific application). Network 404 serves as the medium for providing a communication link between terminal devices 401, 402, and 403 and server 405. Network 404 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.

[0126] Users can use terminal devices 401, 402, and 403 to interact with server 405 via network 404 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 401, 402, and 403, such as data processing applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0127] Terminal devices 401, 402, and 403 can be various electronic devices with displays that support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0128] Server 405 can be a server that provides various services, such as servers that process data from user terminal devices 401, 402, and 403 (for example only). This server can analyze and process received data processing requests and other data, and feed back the processing results (e.g., the callback address after redirection processing - for example only) to the terminal device.

[0129] It should be noted that the data processing method provided in the embodiments of the present invention is generally executed by server 405, and correspondingly, the data processing device is generally located in server 405.

[0130] It should be understood that Figure 4 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0131] The following is for reference. Figure 5 It shows a schematic diagram of the structure of a computer system 500 suitable for implementing terminal devices or servers of the present invention. Figure 5 The terminal device or server shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0132] like Figure 5As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 502 or programs loaded from storage section 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the system 500. The CPU 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0133] The following components are connected to I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to I / O interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 510 as needed so that computer programs read from it can be installed into storage section 508 as needed.

[0134] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by central processing unit (CPU) 501, it performs the functions defined above in the system of this invention.

[0135] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0136] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0137] The modules described in the embodiments of the present invention can be implemented in software or hardware. The described modules can also be housed in a processor; for example, a processor can be described as including a receiving module, a judging module, a parameter value determining module, and a callback module. The names of these modules do not necessarily limit the module itself; for example, the receiving module can also be described as "a module for receiving data processing requests sent by a requester, wherein the data processing request includes a callback address."

[0138] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include: receiving a data processing request sent by a requester, wherein the data processing request includes a callback address; determining whether the data processing request includes a callback function; if so, determining a callback parameter value based on parameter information indicated in the callback function; redirecting the callback address according to the callback function and the callback parameter value; and sending the redirected callback address back to the requester.

[0139] According to the technical solution of the present invention, by receiving a data processing request sent by the requester, wherein the data processing request includes a callback address; determining whether the data processing request includes a callback function; if so, determining the callback parameter value according to the parameter information indicated in the callback function; redirecting the callback address according to the callback function and the callback parameter value; and returning the redirected callback address to the requester, the technical solution overcomes the technical problem in the existing solution that only returns the parameter value corresponding to the pre-agreed parameter name, which fails to meet the real-time and diverse needs of external systems, has a narrow applicable scenario, and a poor user experience. Therefore, the solution achieves the technical effect of adding a callback function to the data processing request to increase the requester's autonomy in controlling the callback result, meet the requester's real-time and diverse needs, expand the applicable scenario of the data processing method, and improve the user experience.

[0140] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A data processing method, characterized in that, include: Receive a data processing request sent by the requester, wherein the data processing request includes a callback address; Determine whether the data processing request includes a callback function; If so, determine the callback parameter value based on the parameter information indicated in the callback function, and redirect the callback address according to the callback function and the callback parameter value; The redirected callback address is then sent back to the requester. The step of determining the callback parameter value based on the parameter information indicated in the callback function, and redirecting the callback address based on the callback function and the callback parameter value, includes: Call the callback function to obtain the parameter information to be called back as indicated by the requester; Determine the callback parameter value based on the parameter information; The callback address is redirected based on the callback parameter value and the format and parameter information indicated by the callback function.

2. The data processing method according to claim 1, characterized in that, Prior to the step of receiving the data processing request sent by the requesting party, the method further includes: Construct a callback function template, wherein the callback function template indicates the format information corresponding to the parameter information; Send the callback function template to the requester.

3. The data processing method according to claim 2, characterized in that, Also includes: Using the requester, determine the parameter information to be called back according to business requirements, and determine the callback function according to the format information indicated in the callback function template and the parameter information to be called back.

4. The data processing method according to claim 1, characterized in that, The parameter information to be called back as indicated by the requester is stored in the requester's database, and the callback parameter value is stored in the local database; The callback function is invoked to obtain the parameter information to be called back as indicated by the requester; The callback parameter value is determined based on the parameter information, including: The callback function is invoked to retrieve the parameter information to be called from the requester's database; The callback parameter value is determined by querying the local database based on the parameter information.

5. The data processing method according to claim 1, characterized in that, If the data processing request does not include a callback function, it also includes: Determine the default callback parameter value, and redirect the callback address according to the default callback parameter value; The callback address after the redirection is sent back to the requester.

6. A data processing apparatus, characterized in that, include: A receiving module is used to receive a data processing request sent by a requester, wherein the data processing request includes a callback address; The judgment module is used to determine whether the data processing request includes a callback function; The parameter value determination module, if the data processing request includes a callback function, is used to determine the callback parameter value based on the parameter information indicated in the callback function, and to redirect the callback address based on the callback function and the callback parameter value; The callback module is used to send the callback address after the redirection process back to the requester; The parameter value determination module is also used for: Call the callback function to obtain the parameter information to be called back as indicated by the requester; Determine the callback parameter value based on the parameter information; The callback address is redirected based on the callback parameter value and the format and parameter information indicated by the callback function.

7. The data processing apparatus according to claim 6, characterized in that, If the data processing request does not include a callback function, the parameter value determination module is used to: Determine the default callback parameter value, determine the callback parameter value based on the parameter information indicated in the callback function, and redirect the callback address based on the default callback parameter value.

8. An electronic device, characterized in that, include: One or more processors; 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 as described in any one of claims 1-5.

9. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Communication management method and device

    CN109561048A

  • Page returning method and device

    CN113961861A