CN113596164A - Data access method, device, system, equipment and medium - Google Patents

Data access method, device, system, equipment and medium Download PDF

Info

Publication number
CN113596164A
CN113596164A CN202110878225.7A CN202110878225A CN113596164A CN 113596164 A CN113596164 A CN 113596164A CN 202110878225 A CN202110878225 A CN 202110878225A CN 113596164 A CN113596164 A CN 113596164A
Authority
CN
China
Prior art keywords
type
terminal equipment
data
gateway
access request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110878225.7A
Other languages
Chinese (zh)
Inventor
杜学智
刘大鹏
雷凯跃
王震
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
ICBC Technology Co Ltd
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
ICBC Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC, ICBC Technology Co Ltd filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110878225.7A priority Critical patent/CN113596164A/en
Publication of CN113596164A publication Critical patent/CN113596164A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present disclosure provides a data access method, which can be applied to the financial field or other fields. The method is applied to a gateway and comprises the steps of receiving a first access request sent by a first type of terminal equipment; requesting data resources from M interfaces of a back-end service based on the first access request and forwarding configuration information of the access request of the gateway to the first type terminal equipment so as to acquire M data resources; wherein M is an integer greater than 1; processing the M data resources into first response data; feeding back the first response data to the first type of terminal equipment; the backend service is a service platform developed for a second type of terminal equipment, and the types of the first type of terminal equipment and the second type of terminal equipment are different. The present disclosure also provides a data access apparatus, system, device, storage medium and program product.

Description

Data access method, device, system, equipment and medium
Technical Field
The present disclosure relates to the field of internet technology, which may be used in the financial field or other fields, and more particularly, to a data access method, apparatus, system, device, medium, and program product.
Background
With the advancement of internet technology, new types of terminal devices are emerging continuously, and the upgrading of the backend that provides services to the terminal may be relatively delayed compared to the terminal, and may be much more complex and costly. For example, mobile internet is becoming more and more popular, and more netizens can use mobile terminals to surf the internet frequently. The development and operation of applications on mobile terminals is much different from the development and operation of applications on computer terminals. This results in a problem of performance mismatch due to a large number of interface multiplexing and complex calls when back-end services developed for computer terminals are multiplexed. If a set of backend services for the mobile terminal needs to be developed again, the cost is very high.
Disclosure of Invention
In view of the above, the present disclosure provides a data access method, apparatus, device, medium, and program product capable of improving data access performance when reusing an existing backend service.
In a first aspect of the embodiments of the present disclosure, a data access method is provided, which is applied to a gateway. The method comprises the following steps: receiving a first access request sent by a first type of terminal equipment; requesting data resources from M interfaces of a back-end service based on the first access request and forwarding configuration information of the access request of the gateway to the first type terminal equipment to acquire M data resources, wherein M is an integer greater than 1; processing the M data resources into first response data; and feeding back the first response data to the first type of terminal equipment. The backend service is a service platform developed for a second type of terminal equipment, and the types of the first type of terminal equipment and the second type of terminal equipment are different.
According to an embodiment of the present disclosure, the different types of the first type terminal device and the second type terminal device include: and the second type of terminal equipment and the first type of terminal equipment have different user use modes.
According to the embodiment of the disclosure, the first type of terminal device is a mobile terminal, and the second type of terminal device is a personal computer.
According to an embodiment of the present disclosure, the processing the M data resources into first response data includes: and according to the format of the response data of the first-class terminal equipment, reducing or combining each field in the M data resources to obtain the first response data.
According to an embodiment of the present disclosure, the method further comprises: configuring the forwarding configuration information in the gateway, where the forwarding configuration information includes a correspondence between each interface in the gateway and at least one interface of the backend service, where each interface in the gateway is called by the first type terminal device through a network address in an access request. Wherein a first interface in the gateway called by the first access request corresponds to the M interfaces of the backend service.
According to an embodiment of the present disclosure, the requesting, from M interfaces of a backend service, data resources based on the first access request and forwarding configuration information of the access request of the gateway to the first class terminal device to obtain M data resources includes: calling the first interface in the gateway based on the network address of the first access request; determining the M interfaces in the backend service corresponding to the first interface based on the forwarding configuration information; and requesting data from the M interfaces to obtain the M data.
According to an embodiment of the present disclosure, there is a logical order between the M interfaces; said configuring said forwarding configuration information in said gateway comprises: and in the corresponding relation between the first interface and the M interfaces, arranging and configuring the M interfaces according to the logic sequence.
According to an embodiment of the present disclosure, the requesting data resources from the M interfaces of the backend service includes: and sequentially requesting data from the M interfaces according to the logic sequence.
According to an embodiment of the present disclosure, the method further comprises: and updating the forwarding configuration information in real time based on the updating operation of the user on the forwarding configuration information.
In a second aspect of the embodiments of the present disclosure, a data access apparatus is provided in a gateway. The device comprises a route forwarding module and a query aggregation module, wherein the route forwarding module comprises a receiving module, a calling module and a sending module. The receiving module is used for receiving a first access request sent by a first type of terminal equipment. The calling module is used for requesting data resources from M interfaces of a back-end service based on the first access request and forwarding configuration information of the access request of the gateway to the first type of terminal equipment so as to acquire M data resources; wherein M is an integer greater than 1; the backend service is a service platform developed for a second type of terminal equipment, and the types of the first type of terminal equipment and the second type of terminal equipment are different. The query aggregation module is used for processing the M data resources into first response data. The sending module is used for feeding back the first response data to the first class of terminal equipment.
According to an embodiment of the present disclosure, the apparatus further includes a background configuration module. The background configuration module is configured to configure the forwarding configuration information in the gateway, where the forwarding configuration information includes a correspondence between each interface in the gateway and at least one interface of the backend service, where each interface in the gateway is called by the first type of terminal device through a network address in an access request; wherein a first interface in the gateway called by the first access request corresponds to the M interfaces of the backend service.
According to an embodiment of the present disclosure, the background configuration module is further configured to, in a case that there is a logic order among the M interfaces, perform arranging configuration on the M interfaces according to the logic order in a correspondence relationship between the first interface and the M interfaces.
According to the embodiment of the present disclosure, the background configuration module is further configured to update the forwarding configuration information in real time based on an update operation of the user on the forwarding configuration information.
In a third aspect of the disclosed embodiments, a data access system is provided. The system comprises a first type of terminal equipment, a second type of terminal equipment, a back-end service and a gateway. The back-end service is a service platform developed for the second type of terminal equipment. The second type of terminal equipment is different from the first type of terminal equipment in type. The gateway is configured to forward information between the backend service and the first class of terminal device, and includes: receiving a first access request sent by a first type of terminal equipment; requesting data resources from M interfaces of a back-end service based on the first access request and forwarding configuration information of the access request of the gateway to the first type terminal equipment so as to acquire M data resources; wherein M is an integer greater than 1; processing the M data resources into first response data; and feeding back the first response data to the first type of terminal equipment.
In a fourth aspect of the disclosed embodiments, an electronic device is provided. The electronic device includes one or more processors, and one or more memories. The one or more memories are for storing one or more programs. Wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method as described above.
In a fifth aspect of the disclosure, a computer-readable storage medium is provided, having executable instructions stored thereon, which when executed by a processor, cause the processor to perform the above-mentioned method.
A sixth aspect of the disclosure provides a computer program product comprising a computer program which, when executed by a processor, implements the above method.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following description of embodiments of the disclosure, which proceeds with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a data access method, apparatus, system, device, medium, and program product according to embodiments of the disclosure;
FIG. 2 schematically illustrates a system architecture diagram of a data access method according to an embodiment of the present disclosure;
FIG. 3 schematically shows a flow chart of a data access method according to an embodiment of the present disclosure;
FIG. 4 is a flow diagram schematically illustrating an interface of a gateway calling a backend service in a data access method according to an embodiment of the present disclosure;
FIG. 5 schematically shows a flow diagram of a data access method according to another embodiment of the present disclosure;
FIG. 6 schematically illustrates a flow diagram of a data access method according to yet another embodiment of the present disclosure;
FIG. 7 schematically shows a block diagram of a data access device according to an embodiment of the present disclosure; and
fig. 8 schematically shows a block diagram of an electronic device adapted to implement a data access method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In this document, it is to be understood that any number of elements in the specification and drawings is to be considered exemplary rather than limiting, and that any nomenclature (e.g., first, second) is used for distinction only, and not in any limiting sense.
Embodiments of the present disclosure provide a data access method, apparatus, system, device, medium, and program product. The data access method can be applied to a gateway, and the gateway can be used for information forwarding between a first type of terminal equipment and a back-end service, wherein the back-end service is a service platform developed for a second type of terminal equipment, and the types of the first type of terminal equipment and the second type of terminal equipment are different. The data access method can include the steps of firstly receiving a first access request sent by a first type of terminal equipment, then requesting data resources from M interfaces served by a back end based on the first access request and forwarding configuration information of the access request of a gateway to the first type of terminal equipment to obtain M data resources, then processing the M data resources into first response data, and finally feeding the first response data back to the first type of terminal equipment.
According to the embodiment of the disclosure, the first type terminal device and the second type terminal device can acquire data by using a set of backend services. And when the first-class terminal equipment is communicated with the back-end service, through forwarding configuration in the gateway, a plurality of resource data can be acquired from the back-end service at one time through one-time request, and in this way, the network connection and calling times of the first-class terminal equipment can be reduced by aggregating the plurality of resource data, so that the request efficiency is improved, and the compatibility and the expansibility of the existing back-end service to the first-class terminal equipment are enhanced.
According to various embodiments of the present disclosure, the types of the first type terminal device and the second type terminal device are different. For example, the two users use different modes, or different operating systems, or different request response speeds, etc.
In one embodiment, the first type of terminal device may be, for example, a mobile terminal, and the corresponding second type of terminal device may be a personal computer. The mobile terminal and the personal computer have different user using modes, so that the user experience and the requirement on the timeliness and the like of data display are different.
For example, a personal computer is typically used by a user in the office, while a mobile terminal is typically used by a user during leisure or fragmented time. Thus, multiple pages in a web site in a personal computer may be requested separately and presented separately and individually in the personal computer, in which case the user has relatively sufficient patience to wait for the loading and presentation of the pages. On the mobile terminal, if the user needs to repeatedly request data to the backend service like a personal computer every time when switching pages after logging in a website, the user feels that waiting time is long when switching one page, and the user experience is reduced. It follows that the user is more sensitive to response time when using a mobile terminal than when using a personal computer, thereby requiring a more timely presentation of data from applications on the mobile terminal.
However, due to the relatively early rise and development of personal computers, enterprises often develop corresponding backend services for the personal computer. When an enterprise develops an application program of the mobile terminal, the problem of redeveloping the backend service or upgrading and reconstructing the existing backend service is faced. Moreover, if the existing back-end service is reused, a large number of complicated calls are generated inevitably, and the performance requirements of the mobile terminal are often difficult to meet.
In view of this, according to the method, the apparatus, the system, the device, the medium, and the program product provided by the embodiments of the present disclosure, when an enterprise develops an application program of a mobile terminal, for some requests of the mobile terminal, a plurality of data may be acquired from a backend service through one request, through configuration of the gateway 103, so that on one hand, the number of times of calling the backend service by the mobile terminal is reduced, and after the mobile terminal acquires the data at one time, the data may be quickly displayed to a user through a display control technology on the mobile terminal, thereby improving user experience. Therefore, the back-end service is not required to be developed independently, the existing back-end service is not required to be modified, the request frequency of the mobile terminal can be reduced, and the experience of a user in using the mobile terminal is improved.
For example, according to the embodiment of the present disclosure, for a commodity page (which may include a commodity home page, a detail page, an evaluation information page, and the like, for example), when a user opens the commodity page through a personal computer, information of the corresponding page may be presented through a browser each time according to a request of the personal computer. When the user opens the commodity page through the mobile terminal, data including the commodity page, the detail page, the evaluation information page and the like can be fed back to the mobile terminal at one time, then the commodity page can be displayed to the user at the initial time through the display technology of the mobile terminal, and the contents of the detail page, the evaluation information page and the like can be rapidly displayed to the user when the display contents of the user are switched. Therefore, compared with a personal computer, the mobile terminal can be realized through one-time network connection request when acquiring the commodity page, the time for establishing connection with the back-end service can be reduced, and the access efficiency and the access timeliness can be improved.
The concepts and applications of the embodiments of the present disclosure are exemplarily described above in terms that the first type of terminal device may be, for example, a mobile terminal, and the corresponding second type of terminal device may be a personal computer, so as to help those skilled in the art have a perceptual knowledge of the present solution. It is understood that the above examples are illustrative only, and the disclosed embodiments are not limited to mobile terminals and personal computers.
It should be noted that the data access method, apparatus, system, device, medium, and program product defined in the embodiments of the present disclosure may be used in the financial field (for example, in the application of internet finance), and may also be used in any field other than the financial field, and the present disclosure does not limit the application field.
Fig. 1 schematically illustrates an application scenario diagram of a data access method, apparatus, system, device, medium, and program product according to embodiments of the disclosure. It should be noted that fig. 1 is only an example of an application scenario in which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, but does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the application scenario 100 according to this embodiment may include a first type terminal device 101, a second type terminal device 102, a gateway 103, and a backend service 104. The first type of terminal device 101 is different from the second type of terminal device 102. For example, in the application scenario 100, the first-class terminal device 101 is exemplified as a mobile terminal (e.g., a smartphone, or Ipad), and the second-class terminal device 102 is exemplified as a personal computer.
The backend service 104 is a service system developed for the second type of terminal device 102. In the application scenario 100, the communication between the second type terminal device 102 and the backend service 104 is simplified, and in an actual application, the communication between the second type terminal device 102 and the backend service 104 may be performed by any method known in the art.
The gateway 103 is configured to forward information between the first terminal device 101 and the backend service 104, so that the first terminal device 101 can communicate with the backend service 104.
Fig. 2 schematically shows a system architecture diagram of a data access method according to an embodiment of the present disclosure.
With reference to fig. 1 and fig. 2, the system architecture illustrates a process in which a user uses a first type terminal device 101 to access a backend service 104 through a gateway 103.
According to one embodiment of the present disclosure, the URL of the interface (e.g., a to J) of the gateway 103 may be exposed to the first type terminal device 101, so that the first type terminal device 101 may access the interface in the gateway 103 through the network address in the access request.
Forwarding configuration information may be configured in the gateway 103 for each interface in a-J. The forwarding configuration information may define a corresponding relationship between each interface in the gateway 103 and at least one interface in the interfaces (a, b.. i.... for.) in the backend service 104, so that when the first type terminal device 101 calls one of the interfaces a to J through an access request, the gateway 103 may obtain data from at least one interface in the backend service 104 according to the forwarding configuration information and then feed back the data to the first type terminal device 101. The correspondence relationship may be one-to-one or one-to-many. When one interface in the gateway 103 corresponds to multiple interfaces of the backend service 104, the gateway 103 may aggregate data obtained from the multiple interfaces of the backend service 104 into one response data, and then feed the response data back to the terminal device 101.
Specifically, when the application in the first type terminal device 101 sends an access request, the access request may uniformly pass through the gateway 103, and the request may be securely encrypted in the gateway 103 and forwarded to the corresponding interface of the backend service 104 through the configured route. The gateway 103 may query and collate a plurality of interface data of the backend service 104 according to the configuration, and return the aggregated result to the first type of terminal device 101, so that the backend service 104 has a mobile service capability. In this process, it is not necessary to expose the interface of the backend service 104 to the first type of terminal device 101, and the backend service 104 is not required to be modified according to the access logic of the first type of terminal device 101, so that the backend service 104 can support the first type of terminal device 101.
Therefore, the backend service 104 can provide services to the first type terminal device 101 and the second type terminal device 102 at the same time, and a scheme that a set of backend supports applications of multiple sets of terminal devices is realized. Therefore, for the change of terminal equipment or the change of user requirements caused by market revolution, new service requirements can be met through the configuration of the gateway 103 under the condition of not changing the backend service 104, so that enterprises can respond to the technical change or the requirement change of the market more actively and flexibly.
It should be noted that the data access method provided by the embodiment of the present disclosure may be generally executed by the gateway 103. Accordingly, the data access apparatus, device, medium, and program provided by the embodiments of the present disclosure may be generally provided in the gateway 103.
It should be understood that the number and type of terminal devices, gateways, servers, and interfaces in fig. 1 and 2 are merely illustrative. There may be any number and variety of terminal devices, networks, gateways, servers, interfaces, etc., as desired for an implementation.
The data access method of the disclosed embodiment will be described in detail below with fig. 3 to 6 based on the application scenario 00 of fig. 1.
Fig. 3 schematically shows a flow chart of a data access method according to an embodiment of the present disclosure.
As shown in fig. 3, the data access method according to the embodiment may include operations S310 to S340.
First, in operation S310, a first access request transmitted by the first type terminal apparatus 101 is received.
Then, in operation S320, based on the first access request and forwarding configuration information of the access request of the gateway 103 to the first class terminal device 101, data resources are requested from M interfaces of the backend service 104 to obtain M data resources. Wherein M is an integer greater than 1. The backend service 104 is a service platform developed for the second type of terminal device 102, and the types of the first type of terminal device 101 and the second type of terminal device 102 are different.
For example, a first interface of the gateway 103 may be called according to the network address in the first access request, and then data is acquired from M interfaces of the backend service 104 according to M interfaces corresponding to the first interface in the forwarding configuration information. One specific implementation can be seen in the schematic of fig. 4.
Fig. 4 schematically shows a flowchart of an interface of the gateway calling the backend service in operation S320 in the data access method according to the embodiment of the present disclosure.
As shown in fig. 4, operation S320 may include operations S321 to S323 according to an embodiment of the present disclosure.
In operation S321, a first interface in the gateway 103 is called based on the network address of the first access request. For example, the first access request may include a network address URL by which to locate the first interface.
Next, in operation S322, based on the forwarding configuration information, M interfaces in the backend service 104 corresponding to the first interface are determined. In some embodiments, the network address URL is processed in the first access request, and may further include suffix information, which may be, for example, information of the requested data resource, or the like. After determining the first interface, the M interfaces may be matched from the forwarding configuration information by the suffix information.
Thereafter, in operation S323, data is requested from the M interfaces to obtain M data.
With continued reference to fig. 3. After obtaining the M data, next, in operation S330, the M data resources are processed as first response data. For example, each field in the M data resources may be reduced or combined according to the format of the response data of the first type terminal device 101, so as to obtain the first response data. For example, the M data resources are data resources set for the computer terminal, and when the mobile terminal requests the data, the data in the same field of the M data resources may be merged according to the data layout, data field and format of the mobile terminal, and some fields that may not be needed for the mobile terminal may be deleted.
Next, in operation S340, the first response data is fed back to the first type terminal device 101. Thereby enabling the first type terminal device 101 to access the backend service 104.
In this way, the gateway 103 can be used as a large traffic gate between the first-class terminal device 101 and the backend service 104, and by aggregating a plurality of interface query services of the backend service 104, network connection times and access times of the first-class terminal device 101 and the backend service 104 are reduced, so that the request efficiency of the first-class terminal device 101 is improved, and the compatibility and the expansibility of the existing backend service 104 to the first-class terminal device 101 are enhanced.
By shielding and converting the data access difference between the first-class terminal device 101 and the backend service 104 through the gateway 103, the development efficiency of the first-class terminal device 101 can be simplified, and the backend service 104 can be multiplexed. Moreover, the data messages of the backend service 104 can be deleted by configuration for the first type of terminal device 101, thereby reducing the workload and maintenance cost of developers.
Fig. 5 schematically shows a flow chart of a data access method according to another embodiment of the present disclosure.
As shown in fig. 5, the data access method according to the embodiment of the present disclosure may further include operation S510 before operations S310 to S340. Still further, in other embodiments, after operation S510 and before operation S310, operation S520 may be further included.
Specifically, in operation S510, forwarding configuration information is configured in the gateway 103, where the forwarding configuration information includes a correspondence between each interface in the gateway 103 and at least one interface of the backend service 104, where each interface in the gateway 103 is called by the first type terminal device 101 through the network address in the access request. Wherein, the first interface in the gateway 103 called by the first access request corresponds to M interfaces of the backend service 104.
Next, when the first type terminal device 101 sends the first access request, the backend service 104 may be accessed through the gateway 103 through operations S310 to S340.
In other embodiments, after the configuration of the forwarding configuration information is performed in operation S510, if the forwarding configuration information needs to be modified (for example, the forwarding configuration information needs to be added, deleted, or modified due to a change in service requirement), the configuration may be implemented in real time through operation S520.
Specifically, in operation S520, the forwarding configuration information is updated in real time based on an update operation of the forwarding configuration information by the user. For example, in one embodiment, after the forwarding configuration information is saved and released, the forwarding configuration information may be validated at millisecond level and may be used without restarting the gateway 103, thereby implementing dynamic configuration.
Therefore, if the first type terminal device 101 sends the first access request after operation S520, forwarding of the access request, aggregation of backend data, and feedback of response data may be implemented based on the updated forwarding configuration information in S310 to S340.
According to the embodiment of the disclosure, the forwarding configuration information can be configured and changed by using a visual interface, the operation is simple and convenient, the forwarding configuration information takes effect in real time, and the availability and the durability of the system are improved.
FIG. 6 schematically shows a flow diagram of a data access method according to yet another embodiment of the present disclosure.
As shown in fig. 6, the data access method according to this embodiment may include operations S601 to S607.
In operation S601, a corresponding relationship between the first interface and the M interfaces is configured in the forwarding configuration information of the gateway 103, wherein when a logic sequence exists between the M interfaces, the M interfaces are arranged and configured according to the logic sequence of the M interfaces.
Next, when the first type terminal apparatus 101 transmits the first access request, first, in operation S602, the first access request transmitted by the first type terminal apparatus 101 is received.
Then, in operation S603, a first interface in the gateway 103 is called based on the network address of the first access request.
Next, in operation S604, M interfaces in the backend service 104 corresponding to the first interface are determined based on the forwarding configuration information.
Then, data is sequentially requested from the M interfaces in logical order in operation S605.
Next, in operation S606, the M data resources are processed as first response data. Reference may be specifically made to the description related to operation S330, which is not described herein again.
Then, in operation S607, the first response data is fed back to the first type terminal apparatus 101. Therefore, by one-time access of the first-class terminal device 101, a plurality of access data can be acquired from the backend service 104, the access frequency of the first-class terminal device 101 is reduced, and the access efficiency of the first-class terminal device 101 is improved.
Based on the data access method of each embodiment, the embodiment of the disclosure further provides a data access device. A data access device according to an embodiment of the present disclosure will be described in detail below with reference to fig. 7.
Fig. 7 schematically shows a block diagram of a data access device 700 according to an embodiment of the present disclosure.
As shown in fig. 7, according to an embodiment of the present disclosure, the data access device 700 is disposed at the gateway 103, and may include a route forwarding module 710, a query aggregation module 720, and a background configuration module 730. The apparatus 700 may be used to implement the methods described with reference to fig. 3-6.
The route forwarding module 710 is mainly responsible for basic communication configuration and traffic forwarding between the first type terminal device 101 and the backend service 104. Specifically, after receiving the first access request sent by the first type of terminal device 101, the route forwarding module 710 dynamically processes the request packet and sends the processed data to the backend service 104 according to the obtained forwarding configuration information, the backend service 104 receives the request and then processes the data and returns the data, and then the route forwarding module 710 performs operations such as adaptation and packet processing on the response packet and returns the response packet to the first type of terminal device 101.
The route forwarding module 710 may include a receiving module 711, a calling module 712, and a sending module 713.
Specifically, the receiving module 711 may perform operation S310 or operation S602, for example, for receiving the first access request sent by the first type terminal device 101.
The invoking module 712 may perform operation S320 or operations S603 to S605, for example, to request data resources from M interfaces of the backend service 104 based on the first access request and forwarding configuration information of the access request of the gateway 103 to the first class terminal device 101, so as to obtain M data resources; wherein M is an integer greater than 1; the backend service 104 is a service platform developed for the second type of terminal device 102, and the types of the first type of terminal device 101 and the second type of terminal device 102 are different.
The sending module 713 may execute operation S340 or operation S607, for example, and is configured to feed back the first response data aggregated by the query aggregating module 720 to the first class terminal device 101.
The query aggregation module 720 may aggregate and sort the data acquired from the multiple interfaces of the backend service 104 according to the interface correspondence in the forwarding configuration information, and then return the aggregated data to the route forwarding module 710 and return the aggregated data to the first type terminal device 101 through a single route, thereby reducing the network resource consumption and the request times between the first type terminal device 101 and the gateway 103.
Specifically, the query aggregating module 720 may perform operation S330 or operation S606, for example, for processing the M data resources as the first response data. For example, the M data resources are aggregated and sorted into a large result data, and the result data is returned to the first-class terminal device 101, where the message fields of the M data resources may be reduced and merged according to the format requirement of the first-class terminal device 101 for the response data, so as to reduce the number of requests of the first-class terminal device 101 for the backend service 104, reduce the data size of the response message, improve the response speed of the first-class terminal device 101, and improve the user experience.
The background configuration module 730 can provide configuration support for the route forwarding module 710 and the query aggregation module 720, provide an operation interface for an administrator, modify configuration information according to environmental changes and operations of the administrator, and persist forwarding configuration information and basic data used by the gateway 103.
Specifically, the background configuration module 730 may perform operation S510, for example, to configure forwarding configuration information in the gateway 103, where the forwarding configuration information includes a correspondence between each interface in the gateway 103 and at least one interface of the backend service 104, where each interface in the gateway 103 is called by the first type terminal device 101 through a network address in the access request; the first interface in the gateway 103 called by the first access request corresponds to M interfaces of the backend service 104.
According to some embodiments of the present disclosure, the background configuration module 730 may further perform operation S601, for example, to perform arranging configuration on the M interfaces according to a logical order in a correspondence relationship between the first interface and the M interfaces in a case that there is a logical order among the M interfaces.
According to some embodiments of the present disclosure, the background configuration module 730 may further perform operation S520, for example, to update the forwarding configuration information in real time based on an update operation of the forwarding configuration information by the user.
The background configuration module 730 may provide functions such as data configuration and parameter modification for the route forwarding module 710 and the query aggregation module 720 in a visual manner. For example, the background configuration module 730 may provide a configurable user interface to the route forwarding module 710 and the query aggregation module 720, receive configuration operations of a manager, process information, store the processed information in a database, and then provide the processed information to the route forwarding module 710 and the query aggregation module 720 for access when the gateway 103 runs. In one embodiment, after the configuration information is stored and released by the background configuration module 730, the configuration information can be validated at millisecond level, and the new configuration can be used for routing forwarding, query aggregation and the like without restarting the gateway 103, thereby realizing flexible dynamic configuration capability.
According to an embodiment of the present disclosure, any multiple modules of the route forwarding module 710, the query aggregation module 720, and the background configuration module 730 may be combined and implemented in one module, or any one of the modules may be split into multiple modules (for example, the route forwarding module 710 may be split into three modules, i.e., a receiving module 711, a calling module 712, and a sending module 713, which are only examples). Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the route forwarding module 710, the query aggregation module 720, and the background configuration module 730 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or in any one of three implementations of software, hardware, and firmware, or in any suitable combination of any of them. Alternatively, at least one of the route forwarding module 710, the query aggregation module 720, and the background configuration module 730 may be implemented at least in part as a computer program module that, when executed, may perform corresponding functions.
Fig. 8 schematically shows a block diagram of an electronic device 800 adapted to implement a data access method according to an embodiment of the present disclosure. The electronic device 800 may be disposed in the gateway 103.
As shown in fig. 8, an electronic device 800 according to an embodiment of the present disclosure includes a processor 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. The processor 801 may include, for example, a general purpose microprocessor (e.g., CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., Application Specific Integrated Circuit (ASIC)), among others. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flows according to embodiments of the present disclosure.
In the RAM 803, various programs and data necessary for the operation of the electronic apparatus 800 are stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. The processor 801 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 802 and/or RAM 803. Note that the programs may also be stored in one or more memories other than the ROM 802 and RAM 803. The processor 801 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 800 may also include input/output (I/O) interface 805, input/output (I/O) interface 805 also connected to bus 804, according to an embodiment of the present disclosure. Electronic device 800 may also include one or more of the following components connected to I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 802 and/or RAM 803 described above and/or one or more memories other than the ROM 802 and RAM 803.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flow chart. When the computer program product runs in a computer system, the program code is used for causing the computer system to realize the method provided by the embodiment of the disclosure.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 801. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted in the form of a signal on a network medium, distributed, downloaded and installed via communication section 809, and/or installed from removable media 811. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program, when executed by the processor 801, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (13)

1. A data access method is applied to a gateway and comprises the following steps:
receiving a first access request sent by a first type of terminal equipment;
requesting data resources from M interfaces of a back-end service based on the first access request and forwarding configuration information of the access request of the gateway to the first type terminal equipment so as to acquire M data resources; wherein M is an integer greater than 1;
processing the M data resources into first response data; and
feeding back the first response data to the first type of terminal equipment;
wherein the content of the first and second substances,
the back-end service is a service platform developed for a second type of terminal equipment, and the types of the first type of terminal equipment and the second type of terminal equipment are different.
2. The method of claim 1, wherein the first class of terminal devices and the second class of terminal devices are of different types comprising: and the second type of terminal equipment and the first type of terminal equipment have different user use modes.
3. The method according to claim 1 or 2, wherein the first type of terminal device is a mobile terminal and the second type of terminal device is a personal computer.
4. The method of claim 1, wherein said processing said M data resources into first response data comprises:
and according to the format of the response data of the first-class terminal equipment, reducing or combining each field in the M data resources to obtain the first response data.
5. The method of claim 1, wherein the method further comprises:
configuring the forwarding configuration information in the gateway, where the forwarding configuration information includes a correspondence between each interface in the gateway and at least one interface of the backend service, where each interface in the gateway is called by the first type terminal device through a network address in an access request;
wherein the content of the first and second substances,
and a first interface in the gateway called by the first access request corresponds to the M interfaces of the backend service.
6. The method of claim 5, wherein the requesting data resources from M interfaces of a backend service to obtain M data resources based on the first access request and forwarding configuration information of the access request of the gateway to the first class of terminal devices comprises:
calling the first interface in the gateway based on the network address of the first access request;
determining the M interfaces in the backend service corresponding to the first interface based on the forwarding configuration information; and
requesting data from the M interfaces to obtain the M data.
7. The method of claim 5, wherein the M interfaces have a logical order therebetween; said configuring said forwarding configuration information in said gateway comprises:
and in the corresponding relation between the first interface and the M interfaces, arranging and configuring the M interfaces according to the logic sequence.
8. The method of claim 7, wherein the requesting data resources from the M interfaces of the back-end service comprises:
and sequentially requesting data from the M interfaces according to the logic sequence.
9. The method of claim 5, wherein the method further comprises:
and updating the forwarding configuration information in real time based on the updating operation of the user on the forwarding configuration information.
10. A data access device is arranged in a gateway, wherein the device comprises a route forwarding module and a query aggregation module, and the route forwarding module comprises a receiving module, a calling module and a sending module; wherein the content of the first and second substances,
the receiving module is used for receiving a first access request sent by a first type of terminal equipment;
the calling module is used for requesting data resources from M interfaces of a back-end service based on the first access request and forwarding configuration information of the access request of the gateway to the first type of terminal equipment so as to acquire M data resources; wherein M is an integer greater than 1; the back-end service is a service platform developed for a second type of terminal equipment, and the types of the first type of terminal equipment and the second type of terminal equipment are different;
the query aggregation module is used for processing the M data resources into first response data; and
and the sending module is used for feeding back the first response data to the first class of terminal equipment.
11. A data access system, comprising:
a first type of terminal device;
the second type of terminal equipment is different from the first type of terminal equipment in type;
the back-end service is a service platform developed aiming at the second type of terminal equipment;
the gateway is used for forwarding information between the first-class terminal equipment and the backend service, and comprises:
receiving a first access request sent by a first type of terminal equipment;
requesting data resources from M interfaces of a back-end service based on the first access request and forwarding configuration information of the access request of the gateway to the first type terminal equipment so as to acquire M data resources; wherein M is an integer greater than 1;
processing the M data resources into first response data; and
and feeding back the first response data to the first type of terminal equipment.
12. An electronic device, comprising:
one or more processors;
one or more memories for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-9.
13. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 9.
CN202110878225.7A 2021-07-30 2021-07-30 Data access method, device, system, equipment and medium Pending CN113596164A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110878225.7A CN113596164A (en) 2021-07-30 2021-07-30 Data access method, device, system, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110878225.7A CN113596164A (en) 2021-07-30 2021-07-30 Data access method, device, system, equipment and medium

Publications (1)

Publication Number Publication Date
CN113596164A true CN113596164A (en) 2021-11-02

Family

ID=78253513

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110878225.7A Pending CN113596164A (en) 2021-07-30 2021-07-30 Data access method, device, system, equipment and medium

Country Status (1)

Country Link
CN (1) CN113596164A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114885010A (en) * 2022-06-06 2022-08-09 中国工商银行股份有限公司 Request response method, device, equipment and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114885010A (en) * 2022-06-06 2022-08-09 中国工商银行股份有限公司 Request response method, device, equipment and medium
CN114885010B (en) * 2022-06-06 2024-01-05 中国工商银行股份有限公司 Request response method, device, equipment and medium

Similar Documents

Publication Publication Date Title
US11144711B2 (en) Webpage rendering method, device, electronic apparatus and storage medium
CN109542427B (en) System customization method and device, electronic equipment and storage medium
CN112449750A (en) Log data collection method, log data collection device, storage medium, and log data collection system
CN108684205B (en) Method and system for processing digital components
CN110888696A (en) Page display method and system, computer system and computer readable medium
CN110874227A (en) Shunting method and system for realizing gray scale release of API gateway and electronic equipment
CN112395027B (en) Widget interface generation method and device, storage medium and electronic equipment
US10915378B1 (en) Open discovery service
US11294651B2 (en) Code execution method, device, and rendering apparatus
CN114253734A (en) Resource calling method and device, electronic equipment and computer readable storage medium
CN107800779B (en) Method and system for optimizing load balance
US10740273B2 (en) Schema to ensure payload validity for communications on an asynchronous channel based bus
CN114237651A (en) Installation method and device of cloud native application, electronic equipment and medium
CN113596164A (en) Data access method, device, system, equipment and medium
CN116561013B (en) Testing method and device based on target service framework, electronic equipment and medium
CN110717992B (en) Method, apparatus, computer system and readable storage medium for scheduling model
CN110807535A (en) Construction method and construction device of unified reservation platform and unified reservation platform system
JP2022542203A (en) Mini-program batch processing method, device, electronic device and readable storage medium
CN112965916A (en) Page testing method, page testing device, electronic equipment and readable storage medium
JP2021068414A (en) Wrapping method, registration method, device, rendering device, and program
CN113535419A (en) Service arranging method and device
CN115080109A (en) Multi-cloud-end environment joint debugging method, device, system and equipment based on hybrid development
CN111753226A (en) Page loading method and device
CN113986258A (en) Service publishing method, device, equipment and storage medium
CN113656041A (en) Data processing method, device, equipment and storage medium

Legal Events

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