CN113569172A - Data interaction method and device and data service platform - Google Patents

Data interaction method and device and data service platform Download PDF

Info

Publication number
CN113569172A
CN113569172A CN202010359809.9A CN202010359809A CN113569172A CN 113569172 A CN113569172 A CN 113569172A CN 202010359809 A CN202010359809 A CN 202010359809A CN 113569172 A CN113569172 A CN 113569172A
Authority
CN
China
Prior art keywords
server
access request
service
middle layer
service access
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
CN202010359809.9A
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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network 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 Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202010359809.9A priority Critical patent/CN113569172A/en
Publication of CN113569172A publication Critical patent/CN113569172A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a data interaction method, a data interaction device and a data service platform, and relates to the technical field of network services. The data service platform comprises a front-end server, a middle-layer server and a rear-end server; the method is applied to a front-end server and comprises the following steps: receiving a service access request; the service access request comprises a middle layer interface identifier and a back-end service path; reading a middle layer interface identifier in the service access request; and according to the interface identifier of the middle layer, the service access request is transferred to a corresponding middle layer server. The embodiment of the invention alleviates the technical problem of high maintenance difficulty of the existing server.

Description

Data interaction method and device and data service platform
Technical Field
The present invention relates to the field of network service technologies, and in particular, to a data interaction method, an apparatus, and a data service platform.
Background
With the rapid development of the Internet (Internet), more and more websites are generated in the Internet for users to access and acquire information. Meanwhile, the amount of information carried by each website is increasing, and a website also contains more and more web pages, also called sub-pages of the website, and the number of servers used by the website is also increasing. Therefore, many websites currently use multiple servers, which can be divided into front-end servers and back-end servers according to usage. The front-end server is mainly used for interactive operation with a user and receiving an access instruction of the user, such as an instruction for accessing a certain sub-webpage; the back-end server is mainly used for extracting and calling data, for example, extracting a certain sub-web page, and displaying the sub-web page to a user through the front-end server.
At present, most of the development of the front-end server and the back-end server of the website are separated, and data interaction is performed between the front-end server and the back-end server through an Application Program Interface (API). However, as the interfaces of a large project or website are often hundreds, the interface configuration between the front-end server and the back-end server is very messy, and the technical problem of high server maintenance difficulty is caused.
Disclosure of Invention
The invention aims to provide a data interaction method, a data interaction device and a data service platform, so as to solve the technical problem that the existing server is high in maintenance difficulty.
In a first aspect, an embodiment of the present invention provides a data interaction method, which is applied to a front-end server in a data service platform, where the data service platform further includes a middle-layer server and a back-end server;
the method comprises the following steps:
receiving a service access request; the service access request comprises a middle layer interface identifier and a back-end service path;
reading a middle layer interface identifier in the service access request;
and according to the interface identifier of the middle layer, the service access request is transferred to a corresponding middle layer server.
In a possible implementation manner, the step of reading the middle layer interface identifier in the service access request includes:
reading a path field of the service access request;
and extracting the interface identification of the middle layer from the path field.
In one possible implementation, the front-end server is an Nginx server.
In a second aspect, an embodiment of the present invention further provides a data interaction method, which is applied to an intermediate server in a data service platform, where the data service platform further includes a front-end server and a back-end server;
the method comprises the following steps:
receiving a service access request from a front-end server; the service access request comprises a middle layer interface identifier and a back-end service path;
reading a back-end service path in the service access request;
and according to the back-end service path, the service access request is transferred to a corresponding back-end server.
In a possible implementation manner, the step of reading a backend service path in the service access request includes:
reading a path field of the service access request;
and extracting a back-end service path from the path field.
In one possible implementation, the middle tier server is an Nginx server.
In a third aspect, an embodiment of the present invention further provides a data interaction device, which is applied to a front-end server in a data service platform, where the data service platform further includes a middle-layer server and a back-end server;
the device comprises:
a receiving module for receiving a service access request; the service access request comprises a middle layer interface identifier and a back-end service path;
the reading module is used for reading the interface identifier of the middle layer in the service access request;
and the switching module is used for switching the service access request to a corresponding middle layer server according to the middle layer interface identifier.
In a fourth aspect, an embodiment of the present invention further provides a data interaction device, which is applied to an intermediate server in a data service platform, where the data service platform further includes a front-end server and a back-end server;
the device comprises:
the receiving module is used for receiving a service access request from a front-end server; the service access request comprises a middle layer interface identifier and a back-end service path;
the reading module is used for reading a back-end service path in the service access request;
and the switching module is used for switching the service access request to a corresponding back-end server according to the back-end service path.
In a fifth aspect, an embodiment of the present invention further provides a data service platform, including a front-end server, a middle-layer server, and a back-end server;
the front-end server is provided with the data interaction device of the third aspect;
the middle-layer server is provided with the data interaction device of the fourth aspect.
In a sixth aspect, the embodiments of the present invention also provide a computer-readable storage medium, which stores machine executable instructions, and when the computer executable instructions are called and executed by a processor, the computer executable instructions cause the processor to execute the method provided in the first aspect or the second aspect.
The data service platform provided by the embodiment of the invention comprises a front-end server, a middle-layer server and a rear-end server. The front-end server is used for interacting with a user and receiving a service access request input by the user; the back-end server is used for extracting and calling the service or data; and the middle layer server is mainly used for interface switching between the front-end server and the back-end server.
When the front-end server receives the service access request, the middle layer interface identifier can be read from the service access request, the middle layer interface identifier is uniquely corresponding to the middle layer server, namely each middle layer server has a uniquely corresponding middle layer interface identifier, and the front-end server can transfer the service access request to the corresponding middle layer server according to the middle layer interface identifier. The middle layer server can read a back-end service path from the service access request, and the back-end service path indicates the domain name of the back-end server, so that the middle layer server transfers the service access request to the corresponding back-end server and calls the service in the back-end server.
In the data service platform provided by the embodiment of the invention, the front-end server and the middle-layer server can be configured at one time only by the mutual connection of the middle-layer interface identifiers, and the front-end server and the middle-layer server do not need to be maintained when the service is changed later. The intermediate layer server and the back end server form a mapping relation through a back end service path, when a service is changed, for example, if a new service is added, only a new domain name needs to be registered in the back end server, and simultaneously a new interface is correspondingly registered in the intermediate layer server. Therefore, the data service platform provided by the embodiment of the invention can decouple the front-end server and the rear-end server, simplifies the difficulty of server maintenance, and solves the technical problem of high difficulty of the existing server maintenance.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a schematic diagram of a data service platform according to an embodiment of the present invention;
fig. 2 is a flowchart of a data interaction method applied to a front-end server according to an embodiment of the present invention;
FIG. 3 is a detailed flowchart of step S202 according to an embodiment of the present invention;
fig. 4 is a flowchart of a data interaction method applied to a middle-tier server according to an embodiment of the present invention;
FIG. 5 is a detailed flowchart of step S402 according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a data interaction apparatus applied to a front-end server according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a data interaction device applied to a middle-tier server according to an embodiment of the present invention;
fig. 8 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "comprising" and "having," and any variations thereof, as referred to in the embodiments of the present application, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
As the amount of information carried by each website is increasing, a website also contains more and more web pages, also called sub-pages of the website, and the number of servers used by the website is also increasing. Therefore, many websites currently use multiple servers, which can be divided into front-end servers and back-end servers according to usage. The front-end server is mainly used for interactive operation with a user and receiving an access instruction of the user, such as an instruction for accessing a certain sub-webpage; the back-end server is mainly used for extracting and calling data, for example, extracting a certain sub-web page, and displaying the sub-web page to a user through the front-end server.
At present, most of the development of the front-end server and the back-end server of the website are separated, and data interaction is performed between the front-end server and the back-end server through an Application Program Interface (API). However, as the interfaces of a large project or website are often hundreds, the interface configuration between the front-end server and the back-end server is very messy, and the technical problem of high server maintenance difficulty is caused.
The related art mainly includes the following two methods:
1. write full path in front-end server, e.g./api. ksyun. com/dsMgQuery/getList
2. An absolute path, e.g.,/dsMgQuery/getList, is written in the front-end server and then forwarded through the front-end server.
With the first approach, a large number of interfaces with domain names like// api. ksyun. com/dsMgQuery/getList appear on the web pages, which makes the servers in the later period difficult to maintain and may have a problem of cross-domain maintenance.
For the second approach, the// dsMgQuery/getList is forwarded through the front-end server, which results in many profiles for the front-end server, even hundreds for a large service or project, and the maintenance is more difficult than the first approach.
As shown in fig. 1, an embodiment of the present invention provides a data service platform, which includes a front-end server 101, a middle-tier server 102, and a back-end server 103. The front-end server 101 is used for interacting with a user and receiving a service access request input by the user; the back-end server 103 is used for extracting and calling services or data; the middle layer server 102 is mainly used for interface switching between the front end server 101 and the back end server 103.
The data service platform may be a website, such as the website of the mountains and clouds, with a domain name of www.ksyun.com. When the user accesses the website page or the sub-page of the website, the interaction of the data service is realized through the front-end server, the middle-layer server and the back-end server.
Correspondingly, the embodiment of the invention also provides a data interaction method which is applied to the front-end server in the data service platform.
As shown in fig. 2, the data interaction method includes the following steps:
s201: a service access request is received.
The service access request comprises a middle layer interface identifier and a back-end service path. The middle layer interface identifier is uniquely corresponding to the middle layer server, that is, each middle layer server has a uniquely corresponding middle layer interface identifier.
S202: and reading the middle layer interface identification in the service access request.
When the front-end server receives a service access request from a user, the middle layer interface identifier can be read from the service access request.
As shown in fig. 3, in a possible implementation manner, the step S202 may specifically include the following steps:
s2021: the path field of the service access request is read.
The path field is a segment of the field contained in the service access request, such as:
/i/dsMgQuery/getList
/i/dsMgMd/createList
/i/di/editeList
/i/dataMap/query
the above are all practical examples of path fields.
S2022: and extracting the interface identification of the middle layer from the path field.
The common point part/i/in the above four path fields is the middle layer interface identifier, which points to a unique middle layer server, for example, the address of the middle layer server pointed by the middle layer interface identifier/i/is i.api.ksyun.com.
The latter/dsMgQuery/getList,/dsMgMd/createList,/di/editielist,/dataMap/query belong to the back-end service path, the specific functions of which will be described in detail below.
S203: and according to the interface identifier of the middle layer, the service access request is transferred to the corresponding middle layer server.
Because the middle layer interface identifier and the middle layer server are in one-to-one correspondence, the front-end server can transfer the service access request to the corresponding middle layer server according to the middle layer interface identifier.
As a possible implementation manner, the front-end server in this embodiment employs an Nginx server. The Nginx (original name is engine x) is a high-performance HyperText Transfer Protocol (HTTP) and reverse proxy Web server, and is also a lightweight Web server, a reverse proxy server and an email proxy server, and is issued under the BSD-like Protocol. The Nginx has the characteristics of less occupied memory and strong concurrency capability, because the concurrency capability of the Nginx is well represented in the same type of web servers.
In addition, the middle-layer server and the back-end server in the data service platform provided by the embodiment of the invention can also adopt a Nginx server.
Correspondingly, the embodiment of the invention also provides a data interaction method which is applied to the middle layer server in the data service platform.
As shown in fig. 4, the data interaction method includes the following steps:
s401: a service access request is received from a front-end server.
Through the switching of the front-end server, the middle-layer server obtains a service access request from a user, and the service access request also comprises a middle-layer interface identifier and a back-end service path.
S402: and reading a back-end service path in the service access request.
When the middle layer server receives the service access request, the back-end service path can be read out from the service access request.
As shown in fig. 5, in a possible implementation manner, the step S402 may specifically include the following steps:
s4021: the path field of the service access request is read.
Referring to the above example, the path field includes the following
/i/dsMgQuery/getList
/i/dsMgMd/createList
/i/di/editeList
/i/dataMap/query。
S4022: the back-end service path is extracted from the path field.
In the above four path fields, except for the part of the interface id/i/of the middle layer,/dsMgQuery/getList,/dsMgMd/createList,/di/editielist,/dataMap/query are the respective back-end service paths and also the respective back-end service names. The corresponding back-end service paths are respectively
dsMgQuery.server.api.ksyun.com
dsMgMd.server.api.ksyun.com
di.server.api.ksyun.com
dataMap.server.api.ksyun.com。
S403: and according to the back-end service path, the service access request is transferred to the corresponding back-end server.
The back-end service path indicates the domain name of the back-end server corresponding to the service access request, so that the middle-layer server can transfer the service access request to the corresponding back-end server and call the service in the back-end server after reading the back-end service path from the service access request.
The data service platform provided by the embodiment of the invention comprises a front-end server, a middle-layer server and a rear-end server. The front-end server interacts with the user through the method described in the above steps S201 to S203, and receives the service access request input by the user. The middle layer server performs interface switching between the front end server and the back end server by the method described in the above steps S401 to S403. The back-end server is used for extracting and calling the service or data.
When the front-end server receives the service access request, the middle layer interface identifier can be read from the front-end server, because the middle layer interface identifier is uniquely corresponding to the middle layer server, namely, each middle layer server has a uniquely corresponding middle layer interface identifier, the front-end server can transfer the service access request to the corresponding middle layer server according to the middle layer interface identifier. Because the front-end server and the middle-layer server are only mutually linked through the middle-layer interface identifier, the front-end server and the middle-layer server can be configured at one time, and the maintenance is not needed when the service is changed later.
When the middle layer server receives the service access request from the front end server, the back end service path can be read from the service access request, and the back end service path indicates the domain name of the back end server, so that the middle layer server transfers the service access request to the corresponding back end server and calls the service in the back end server. Because the mapping relationship is formed between the middle layer server and the back end server through the back end service path, when a service is changed, for example, a new service is added, only a new domain name needs to be registered in the back end server, and simultaneously a new interface is correspondingly registered in the middle layer server.
Therefore, the data service platform provided by the embodiment of the invention can decouple the front-end server and the rear-end server, simplifies the difficulty of server maintenance, and solves the technical problem of high difficulty of the existing server maintenance.
The embodiment of the invention also provides a data interaction device which is applied to the front-end server in the data service platform.
As shown in fig. 6, the data interaction apparatus includes:
the receiving module 601 is configured to receive a service access request. The service access request comprises a middle layer interface identifier and a back-end service path.
A reading module 602, configured to read the middle layer interface identifier in the service access request.
The switching module 603 is configured to switch the service access request to the corresponding middle-tier server according to the middle-tier interface identifier.
Correspondingly, the embodiment of the invention also provides a data interaction device which is applied to the middle layer server in the data service platform.
As shown in fig. 7, the data interaction apparatus includes:
a receiving module 701, configured to receive a service access request from a front-end server. The service access request comprises a middle layer interface identifier and a back-end service path.
A reading module 702, configured to read a backend service path in the service access request.
The switching module 703 is configured to switch the service access request to a corresponding backend server according to the backend service path.
When the receiving module 601 of the front-end server receives the service access request, the reading module 602 can read the middle layer interface identifier from the service access request, and because the middle layer interface identifier is uniquely corresponding to the middle layer server, that is, each middle layer server has a uniquely corresponding middle layer interface identifier, the front-end server can forward the service access request to the corresponding middle layer server by the forwarding module 603 according to the middle layer interface identifier. Because the front-end server and the middle-layer server are only mutually linked through the middle-layer interface identifier, the front-end server and the middle-layer server can be configured at one time, and the maintenance is not needed when the service is changed later.
When the receiving module 701 of the middle layer server receives the service access request from the front end server, the reading module 702 can read a back end service path from the service access request, where the back end service path indicates the domain name of the back end server, so that the switching module 703 switches the service access request to the corresponding back end server according to the back end service path of the middle layer server, and invokes the service in the back end server. Because the mapping relationship is formed between the middle layer server and the back end server through the back end service path, when a service is changed, for example, a new service is added, only a new domain name needs to be registered in the back end server, and simultaneously a new interface is correspondingly registered in the middle layer server.
Therefore, the data service platform provided by the embodiment of the invention can decouple the front-end server and the rear-end server, simplifies the difficulty of server maintenance, and solves the technical problem of high difficulty of the existing server maintenance.
Because the data interaction device applied to the front-end server and the data interaction device applied to the middle-layer server provided by the embodiment of the invention have the corresponding technical characteristics with the data interaction method applied to the front-end server and the data interaction method applied to the middle-layer server provided by the embodiment of the invention, the same technical problems can be solved, and the same technical effects can be achieved.
As shown in fig. 8, an electronic device 800 provided in an embodiment of the present application includes a memory 801 and a processor 802, where the memory stores a computer program that is executable on the processor, and the processor executes the computer program to implement the steps of the method provided in the foregoing embodiment.
As shown in fig. 8, the electronic apparatus further includes: a bus 803 and a communication interface 804, the processor 802, the communication interface 804, and the memory 801 being connected by the bus 803; the processor 802 is used to execute executable modules, such as computer programs, stored in the memory 801.
The Memory 801 may include a high-speed Random Access Memory (RAM), and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 804 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used.
The bus 803 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 8, but that does not indicate only one bus or one type of bus.
The memory 801 is used for storing a program, and the processor 802 executes the program after receiving an execution instruction, and the method performed by the apparatus defined by the process disclosed in any of the foregoing embodiments of the present application may be applied to the processor 802, or implemented by the processor 802.
The processor 802 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 802. The Processor 802 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 801, and the processor 802 reads the information in the memory 801 and completes the steps of the method in combination with the hardware thereof.
Corresponding to the real-time data processing method, the embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium stores machine executable instructions, and when the computer executable instructions are called and executed by a processor, the computer executable instructions cause the processor to execute the steps of the real-time data processing method.
The real-time data processing device provided by the embodiment of the application can be specific hardware on the device, or software or firmware installed on the device, and the like. The device provided by the embodiment of the present application has the same implementation principle and technical effect as the foregoing method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the foregoing method embodiments where no part of the device embodiments is mentioned. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the foregoing systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. 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 and/or flowchart illustration, and combinations of blocks in the block diagrams and/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.
For another example, the division of the unit is only one division of logical functions, and there may be other divisions in actual implementation, and for another example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the real-time data processing method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the scope of the embodiments of the present application. Are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A data interaction method is characterized in that the method is applied to a front-end server in a data service platform, and the data service platform further comprises a middle-layer server and a back-end server;
the method comprises the following steps:
receiving a service access request; the service access request comprises a middle layer interface identifier and a back-end service path;
reading a middle layer interface identifier in the service access request;
and according to the interface identifier of the middle layer, the service access request is transferred to a corresponding middle layer server.
2. The method of claim 1, wherein the step of reading the mid-tier interface identifier in the service access request comprises:
reading a path field of the service access request;
and extracting the interface identification of the middle layer from the path field.
3. The method of claim 1, wherein the front-end server is an Nginx server.
4. A data interaction method is characterized in that the method is applied to a middle layer server in a data service platform, and the data service platform further comprises a front end server and a back end server;
the method comprises the following steps:
receiving a service access request from a front-end server; the service access request comprises a middle layer interface identifier and a back-end service path;
reading a back-end service path in the service access request;
and according to the back-end service path, the service access request is transferred to a corresponding back-end server.
5. The method of claim 4, wherein the step of reading the back-end service path in the service access request comprises:
reading a path field of the service access request;
and extracting a back-end service path from the path field.
6. The method of claim 4, wherein the middle tier server is an Nginx server.
7. A data interaction device is characterized in that the data interaction device is applied to a front-end server in a data service platform, and the data service platform further comprises a middle-layer server and a rear-end server;
the device comprises:
a receiving module for receiving a service access request; the service access request comprises a middle layer interface identifier and a back-end service path;
the reading module is used for reading the interface identifier of the middle layer in the service access request;
and the switching module is used for switching the service access request to a corresponding middle layer server according to the middle layer interface identifier.
8. A data interaction device is characterized in that the data interaction device is applied to a middle layer server in a data service platform, and the data service platform further comprises a front end server and a back end server;
the device comprises:
the receiving module is used for receiving a service access request from a front-end server; the service access request comprises a middle layer interface identifier and a back-end service path;
the reading module is used for reading a back-end service path in the service access request;
and the switching module is used for switching the service access request to a corresponding back-end server according to the back-end service path.
9. A data service platform is characterized by comprising a front-end server, a middle-layer server and a back-end server;
the front-end server is provided with the data interaction device of claim 7;
the middle layer server is provided with the data interaction device of claim 8.
10. A computer readable storage medium having stored thereon machine executable instructions which, when invoked and executed by a processor, cause the processor to execute the method of any of claims 1 to 6.
CN202010359809.9A 2020-04-29 2020-04-29 Data interaction method and device and data service platform Pending CN113569172A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010359809.9A CN113569172A (en) 2020-04-29 2020-04-29 Data interaction method and device and data service platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010359809.9A CN113569172A (en) 2020-04-29 2020-04-29 Data interaction method and device and data service platform

Publications (1)

Publication Number Publication Date
CN113569172A true CN113569172A (en) 2021-10-29

Family

ID=78158659

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010359809.9A Pending CN113569172A (en) 2020-04-29 2020-04-29 Data interaction method and device and data service platform

Country Status (1)

Country Link
CN (1) CN113569172A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105554133A (en) * 2015-12-21 2016-05-04 世纪龙信息网络有限责任公司 HTTP remote data access system and method
CN106961469A (en) * 2017-02-28 2017-07-18 北京致远互联软件股份有限公司 Unaware orientation Proxy Method and system based on http proxy servers
CN108153759A (en) * 2016-12-05 2018-06-12 中国移动通信集团公司 A kind of data transmission method of distributed data base, middle tier server and system
CN108881396A (en) * 2018-05-24 2018-11-23 平安普惠企业管理有限公司 Loading method, device, equipment and the computer storage medium of network data
CN108881448A (en) * 2018-06-27 2018-11-23 杭州贝购科技有限公司 The processing method and processing device of API request

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105554133A (en) * 2015-12-21 2016-05-04 世纪龙信息网络有限责任公司 HTTP remote data access system and method
CN108153759A (en) * 2016-12-05 2018-06-12 中国移动通信集团公司 A kind of data transmission method of distributed data base, middle tier server and system
CN106961469A (en) * 2017-02-28 2017-07-18 北京致远互联软件股份有限公司 Unaware orientation Proxy Method and system based on http proxy servers
CN108881396A (en) * 2018-05-24 2018-11-23 平安普惠企业管理有限公司 Loading method, device, equipment and the computer storage medium of network data
CN108881448A (en) * 2018-06-27 2018-11-23 杭州贝购科技有限公司 The processing method and processing device of API request

Similar Documents

Publication Publication Date Title
CN110086877B (en) Application program sharing and information sharing display method, device, equipment and medium
JP6626211B2 (en) Method and apparatus for processing short link and short link server
CN107798108B (en) Asynchronous task query method and device
CN107463641B (en) System and method for improving access to search results
US10511651B2 (en) Infinite micro-services architecture
CN104899220B (en) Application program recommendation method and system
CN105824830B (en) Method, client and equipment for displaying page
CN110807143B (en) Popularization resource determining method and device
CN110838071A (en) Policy data processing method and device and server
CN104980446A (en) Detection method and system for malicious behavior
CN104731869B (en) The page shows method and device
CN105808221A (en) Card type desktop realization method and apparatus
CN107800611B (en) Page switching method and page switching device
CN104216698A (en) Webpage registration method and relative device
CN111800520B (en) Service processing method and device, electronic equipment and readable storage medium
CN111225018A (en) Request message processing method and device and electronic equipment
CN112861031A (en) URL (Uniform resource locator) refreshing method, device and equipment in CDN (content delivery network) and CDN node
CN108108381B (en) Page monitoring method and device
CN113656737A (en) Webpage content display method and device, electronic equipment and storage medium
CN109032693A (en) Method and device for loading display information, electronic equipment and readable storage medium
CN111767481B (en) Access processing method, device, equipment and storage medium
CN106897297B (en) Method and device for determining access path between website columns
CN113569172A (en) Data interaction method and device and data service platform
CN111046308A (en) Page loading method and device
CN105589870B (en) Method and system for filtering webpage advertisements

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