Method, apparatus, device, storage medium and program product for data call
By receiving the request of the target calling system, obtaining configuration information and querying the database, the problem of each additional calling system in the prior art requires a separate development interface, and efficient data calls are achieved.
Patent Information
- Application Number
- CN202211175118.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-26
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2042-09-26
AI Technical Summary
In the prior art, each new calling system is added to a separate development of a data access interface, resulting in high workload and low efficiency.
By receiving the request from the target calling system, the configuration information corresponding to the identification is obtained, including callable data services and query conditions, query shared data from the database, and send target data results.
It realizes rapid response to different call requests, reducing workload and improving call efficiency.
Smart Images

Figure CN115514820B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data sharing, and particularly relates to a method, device, equipment, storage medium and program product for data invocation. Background Art
[0002] In the field of data sharing, an information system needs to provide data sharing for other information systems, that is, share data for other information systems to invoke.
[0003] In the prior art, usually a separate data access interface is provided for different requirements of each calling system, and a new interface needs to be developed again for each new calling system added, with a large workload and low efficiency. Summary of the Invention
[0004] Embodiments of this application provide a method, device, equipment, storage medium and program product for data invocation, which can solve the problem in the prior art that a separate data access interface is provided for different requirements of each calling system, and a new interface needs to be developed again for each new calling system added, with a large workload and low efficiency.
[0005] In a first aspect, an embodiment of this application provides a method for data invocation. The method is applied to a data sharing system and includes:
[0006] Receiving an invocation request sent by a target calling system, where the invocation request includes information of a target data service, a request condition, and an identifier of the target calling system;
[0007] Obtaining configuration information corresponding to the identifier from a database, where the configuration information includes data services that the target calling system can invoke, and query conditions and data ranges that the data services can use;
[0008] When it is determined that the data services that the target calling system can invoke include the target data service, and the query conditions include the request condition, querying shared data in the database based on the request condition and the data range to obtain a target data result;
[0009] Sending the target data result to the target calling system.
[0010] In an implementation, the invocation request further includes identity verification information, and the configuration information further includes key information of the target calling system; the step of querying shared data in the database based on the request condition and the data range to obtain a target data result when it is determined that the data services that the target calling system can invoke include the target data service, and the query conditions include the request condition includes:
[0011] Obtain the current time of the data sharing system;
[0012] Perform connection calculation based on the key information and the current time to obtain target coding information;
[0013] When it is determined that the target coding information is consistent with the identity certification information, the data services that the target calling system can call include the target data service, and the query condition includes the request condition, query the shared data in the database based on the request condition and the data range to obtain a target data result.
[0014] In one implementation manner, the method further includes:
[0015] When it is determined that the target coding information is inconsistent with the identity certification information, calculate the difference between the current time and a target value as a first time, and calculate the sum of the current time and the target value as a second time;
[0016] Perform connection calculation based on the key information and the first time to obtain first coding information, and perform connection calculation based on the key information and the second time to obtain second coding information;
[0017] When it is determined that the first coding information is consistent with the identity certification information or the second coding information is consistent with the identity certification information, the data services that the target calling system can call include the target data service, and the query condition includes the request condition, query the shared data in the database based on the request condition and the data range to obtain a target data result.
[0018] In one implementation manner, the method further includes:
[0019] Generate call behavior information, where the call behavior information includes the identifier of the target calling system, the number of the target data service, the request condition, the paging information, and the query time;
[0020] Write the call behavior information into the database.
[0021] In one implementation manner, the method further includes:
[0022] Obtain multiple call behavior information within a preset query time period;
[0023] When the request conditions of at least two of the multiple call behavior information are consistent, sort the page numbers of the paging information in at least two of the call behavior information to obtain a page number sequence;
[0024] Generate a warning message when there are a preset number of consecutive page numbers in the page number sequence.
[0025] In one implementation, the configuration information further includes preset data items corresponding to the target call system; when it is determined that the data service that the target call system can call includes the target data service and the query condition includes the request condition, query the shared data in the database based on the request condition and the data range to obtain a target data result, including:
[0026] When it is determined that the data service that the target call system can call includes the target data service and the query condition includes the request condition, query the shared data in the database based on the request condition and the data range to obtain a first data result, where the first data result includes data corresponding to multiple data items;
[0027] Determine the data corresponding to the preset data item among the multiple data items as the target data result.
[0028] In a second aspect, an embodiment of the present application provides a data call device, which is applied to a data sharing system and includes:
[0029] A receiving module, configured to receive a call request sent by a target call system, where the call request includes information about a target data service, a request condition, and an identifier of the target call system;
[0030] An obtaining module, configured to obtain configuration information corresponding to the identifier from a database, where the configuration information includes data services that the target call system can call, as well as query conditions and data ranges that the data services can use;
[0031] A query module, configured to query the shared data in the database based on the request condition and the data range to obtain a target data result when it is determined that the data service that the target call system can call includes the target data service and the query condition includes the request condition;
[0032] A sending module, configured to send the target data result to the target call system.
[0033] In one implementation, the call request further includes identity verification information, and the configuration information further includes key information of the target call system; the data call device further includes a calculation module;
[0034] The obtaining module is further configured to obtain the current time of the data sharing system;
[0035] A calculation module, configured to perform connection calculation based on the key information and the current time to obtain target coding information;
[0036] The query module is further configured to, when determining that the target coding information is consistent with the identity proof information, the data services that can be called by the target calling system include the target data service, and the query condition includes the request condition, query the shared data in the database based on the request condition and the data range to obtain a target data result.
[0037] In one implementation, the calculation module is further configured to, when determining that the target coding information is inconsistent with the identity proof information, calculate the difference between the current time and a target value as a first time, and calculate the sum of the current time and the target value as a second time;
[0038] The calculation module is further configured to perform connection calculation based on the key information and the first time to obtain first coding information, and perform connection calculation based on the key information and the second time to obtain second coding information;
[0039] The query module is further configured to, when determining that the first coding information is consistent with the identity proof information or the second coding information is consistent with the identity proof information, the data services that can be called by the target calling system include the target data service, and the query condition includes the request condition, query the shared data in the database based on the request condition and the data range to obtain a target data result.
[0040] In one implementation, the data calling device further includes a generation module and a writing module;
[0041] The generation module is configured to generate call behavior information, where the call behavior information includes the identifier of the target calling system, the number of the target data service, the request condition, the paging information, and the query time;
[0042] The writing module is configured to write the call behavior information into the database.
[0043] In one implementation, the data calling device further includes a sorting module;
[0044] The acquisition module is further configured to acquire multiple call behavior information within a preset query time period;
[0045] The sorting module is configured to sort the page numbers of the paging information in at least two of the multiple call behavior information when the request conditions in at least two of the multiple call behavior information are the same, to obtain a page number sequence;
[0046] The generating module is further configured to generate a warning message when there are a preset number of consecutive page numbers in the page number sequence.
[0047] In one implementation, the configuration information further includes preset data items corresponding to the target calling system; the data calling device further includes a determining module;
[0048] The query module is further configured to, when it is determined that the data service that can be called by the target calling system includes the target data service and the query condition includes the request condition, query the shared data in the database based on the request condition and the data range to obtain a first data result, where the first data result includes data corresponding to multiple data items;
[0049] The determining module is configured to determine the data corresponding to the preset data item among the multiple data items as the target data result.
[0050] In a third aspect, an embodiment of the present application provides an electronic device, which includes: a processor and a memory storing computer program instructions;
[0051] When the processor executes the computer program instructions, the data calling method described in any one of the embodiments in the first aspect is implemented.
[0052] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the data calling method described in any one of the embodiments in the first aspect is implemented.
[0053] In a fifth aspect, an embodiment of the present application provides a computer program product, when the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is caused to execute the data calling method described in any one of the embodiments in the first aspect.
[0054] The method, apparatus, device, storage medium and program product for data invocation in the embodiments of the present application receive a call request sent by a target call system. The call request includes information about the target data service, request conditions, and the identifier of the target call system. Then, configuration information corresponding to the identifier is obtained from the database. The configuration information includes the data services that can be invoked by the target call system, as well as the query conditions and data ranges that can be used by the data services. In this way, it is convenient to determine whether the call request meets the requirements based on the configuration information. When it is determined that the data services that can be invoked by the target call system include the target data service and the query conditions include the request conditions, the shared data in the database is queried based on the request conditions and the data range to obtain the target data result, and then the target data result is sent to the target call system. In this way, different call requests sent by the target call system can be quickly invoked for data, reducing the workload and improving the call efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] To more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required to be used in the embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.
[0056] Figure 1 is a flowchart of the method for data invocation provided by an embodiment of the present application;
[0057] Figure 2 is a schematic structural diagram of the apparatus for data invocation provided by an embodiment of the present application;
[0058] Figure 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0059] The features and exemplary embodiments of various aspects of the present application will be described in detail below. To make the objectives, technical solutions, and advantages of the present application more clear and understandable, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without some of these specific details. The following description of the embodiments is only intended to provide a better understanding of the present application by showing examples of the present application.
[0060] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.
[0061] In the technical solution of this application, the acquisition, storage, use, processing, etc. of data all comply with the relevant provisions of national laws and regulations.
[0062] As described in the background art, currently existing data sharing methods usually provide separate data access interfaces for the different requirements of each calling system. When adding a new calling system, new interfaces need to be developed again, with a large workload. When the data content needs to be adjusted, the code needs to be modified and the project needs to be launched to complete the adjustment, resulting in a slow response speed.
[0063] To solve the above problems, the embodiments of this application provide a method, device, equipment, storage medium and program product for data calling. The data calling method can receive a calling request sent by a target calling system, where the calling request includes information about the target data service, request conditions, and the identifier of the target calling system. Then, obtain the configuration information corresponding to the identifier from the database, where the configuration information includes the data services that the target calling system can call, as well as the query conditions and data ranges that the data services can use. In this way, it is convenient to determine whether the calling request meets the requirements based on the configuration information. When it is determined that the data services that the target calling system can call include the target data service and the query conditions include the request conditions, query the shared data in the database based on the request conditions and data ranges to obtain the target data result, and then send the target data result to the target calling system. In this way, different calling requests sent by the target calling system can be quickly called for data, reducing the workload and improving the calling efficiency. First, the data calling method provided by the embodiments of this application will be introduced below.
[0064] Figure 1 The flowchart of the data calling method provided by an embodiment of this application is shown.
[0065] As Figure 1 shown, this data calling method is specifically applied to a data sharing system and can specifically include the following steps:
[0066] S110 receives a call request sent by a target calling system. The call request may include information about a target data service, request conditions, and an identifier of the target calling system.
[0067] The data sharing system can be a system capable of providing multiple data service calls, and the target calling system can be any calling system. The interface of the data sharing system provides functions such as adding a calling system, editing a calling system, deactivating a calling system, editing and adjusting call parameters, editing and adjusting data items, and enabling or disabling data sharing services.
[0068] The target data service can be the data service that the target calling system needs to call. Among them, the data service can be a software service that can encapsulate operations on key data entities related to an enterprise. The request conditions can be the query conditions requested by the target calling system, and the identifier of the target calling system can uniquely identify the target calling system and can be information in the form of letters, numbers, or symbols.
[0069] S120 obtains configuration information corresponding to the identifier from the database. The configuration information may include the data services that the target calling system can call, as well as the query conditions and data ranges that the data services can use.
[0070] The configuration information can be the information pre-configured by the target calling system in the database. In the database, the data services that each calling system can call (access), as well as the query conditions and data ranges that the data services can use, are pre-configured. The query conditions can be the conditions for query parameters, and the data range can be, for example, the range of available interfaces. The data range is used to limit the range of interfaces for querying.
[0071] S130, when it is determined that the data services that the target calling system can call include the target data service and the query conditions include the request conditions, query the shared data in the database based on the request conditions and the data range to obtain the target data result.
[0072] Exemplarily, the target data service in the call request sent by the target calling system is meeting information, and the request condition is meeting classification. Obtain the configuration information corresponding to the identifier of the target calling system. The data services that the target calling system can call in the configuration information include meeting information, and the query conditions include meeting classification. The data range that the target data service can use in the configuration information is the interface range of the head office. Then, query the database based on the query condition of meeting classification and the data range to obtain the shared data.
[0073] S140 sends the target data result to the target calling system.
[0074] After querying the target data result, return the target data result to the caller, that is, the target calling system.
[0075] In the embodiments of the present application, by receiving a call request sent by a target call system, the call request includes information of a target data service, a request condition, and an identifier of the target call system. Then, configuration information corresponding to the identifier is obtained from a database, and the configuration information includes data services that can be called by the target call system, as well as query conditions and data ranges that can be used by the data services. In this way, it is convenient to determine whether the call request meets the requirements based on the configuration information. When it is determined that the data services that can be called by the target call system include the target data service and the query condition includes the request condition, the shared data in the database is queried based on the request condition and the data range to obtain a target data result, and then the target data result is sent to the target call system. In this way, different call requests sent by the target call system can be quickly called for data, reducing the workload and improving the call efficiency.
[0076] In some embodiments, the call request may further include identity verification information, and the configuration information may further include key information of the target call system; S130 may specifically include:
[0077] Obtain the current time of the data sharing system;
[0078] Perform a connection calculation based on the key information and the current time to obtain target coding information;
[0079] When it is determined that the target coding information is consistent with the identity verification information, the data services that can be called by the target call system include the target data service, and the query condition includes the request condition, the shared data in the database is queried based on the request condition and the data range to obtain a target data result.
[0080] The current time may be the time of the server of the data sharing system. The identity verification information in the call request may be information used for identity verification. For example, it may be coding information calculated by the target call system based on the current time and the key information of the target call system. The target coding information may be an MD5 code obtained by performing a connection calculation based on the key information and the current time. If it is determined that the target coding information is consistent with the identity verification information, the identity verification is passed, and subsequent verification steps can be performed.
[0081] As an example, obtain a call request message, which contains call system information and identity verification information. According to the call system information, read the key information configured for the call system from the database. Connect the key information and the current time to calculate its MD5 code, and compare this code with the identity verification information. If they are the same, the identity authentication is passed, and subsequent query steps can be performed.
[0082] In the embodiments of the present application, by obtaining the current time of the data sharing system and performing connection calculation based on the key information and the current time, target coding information is obtained. Thus, when it is determined that the target coding information is consistent with the identity certificate information, the data services that the target calling system can call include the target data service, and the query condition includes the request condition, the shared data in the database is queried based on the request condition and the data range to obtain the target data result. In this way, the target calling system can be authenticated according to the key and time, and the security of data access can be enhanced.
[0083] In some embodiments, the method for data calling may further include:
[0084] When it is determined that the target coding information is inconsistent with the identity certificate information, calculate the difference between the current time and the target value as the first time, and calculate the sum of the current time and the target value as the second time;
[0085] Perform connection calculation based on the key information and the first time to obtain the first coding information, and perform connection calculation based on the key information and the second time to obtain the second coding information;
[0086] When it is determined that the first coding information is consistent with the identity certificate information or the second coding information is consistent with the identity certificate information, the data services that the target calling system can call include the target data service, and the query condition includes the request condition, the shared data in the database is queried based on the request condition and the data range to obtain the target data result.
[0087] The target value can be any preset value that can represent time. The first time is the difference between the current time and the target value, and the second time is the sum of the current time and the target value. For example, the target value can be 1 minute, that is, the first time is the previous minute of the current time, and the second time is the next minute of the current time.
[0088] When it is determined that the target coding information is inconsistent with the identity certificate information, calculate the first coding information corresponding to the first time and the second coding information corresponding to the second time by using the same means as calculating the target coding information, and perform identity verification again.
[0089] In the embodiments of the present application, when it is determined that the target coding information is inconsistent with the identity certification information, the difference between the current time and the target value is calculated as the first time, and the sum of the current time and the target value is calculated as the second time. Then, connection calculation is performed based on the key information and the first time to obtain the first coding information, and connection calculation is performed based on the key information and the second time to obtain the second coding information. Thus, when it is determined that the first coding information is consistent with the identity certification information or the second coding information is consistent with the identity certification information, and the data services that the target call system can call include the target data service and the query conditions include the request conditions, the shared data in the database is queried based on the request conditions and the data range to obtain the target data result. In this way, errors caused by server time asynchronization can be avoided, and the accuracy of identity authentication can be improved.
[0090] In some embodiments, the method for data call may further include:
[0091] Generating call behavior information, which may include the identifier of the target call system, the number of the target data service, the request conditions, the paging information, and the query time;
[0092] Writing the call behavior information into the database.
[0093] The number of the target data service can be used to uniquely identify the target data service. The paging information may be the page number information in the target data result obtained by paging query of the shared data, and the query time may be the time for querying the shared data.
[0094] As an example, after receiving a call request, the data sharing system performs identity authentication and data query, then calls the message queue, and submits the call system identifier, the number of the queried data service, the content of the requested query conditions, the paging information, and the query time to the message queue. The message queue consumer writes the call behavior information into the database.
[0095] In addition, the monitoring system can read the call behavior information from the database, identify the usage of interface calls through the monitoring interface, and generate prompt information for the error conditions of the interface, thereby improving the maintainability of the system.
[0096] In the embodiments of the present application, by generating call behavior information, which includes the identifier of the target call system, the number of the target data service, the request conditions, the paging information, and the query time, and writing the call behavior information into the database, it is convenient for users to call the call behavior information at any time for viewing, so as to facilitate the discovery of abnormal calls.
[0097] In some embodiments, the method for data call may further include:
[0098] Obtain multiple call behavior information within a preset query time period;
[0099] When request conditions of at least two calling behavior information among the multiple calling behavior information are consistent, the page numbers of the paging information in the at least two calling behavior information are sorted to obtain a page number sequence;
[0100] When there are a preset number of consecutive page numbers in the page number sequence, a warning message is generated.
[0101] The preset query time period can be a time period set by the user, for example, 5 minutes, or multiple call behavior information within the preset query time period can be obtained according to the query time. Multiple call behavior information can be behavior information queried for multiple call requests sent by the target call system.
[0102] If the request conditions of at least two of the multiple call behavior information are consistent, that is, there are more than two identical target call systems and identical request conditions, then the page numbers of the paging information in the at least two call behavior information are sorted to obtain a page number sequence. If there are a preset number of consecutive page numbers in the page number sequence, a warning message is generated, wherein the preset number can be any value pre-set by the user based on experience, such as 30 pages or 50 pages.
[0103] In addition, when an early warning message is generated, the early warning message is displayed on the early warning management interface, and the call switch of the target call system is turned off. If it is manually confirmed that it is a normal operation and not an abnormal call, the user can reopen the call switch through the early warning management interface.
[0104] In addition, the number of calls to each calling system is counted regularly, and the call behavior records from a period of time ago are cleared to prevent excessive records.
[0105] In the embodiment of the present application, by acquiring multiple call behavior information within a preset query time period, and when the request conditions of at least two of the multiple call behavior information are consistent, the page numbers of the paging information in at least two of the call behavior information are sorted to obtain a page number sequence, and then when there are a preset number of consecutive page numbers in the page number sequence, an early warning message is generated. In this way, abnormal call behavior can be monitored in real time, and early warning and blocking can be carried out to prevent the leakage of the entire amount of data.
[0106] In some embodiments, the configuration information may also include preset data items corresponding to the target calling system; S130 may specifically include:
[0107] When it is determined that the data services callable by the target calling system include the target data service and the query conditions include the request conditions, the shared data in the database is queried based on the request conditions and the data range to obtain a first data result, where the first data result includes the data corresponding to multiple data items;
[0108] Determine the data corresponding to the preset data items among the multiple data items as the target data result.
[0109] Exemplarily, the preset data items corresponding to the target calling system in the configuration information include the meeting title, meeting classification, meeting time, and meeting form. In addition to the meeting title, meeting classification, meeting time, and meeting form, the multiple data items in the first data result also include information about the meeting host. Therefore, it is necessary to filter out the data item of the meeting host and use the data corresponding to the preset data items among the multiple data items as the target data result.
[0110] In the embodiment of the present application, when it is determined that the data services callable by the target calling system include the target data service and the query conditions include the request conditions, the shared data in the database is queried based on the request conditions and the data range to obtain a first data result, where the first data result includes the data corresponding to multiple data items, and then the data corresponding to the preset data items among the multiple data items is determined as the target data result, so that the data items that can be provided to the target calling system can be read from the database to ensure data security.
[0111] Figure 2 It is a schematic structural diagram of a data calling device 200 shown according to an exemplary embodiment.
[0112] As Figure 2 shown, the data calling device 200 is applied to a data sharing system and may include:
[0113] A receiving module 201, configured to receive a calling request sent by the target calling system, where the calling request includes information about the target data service, request conditions, and an identifier of the target calling system;
[0114] An obtaining module 202, configured to obtain configuration information corresponding to the identifier from the database, where the configuration information includes the data services callable by the target calling system, as well as the query conditions and data range that can be used by the data service;
[0115] A query module 203, configured to query the shared data in the database based on the request conditions and the data range to obtain a target data result when it is determined that the data services callable by the target calling system include the target data service and the query conditions include the request conditions;
[0116] A sending module 204, configured to send a target data result to a target calling system.
[0117] In an implementation, the calling request may further include identity authentication information, and the configuration information may further include key information of the target calling system; the data calling apparatus 200 may further include a calculation module;
[0118] An obtaining module 202, further configured to obtain the current time of the data sharing system;
[0119] A calculation module, configured to perform connection calculation based on the key information and the current time to obtain target encoding information;
[0120] A query module 203, further configured to, when determining that the target encoding information is consistent with the identity authentication information, the data service that the target calling system can call includes the target data service, and the query condition includes the request condition, query the shared data in the database based on the request condition and the data range to obtain a target data result.
[0121] In an implementation, the calculation module is further configured to, when determining that the target encoding information is inconsistent with the identity authentication information, calculate the difference between the current time and a target value as a first time, and calculate the sum of the current time and the target value as a second time;
[0122] The calculation module is further configured to perform connection calculation based on the key information and the first time to obtain first encoding information, and perform connection calculation based on the key information and the second time to obtain second encoding information;
[0123] The query module 203 is further configured to, when determining that the first encoding information is consistent with the identity authentication information or the second encoding information is consistent with the identity authentication information, the data service that the target calling system can call includes the target data service, and the query condition includes the request condition, query the shared data in the database based on the request condition and the data range to obtain a target data result.
[0124] In an implementation, the data calling apparatus 200 may further include a generation module and a writing module;
[0125] A generation module, configured to generate call behavior information, where the call behavior information includes an identifier of the target calling system, a number of the target data service, a request condition, paging information, and a query time;
[0126] A writing module, configured to write the call behavior information into the database.
[0127] In an implementation, the data calling apparatus 200 may further include a sorting module;
[0128] The obtaining module 202 is further configured to obtain a plurality of call behavior information within a preset query time period;
[0129] The sorting module is configured to sort the page numbers of the paging information in at least two call behavior information when the request conditions of at least two call behavior information among the plurality of call behavior information are the same, so as to obtain a page number sequence;
[0130] The generating module is further configured to generate a warning message when there are a preset number of consecutive page numbers in the page numbers in the page number sequence.
[0131] In one implementation manner, the configuration information may further include preset data items corresponding to the target call system; the data calling device 200 may further include a determining module;
[0132] The query module 203 is further configured to query the shared data in the database based on the request condition and the data range to obtain a first data result when it is determined that the data service that the target call system can call includes the target data service and the query condition includes the request condition. The first data result includes the data corresponding to a plurality of data items;
[0133] The determining module is configured to determine the data corresponding to the preset data item among the plurality of data items as the target data result.
[0134] Thus, by receiving a call request sent by the target call system, the call request includes information of the target data service, a request condition, and an identifier of the target call system. Then, obtain the configuration information corresponding to the identifier from the database. The configuration information includes the data services that the target call system can call, as well as the query conditions and data ranges that the data services can use. In this way, it is convenient to determine whether the call request meets the requirements based on the configuration information. When it is determined that the data service that the target call system can call includes the target data service and the query condition includes the request condition, query the shared data in the database based on the request condition and the data range to obtain the target data result, and then send the target data result to the target call system. In this way, different call requests sent by the target call system can be quickly called for data, reducing the workload and improving the call efficiency.
[0135] Figure 3 It shows a schematic hardware structure diagram of the electronic device provided in the embodiment of the present application.
[0136] The electronic device may include a processor 301 and a memory 302 storing computer program instructions.
[0137] Specifically, the above-mentioned processor 301 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be an integrated circuit configured to implement one or more embodiments of the present application.
[0138] The memory 302 may include a mass storage for data or instructions. By way of example and not limitation, the memory 302 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disc, a magneto-optical disc, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In a suitable case, the memory 302 may include removable or non-removable (or fixed) media. In a suitable case, the memory 302 may be internal or external to the integrated gateway disaster recovery device. In a specific embodiment, the memory 302 is a non-volatile solid state memory.
[0139] The memory may include a read only memory (ROM), a random access memory (RAM), a magnetic disk storage media device, an optical storage media device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of the present disclosure.
[0140] The processor 301 queries and executes the computer program instructions stored in the memory 302 to implement any one of the data calling methods in the above embodiments.
[0141] In one example, the electronic device may further include a communication interface 303 and a bus 310. As shown, Figure 3 the processor 301, the memory 302, and the communication interface 303 are connected through the bus 310 and complete communication with each other.
[0142] The communication interface 303 is mainly used to implement communication between the modules, devices, units, and / or devices in the embodiments of the present application.
[0143] Bus 310 includes hardware, software, or both, and couples components of devices that make data calls to each other. By way of example and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable bus or a combination of two or more of these. Where appropriate, bus 310 may include one or more buses. Although embodiments of the present application describe and illustrate specific buses, the present application contemplates any suitable bus or interconnect.
[0144] The electronic device can execute the data call method in the embodiments of the present application based on a received call request sent by a target call system. The call request includes information about the target data service, request conditions, and the identity of the target call system, thereby implementing the Figure 1 data call method described.
[0145] In addition, in combination with the data call method in the above embodiments, embodiments of the present application can be implemented by providing a computer storage medium. Computer program instructions are stored on the computer storage medium; when the computer program instructions are executed by a processor, any one of the data call methods in the above embodiments is implemented.
[0146] It should be clear that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present application.
[0147] The functional blocks shown in the above-described structural block diagrams can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, and so on. When implemented in software, the elements of the present application are programs or code segments for performing the required tasks. The program or code segment can be stored in a machine-readable medium or transmitted over a transmission medium or communication link via a data signal carried in a carrier wave. A "machine-readable medium" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical discs, hard disks, fiber optic media, radio frequency (RF) links, and so on. The code segment can be downloaded via a computer network such as the Internet, an intranet, and so on.
[0148] It should also be noted that in the exemplary embodiments mentioned in the present application, some methods or systems are described based on a series of steps or devices. However, the present application is not limited to the order of the above steps, that is, the steps can be executed in the order mentioned in the embodiments, or different from the order in the embodiments, or several steps can be executed simultaneously.
[0149] Aspects of the present disclosure have been described above with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block in the flowcharts and / or block diagrams, and the combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data invocation devices to produce a machine, such that the instructions executed by the processor of the computer or other programmable data invocation devices enable the implementation of the functions / actions specified in one or more blocks of the flowcharts and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and the combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware for performing the specified functions or actions, or by a combination of dedicated hardware and computer instructions.
[0150] As described above, this is only the specific implementation manner of the present application. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein. It should be understood that the protection scope of the present application is not limited thereto. Any skilled person in the art within the technical scope disclosed by the present application can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of the present application.
Claims
1. A method for data calling, characterized in that, The method is applied to a data sharing system and includes: Receiving a call request sent by a target calling system, where the call request includes information about a target data service, request conditions, and an identifier of the target calling system; Obtaining configuration information corresponding to the identifier from a database, where the configuration information includes data services that the target calling system can call, as well as query conditions and data ranges that the data services can use; When it is determined that the data services that the target calling system can call include the target data service and the query conditions include the request conditions, querying the shared data in the database based on the request conditions and the data range to obtain a target data result; Sending the target data result to the target calling system; The call request further includes identity verification information, and the configuration information further includes key information of the target calling system; the step of querying the shared data in the database based on the request conditions and the data range to obtain a target data result when it is determined that the data services that the target calling system can call include the target data service and the query conditions include the request conditions includes: Obtaining the current time of the data sharing system; Performing a connection calculation based on the key information and the current time to obtain target coding information; When it is determined that the target coding information is consistent with the identity verification information, the data services that the target calling system can call include the target data service, and the query conditions include the request conditions, querying the shared data in the database based on the request conditions and the data range to obtain a target data result.
2. The method according to claim 1, characterized in that, The method further includes: When it is determined that the target coding information is inconsistent with the identity verification information, calculating the difference between the current time and a target value as a first time, and calculating the sum of the current time and the target value as a second time; Performing a connection calculation based on the key information and the first time to obtain first coding information, and performing a connection calculation based on the key information and the second time to obtain second coding information; When it is determined that the first coding information is consistent with the identity verification information or the second coding information is consistent with the identity verification information, the data services that the target calling system can call include the target data service, and the query conditions include the request conditions, querying the shared data in the database based on the request conditions and the data range to obtain a target data result.
3. The method according to claim 1, wherein The method further includes: Generating call behavior information, where the call behavior information includes the identifier of the target calling system, the number of the target data service, the request conditions, paging information, and the query time; Writing the call behavior information into the database.
4. The method according to claim 3, characterized in that, The method further includes: Obtaining multiple call behavior information within a preset query time period; When the request conditions of at least two of the multiple call behavior information are the same, sorting the page numbers of the paging information in at least two of the call behavior information to obtain a page number sequence; Generate a warning message when there are a preset number of consecutive page numbers in the page number sequence.
5. The method according to claim 1, wherein The configuration information further includes preset data items corresponding to the target call system; when it is determined that the data service that the target call system can call includes the target data service, and the query condition includes the request condition, query the shared data in the database based on the request condition and the data range to obtain a target data result, including: When it is determined that the data service that the target call system can call includes the target data service, and the query condition includes the request condition, query the shared data in the database based on the request condition and the data range to obtain a first data result, where the first data result includes data corresponding to multiple data items; Determine the data corresponding to the preset data item among the multiple data items as the target data result.
6. A device for data calling, characterized in that, The device is applied to a data sharing system and includes: A receiving module, configured to receive a call request sent by a target call system, where the call request includes information about a target data service, a request condition, and an identifier of the target call system; An obtaining module, configured to obtain configuration information corresponding to the identifier from a database, where the configuration information includes data services that the target call system can call, as well as query conditions and data ranges that can be used by the data services; A query module, configured to query the shared data in the database based on the request condition and the data range to obtain a target data result when it is determined that the data service that the target call system can call includes the target data service, and the query condition includes the request condition; A sending module, configured to send the target data result to the target call system; The call request further includes identity verification information, and the configuration information further includes key information of the target call system; the data call device further includes: An obtaining module, further configured to obtain the current time of the data sharing system; A calculation module, configured to perform a connection calculation based on the key information and the current time to obtain target coding information; A query module, further configured to query the shared data in the database based on the request condition and the data range to obtain a target data result when it is determined that the target coding information is consistent with the identity verification information, the data service that the target call system can call includes the target data service, and the query condition includes the request condition.
7. An electronic device, characterized in that, The device includes: a processor, and a memory storing computer program instructions; the processor queries and executes the computer program instructions to implement the data call method according to any one of claims 1-5.
8. A computer storage medium, characterized in that, Computer program instructions are stored on the computer storage medium, and when the computer program instructions are executed by a processor, the data call method according to any one of claims 1-5 is implemented.
9. A computer program product, characterized in that, When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is caused to execute the data call method according to any one of claims 1-5.
Citation Information
Patent Citations
Sharing method and device of unstructured data, computer device and storage medium
CN109510840A