CN113709187A - Multi-server data request method, device, equipment and storage medium - Google Patents

Multi-server data request method, device, equipment and storage medium Download PDF

Info

Publication number
CN113709187A
CN113709187A CN202111237367.1A CN202111237367A CN113709187A CN 113709187 A CN113709187 A CN 113709187A CN 202111237367 A CN202111237367 A CN 202111237367A CN 113709187 A CN113709187 A CN 113709187A
Authority
CN
China
Prior art keywords
preset
data
bff
target
data 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.)
Granted
Application number
CN202111237367.1A
Other languages
Chinese (zh)
Other versions
CN113709187B (en
Inventor
廖宏军
冯建设
刘小双
叶佩玉
陈军
花霖
张建宇
王春洲
朱瑜鑫
姚琪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Xinrun Fulian Digital Technology Co Ltd
Original Assignee
Shenzhen Xinrun Fulian Digital 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 Shenzhen Xinrun Fulian Digital Technology Co Ltd filed Critical Shenzhen Xinrun Fulian Digital Technology Co Ltd
Priority to CN202111237367.1A priority Critical patent/CN113709187B/en
Publication of CN113709187A publication Critical patent/CN113709187A/en
Application granted granted Critical
Publication of CN113709187B publication Critical patent/CN113709187B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/133Protocols for remote procedure calls [RPC]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • 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/56Provisioning of proxy services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (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)
  • Computer And Data Communications (AREA)

Abstract

The invention relates to the technical field of Internet, and discloses a method, a device, equipment and a storage medium for requesting data of multiple servers, wherein the method comprises the following steps: extracting the address of the data interface of each server; constructing a target BFF interface according to the address of the data interface and a preset front-end development strategy; sending the data request information sent by each front-end component to a preset BFF service layer through a target BFF interface so that the preset BFF service layer feeds back corresponding development data according to the data request information; sending the development data to each front-end component to realize a multi-service data request; because the target BFF interface and the preset BFF service layer constructed by the address of the data interface of each server and the preset front-end development strategy feed back the development data corresponding to the data request information sent by each front-end component, compared with the prior art that each front-end component directly requests the corresponding server request data, the efficiency of requesting multi-server data can be effectively improved.

Description

Multi-server data request method, device, equipment and storage medium
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method, an apparatus, a device, and a storage medium for requesting data from multiple servers.
Background
With the rapid development of the internet technology, the demand of people on a platform system is gradually enhanced, the platform system comprises a web end, an IOS, an android, a small program and the like, and the platform system is realized by a development technology means, at present, a common development technology adopts a front-end and back-end separated development mode, namely, front-end and back-end independent development, but integration and debugging are needed to be carried out on front-end and back-end modules after the module development is finished, and the situation that a front-end development engineer often needs to simultaneously request data for a plurality of servers occurs in the integration and debugging process, different platform front-end interfaces are often displayed in different expression modes, even if the requested data are all background data of a plurality of servers and the operation modes are overlapped, the interfaces are completely different, and the blocking property and the non-connectivity exist among the plurality of servers, so that the time consumption for requesting the data of the plurality of servers is long, and the accuracy of the requested data is low.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a method, a device, equipment and a storage medium for requesting data of multiple servers, and aims to solve the technical problem of low efficiency of requesting the data of multiple services in the prior art.
In order to achieve the above object, the present invention provides a data request method for multiple servers, which includes the following steps:
acquiring data interfaces of all servers and extracting addresses of the data interfaces;
constructing a target BFF interface according to the address of the data interface and a preset front-end development strategy;
receiving data request information sent by each front-end component, and sending the data request information to a preset BFF service layer through the target BFF interface so that the preset BFF service layer feeds back corresponding development data according to the data request information;
and receiving development data fed back by the preset BFF service layer, and sending the development data to each front-end component to realize a multi-service data request.
Optionally, the constructing a target BFF interface according to the address of the data interface and a preset front-end development policy includes:
extracting identification information of the address of the data interface;
classifying the address of the data interface according to the identification information;
and constructing a target BFF interface for the classified address through the preset front-end development strategy.
Optionally, before receiving the data request information sent by each front-end component, the method further includes:
acquiring a preset entry file, a preset initialization file and a preset configuration file;
generating a target execution file according to the preset entry file, the preset initialization file and the preset configuration file;
acquiring a preset log file and a preset middleware file;
generating a target log file according to the preset log file and the preset middleware file;
and obtaining a preset BFF service layer according to the target execution file, the target log file, the preset BFF function and the preset CodeQL service.
Optionally, before obtaining the preset BFF service layer according to the target execution file, the target log file, and the preset BFF function, the method further includes:
obtaining an RPC remote request protocol and a preset OSS file;
obtaining a temporary file of each server according to the preset OSS file;
sending the temporary file to each server based on an RPC remote request protocol so that each server can inquire and feed back target storage data according to the temporary file;
and generating a preset BFF function according to the preset model scheduling strategy and the target storage data.
Optionally, the generating a preset BFF function according to the preset model scheduling policy and the target storage data includes:
acquiring preset middleware built-in parameters and a target http route;
writing the preset middleware built-in parameters and the target http route into a preset middleware model;
and scheduling the preset middleware model through a preset model scheduling strategy and target storage data to obtain a preset BFF function.
Optionally, before obtaining the preset BFF service layer according to the target execution file, the target log file, the preset BFF function, and the preset CodeQL service, the method further includes:
acquiring a parameter list, an object name and a filtering device of each front-end component;
constructing a target abstract syntax tree according to the parameter list, the object names and the filtering device;
and generating corresponding preset CodeQL service according to the target abstract syntax tree.
Optionally, the receiving data request information sent by each front-end component, and sending the data request information to a preset BFF service layer through the target BFF interface, so that the preset BFF service layer feeds back corresponding development data according to the data request information includes:
receiving data request information sent by each front-end component, and determining a corresponding data request type according to the data request information;
and sending the data request type to a preset BFF service layer through the target BFF interface so that the preset BFF service layer feeds back corresponding development data according to the data request type.
In addition, to achieve the above object, the present invention further provides a data request apparatus for multiple servers, including:
the extraction module is used for acquiring the data interfaces of the servers and extracting the addresses of the data interfaces;
the construction module is used for constructing a target BFF interface according to the address of the data interface and a preset front-end development strategy;
the data feedback module is used for receiving data request information sent by each front-end component and sending the data request information to a preset BFF service layer through a target BFF interface so that the preset BFF service layer feeds back corresponding development data according to the data request information;
and the data request module is used for receiving the development data fed back by the preset BFF service layer and sending the development data to each front-end component so as to realize a multi-service data request.
In addition, in order to achieve the above object, the present invention further provides a data request device of a multi-server, including: the data request program of the multi-server is configured to realize the data request method of the multi-server.
In addition, to achieve the above object, the present invention further provides a storage medium having stored thereon a multi-server data request program, which when executed by a processor implements the multi-server data request method as described above.
The data request method of the multi-server provided by the invention extracts the address of the data interface by acquiring the data interface of each server; constructing a target BFF interface according to the address of the data interface and a preset front-end development strategy; receiving data request information sent by each front-end component, and sending the data request information to a preset BFF service layer through the target BFF interface so that the preset BFF service layer feeds back corresponding development data according to the data request information; receiving development data fed back by the preset BFF service layer, and sending the development data to each front-end component to realize a multi-service data request; because the target BFF interface and the preset BFF service layer constructed by the address of the data interface of each server and the preset front-end development strategy feed back the development data corresponding to the data request information sent by each front-end component, compared with the prior art that each front-end component directly requests the corresponding server request data, the efficiency of requesting multi-server data can be effectively improved.
Drawings
FIG. 1 is a schematic diagram of a multi-server data request device of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of a method for requesting data from multiple servers according to the present invention;
FIG. 3 is a flowchart illustrating a data request method for multiple servers according to a second embodiment of the present invention;
FIG. 4 is a flowchart illustrating a data request method for multiple servers according to a third embodiment of the present invention;
FIG. 5 is a functional block diagram of a multi-server data request device according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a data request device of multiple servers in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the data request apparatus of the multi-server may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or may be a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the architecture shown in FIG. 1 does not constitute a limitation of a multi-server data requesting device, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a data request program of a multi-server.
In the multi-server data request apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with the network integration platform workstation; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the multi-server data request device of the present invention may be provided in the multi-server data request device, and the multi-server data request device calls the multi-server data request program stored in the memory 1005 through the processor 1001 and executes the multi-server data request method provided in the embodiment of the present invention.
Based on the hardware structure, the embodiment of the data request method of the multi-server is provided.
Referring to fig. 2, fig. 2 is a flowchart illustrating a data requesting method for multiple servers according to a first embodiment of the present invention.
In a first embodiment, the method for requesting data from multiple servers includes the following steps:
step S10, acquiring the data interface of each server, and extracting the address of the data interface.
It should be noted that, the execution subject of the present embodiment is a data request device of multiple servers, and may also be other devices that can implement the same or similar functions, such as a preset BFF service layer construction device, and the present embodiment is not limited to this, and in the present embodiment, the preset BFF service layer construction device is taken as an example for description.
It should be understood that the data interface refers to an interface for each server to send or receive data, each server includes a server corresponding to each front-end component, for example, a web-end server, an IOS-end server, an android-end server, an applet-end server, and the like, and each server and the front-end component are in a one-to-one correspondence in the data transmission process.
It is understood that the address refers to an access address of the data interface at each server, and the front-end component can directly access data of the server through the access address, for example, the front-end component is a web end, the server is a web end server, and data of the web end server can be accessed by inputting the access address of the data interface at the web end.
And step S20, constructing a target BFF interface according to the address of the data interface and a preset front-end development strategy.
It should be understood that the preset front-end development strategy refers to a strategy for developing a front-end component, and after the address of the data interface is obtained, the corresponding BFF interface is developed through the preset front-end development strategy according to the address of the data interface, and after the development is completed, the target BFF interface is obtained.
Further, step S20 includes: extracting identification information of the address of the data interface; classifying the address of the data interface according to the identification information; and constructing a target BFF interface for the classified address through the preset front-end development strategy.
It is to be understood that the identification information refers to information capable of uniquely identifying an address of the data interface, for example, address ID information, in order to facilitate development and construction of a target BFF interface through a preset front-end development strategy, after the identification information of the address is obtained, the address of the data interface is classified through the identification information, the classified address is developed through a preset start-end development strategy, and after the development is completed, the target BFF interface is constructed.
Step S30, receiving data request information sent by each front-end component, and sending the data request information to a preset BFF service layer through the target BFF interface, so that the preset BFF service layer feeds back corresponding development data according to the data request information.
It should be understood that the data request information refers to information that each front-end component requests data from each server, and each server can feed back development data required by each front-end component through the data request information, but the data request data is not directly sent to each server at this time, but the data request information is sent to a preset BFF service layer, the preset BFF service layer refers to a back-end service layer that serves the front-end, and after receiving the data request information sent by each front-end component, the preset BFF service layer feeds back development data corresponding to the data request information, and the development data refers to data required by each front-end component during development.
And step S40, receiving the development data fed back by the preset BFF service layer, and sending the development data to each front-end component to implement a multi-service data request.
It can be understood that, the development data fed back by the preset service layer is received and sent to each front-end component, and then each front-end component can perform subsequent development after receiving the development data, for example, the development data may be data in a database, data called by an interface, or other data, which is not limited in this embodiment.
In the embodiment, the address of the data interface is extracted by acquiring the data interface of each server; constructing a target BFF interface according to the address of the data interface and a preset front-end development strategy; receiving data request information sent by each front-end component, and sending the data request information to a preset BFF service layer through the target BFF interface so that the preset BFF service layer feeds back corresponding development data according to the data request information; receiving development data fed back by the preset BFF service layer, and sending the development data to each front-end component to realize a multi-service data request; since the target BFF interface and the preset BFF service layer constructed by the address of the data interface of each server and the preset front-end development policy feed back the development data corresponding to the data request information sent by each front-end component in the embodiment, compared with the prior art in which each front-end component directly requests the corresponding server request data, the efficiency of requesting multi-server data can be effectively improved.
In an embodiment, as shown in fig. 3, a second embodiment of the data requesting method for multiple servers according to the present invention is proposed based on the first embodiment, before the step S30, the method further includes:
step S201, a preset entry file, a preset initialization file, and a preset configuration file are obtained.
It should be understood that the preset entry file refers to an interface entry file, the format of the preset entry file is @, js, and may be index.
Step S202, generating a target execution file according to the preset entry file, the preset initialization file and the preset configuration file.
It can be understood that, after obtaining the preset entry file, the preset initialization file, and the preset configuration file, the preset entry file, the preset initialization file, and the preset configuration file are written into the basic development directory, and after the writing is completed, the target execution file is generated, and the basic development target is created through the "npm init-y" command line.
Step S203, a preset log file and a preset middleware file are obtained.
It should be understood that the preset log file refers to a file recording the running process of the code, and the preset middleware file refers to a core file of the preset BFF service layer, and the preset middleware file has a format of js, which includes midleware.
And step S204, generating a target log file according to the preset log file and the preset middleware file.
It can be understood that after the preset log file and the preset middleware file are obtained, the target log file is obtained by wrapping the preset log file and the preset middleware file.
And step S205, obtaining a preset BFF service layer according to the target execution file, the target log file, the preset BFF function and the preset CodeQL service.
It should be understood that the preset BFF function refers to a function called by the data request information, the preset CodeQL service refers to a data retrieval and query service, the data request information sent by each front-end component can be arranged by the preset CodeQL service, and after obtaining the target execution file, the target log file, the preset BFF function and the preset CodeQL service, the preset BFF service layer is constructed according to the target execution file, the target log file, the preset BFF function and the preset CodeQL service.
Further, before step S105, the method further includes: obtaining an RPC remote request protocol and a preset OSS file; obtaining a temporary file of each server according to the preset OSS file; sending the temporary file to each server based on an RPC remote request protocol so that each server can inquire and feed back target storage data according to the temporary file; and generating a preset BFF function according to the preset model scheduling strategy and the target storage data.
It can be understood that the RPC remote request protocol refers to a request protocol used when a server is accessed remotely, for example, the server accessed remotely is a web server, the RPC remote request protocol at this time is RPCClient, the preset OSS file refers to an extensible file, a temporary file stored in a server background can be obtained by the preset OSS file, the target storage file refers to a storage file corresponding to the temporary file, that is, the temporary file is sent to each server, each server at this time feeds back corresponding target storage data according to the temporary file, a preset BFF function is generated based on a preset model scheduling policy and the target storage data, and the preset model scheduling policy refers to a scheduling policy composed by model management, logical operation, and dependency management.
Further, generating a preset BFF function according to a preset model scheduling strategy and target storage data, including: acquiring preset middleware built-in parameters and a target http route; writing the preset middleware built-in parameters and the target http route into a preset middleware model; and scheduling the preset middleware model through a preset model scheduling strategy and target storage data to obtain a preset BFF function.
It should be understood that the preset middleware built-in parameter refers to a general reference built-in parameter of the preset middleware, the target http route refers to a route for accessing a preset BFF service layer, the route can be used only after registration in a website is performed, after the preset middleware built-in parameter and the target http route are obtained, the preset middleware built-in parameter and the target http route are written into a preset middleware model, the preset middleware model is midleware-bus, and the preset middleware model is scheduled by scheduling policy target storage data through the preset model, so that a preset BFF function can be obtained.
Further, before step S105, the method further includes: acquiring a parameter list, an object name and a filtering device of each front-end component; constructing a target abstract syntax tree according to the parameter list, the object names and the filtering device; and generating corresponding preset CodeQL service according to the target abstract syntax tree.
It should be understood that the parameter list refers to a list composed of parameters in the front-end component, the filtering means refers to a means for filtering hidden item values, and a target abstract syntax tree is constructed through the parameter list, the object names and the filtering means, and the target abstract syntax tree refers to a structured function for disassembling JS codes, and a corresponding preset CodeQL service is generated through the target abstract syntax tree.
In the embodiment, a preset entry file, a preset initialization file and a preset configuration file are acquired; generating a target execution file according to the preset entry file, the preset initialization file and the preset configuration file; acquiring a preset log file and a preset middleware file; generating a target log file according to the preset log file and the preset middleware file; obtaining a preset BFF service layer according to the target execution file, the target log file, the preset BFF function and the preset CodeQL service; in the embodiment, the target execution file is generated through the preset entry file, the preset initialization file and the preset configuration file, the target log file is generated according to the preset log file and the preset middleware file, and then the preset BFF service layer is obtained through the target execution file, the target log file, the preset BFF function and the preset CodeQL service, so that the efficiency of obtaining the preset BFF service layer can be effectively improved.
In an embodiment, as shown in fig. 4, the third embodiment of the data request method of multiple servers according to the present invention is proposed based on the first embodiment, and the step S30 includes:
step S301, receiving data request information sent by each front-end component, and determining a corresponding data request type according to the data request information.
It is to be understood that the data request information refers to information that each front-end component requests data from each server, and after obtaining the data request information sent by each front-end component, it is necessary to determine the type of the data request information, that is, the data request type, for example, a web data request type, an IOS data request type, an android data request type, and the like.
Step S302, sending the data request type to a preset BFF service layer through the target BFF interface, so that the preset BFF service layer feeds back corresponding development data according to the data request type.
It can be understood that, after determining the data request type sent by each front-end component, the data request type is sent to the preset BFF service layer through the target BFF interface, at this time, the preset BFF service layer queries corresponding development data according to the data request type and feeds back the development data, and after receiving the development data fed back by the preset BFF service layer, the development data is sent to each front-end component for subsequent development.
In the embodiment, by receiving data request information sent by each front-end component, a corresponding data request type is determined according to the data request information; sending the data request type to a preset BFF service layer through the target BFF interface so that the preset BFF service layer feeds back corresponding development data according to the data request type; in the embodiment, the corresponding data request type is determined by receiving the data request information sent by each front-end component, and the data request is sent to the preset BFF server through the target BFF interface, so that the preset BFF server feeds back the corresponding development data, and the accuracy and efficiency of obtaining the development data can be effectively improved.
In addition, an embodiment of the present invention further provides a storage medium, where a multi-server data request program is stored on the storage medium, and the multi-server data request program, when executed by a processor, implements the steps of the multi-server data request method described above.
Since the storage medium adopts all technical solutions of all the embodiments, at least all the beneficial effects brought by the technical solutions of the embodiments are achieved, and no further description is given here.
In addition, referring to fig. 5, an embodiment of the present invention further provides a data request apparatus for multiple servers, where the data request apparatus for multiple servers includes:
and the extraction module 10 is configured to acquire a data interface of each server and extract an address of the data interface.
It should be understood that the data interface refers to an interface for each server to send or receive data, each server includes a server corresponding to each front-end component, for example, a web-end server, an IOS-end server, an android-end server, an applet-end server, and the like, and each server and the front-end component are in a one-to-one correspondence in the data transmission process.
It is understood that the address refers to an access address of the data interface at each server, and the front-end component can directly access data of the server through the access address, for example, the front-end component is a web end, the server is a web end server, and data of the web end server can be accessed by inputting the access address of the data interface at the web end.
And the constructing module 20 is configured to construct a target BFF interface according to the address of the data interface and a preset front-end development strategy.
It should be understood that the preset front-end development strategy refers to a strategy for developing a front-end component, and after the address of the data interface is obtained, the corresponding BFF interface is developed through the preset front-end development strategy according to the address of the data interface, and after the development is completed, the target BFF interface is obtained.
Further, the building module 20 is further configured to extract identification information of an address of the data interface; classifying the address of the data interface according to the identification information; and constructing a target BFF interface for the classified address through the preset front-end development strategy.
It is to be understood that the identification information refers to information capable of uniquely identifying an address of the data interface, for example, address ID information, in order to facilitate development and construction of a target BFF interface through a preset front-end development strategy, after the identification information of the address is obtained, the address of the data interface is classified through the identification information, the classified address is developed through a preset start-end development strategy, and after the development is completed, the target BFF interface is constructed.
The data feedback module 30 is configured to receive data request information sent by each front-end component, and send the data request information to a preset BFF service layer through a target BFF interface, so that the preset BFF service layer feeds back corresponding development data according to the data request information.
It should be understood that the data request information refers to information that each front-end component requests data from each server, and each server can feed back development data required by each front-end component through the data request information, but the data request data is not directly sent to each server at this time, but the data request information is sent to a preset BFF service layer, the preset BFF service layer refers to a back-end service layer that serves the front-end, and after receiving the data request information sent by each front-end component, the preset BFF service layer feeds back development data corresponding to the data request information, and the development data refers to data required by each front-end component during development.
And the data request module 40 is configured to receive the development data fed back by the preset BFF service layer, and send the development data to each front-end component, so as to implement a multi-service data request.
It can be understood that, the development data fed back by the preset service layer is received and sent to each front-end component, and then each front-end component can perform subsequent development after receiving the development data, for example, the development data may be data in a database, data called by an interface, or other data, which is not limited in this embodiment.
In the embodiment, the address of the data interface is extracted by acquiring the data interface of each server; constructing a target BFF interface according to the address of the data interface and a preset front-end development strategy; receiving data request information sent by each front-end component, and sending the data request information to a preset BFF service layer through the target BFF interface so that the preset BFF service layer feeds back corresponding development data according to the data request information; receiving development data fed back by the preset BFF service layer, and sending the development data to each front-end component to realize a multi-service data request; since the target BFF interface and the preset BFF service layer constructed by the address of the data interface of each server and the preset front-end development policy feed back the development data corresponding to the data request information sent by each front-end component in the embodiment, compared with the prior art in which each front-end component directly requests the corresponding server request data, the efficiency of requesting multi-server data can be effectively improved.
It should be noted that the above-described work flows are only exemplary, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of them to achieve the purpose of the solution of the embodiment according to actual needs, and the present invention is not limited herein.
In addition, the technical details that are not described in detail in this embodiment may refer to the data request method of multiple servers provided in any embodiment of the present invention, and are not described herein again.
In an embodiment, the building module 20 is further configured to extract identification information of an address of the data interface; classifying the address of the data interface according to the identification information; and constructing a target BFF interface for the classified address through the preset front-end development strategy.
In an embodiment, the data feedback module 30 is further configured to obtain a preset entry file, a preset initialization file, and a preset configuration file; generating a target execution file according to the preset entry file, the preset initialization file and the preset configuration file; acquiring a preset log file and a preset middleware file; generating a target log file according to the preset log file and the preset middleware file; and obtaining a preset BFF service layer according to the target execution file, the target log file, the preset BFF function and the preset CodeQL service.
In an embodiment, the data feedback module 30 is further configured to obtain an RPC remote request protocol and a preset OSS file; obtaining a temporary file of each server according to the preset OSS file; sending the temporary file to each server based on an RPC remote request protocol so that each server can inquire and feed back target storage data according to the temporary file; and generating a preset BFF function according to the preset model scheduling strategy and the target storage data.
In an embodiment, the data feedback module 30 is further configured to obtain preset middleware built-in parameters and a target http route; writing the preset middleware built-in parameters and the target http route into a preset middleware model; and scheduling the preset middleware model through a preset model scheduling strategy and target storage data to obtain a preset BFF function.
In an embodiment, the data feedback module 30 is further configured to obtain a parameter list, an object name, and a filtering device of each front-end component; constructing a target abstract syntax tree according to the parameter list, the object names and the filtering device; and generating corresponding preset CodeQL service according to the target abstract syntax tree.
In an embodiment, the data feedback module 30 is further configured to receive data request information sent by each front-end component, and determine a corresponding data request type according to the data request information; and sending the data request type to a preset BFF service layer through the target BFF interface so that the preset BFF service layer feeds back corresponding development data according to the data request type.
Other embodiments or methods of implementing the multi-server data request device of the present invention are described with reference to the above-described method embodiments, and are not intended to be exhaustive.
Further, it is to be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., Read Only Memory (ROM)/RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal device (e.g., a mobile phone, a computer, an all-in-one platform workstation, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A multi-server data request method is characterized by comprising the following steps:
acquiring data interfaces of all servers and extracting addresses of the data interfaces;
constructing a target BFF interface according to the address of the data interface and a preset front-end development strategy;
receiving data request information sent by each front-end component, and sending the data request information to a preset BFF service layer through the target BFF interface so that the preset BFF service layer feeds back corresponding development data according to the data request information;
and receiving development data fed back by the preset BFF service layer, and sending the development data to each front-end component to realize a multi-service data request.
2. The method for requesting data of multiple servers according to claim 1, wherein the constructing a target BFF interface according to the address of the data interface and a preset front-end development policy comprises:
extracting identification information of the address of the data interface;
classifying the address of the data interface according to the identification information;
and constructing a target BFF interface for the classified address through the preset front-end development strategy.
3. The method for requesting data from multiple servers according to claim 1, wherein before receiving the data request information sent by each front-end component, the method further comprises:
acquiring a preset entry file, a preset initialization file and a preset configuration file;
generating a target execution file according to the preset entry file, the preset initialization file and the preset configuration file;
acquiring a preset log file and a preset middleware file;
generating a target log file according to the preset log file and the preset middleware file;
and obtaining a preset BFF service layer according to the target execution file, the target log file, the preset BFF function and the preset CodeQL service.
4. The method for requesting data from a plurality of servers according to claim 3, wherein before obtaining the preset BFF service layer according to the target execution file, the target log file, and the preset BFF function, the method further comprises:
obtaining an RPC remote request protocol and a preset OSS file;
obtaining a temporary file of each server according to the preset OSS file;
sending the temporary file to each server based on an RPC remote request protocol so that each server can inquire and feed back target storage data according to the temporary file;
and generating a preset BFF function according to the preset model scheduling strategy and the target storage data.
5. The method for requesting data of multiple servers according to claim 4, wherein the generating a preset BFF function according to a preset model scheduling policy and target storage data comprises:
acquiring preset middleware built-in parameters and a target http route;
writing the preset middleware built-in parameters and the target http route into a preset middleware model;
and scheduling the preset middleware model through a preset model scheduling strategy and target storage data to obtain a preset BFF function.
6. The method for requesting data of a multi-server according to claim 3, wherein before obtaining a preset BFF service layer according to the target execution file, the target log file, the preset BFF function, and the preset CodeQL service, the method further comprises:
acquiring a parameter list, an object name and a filtering device of each front-end component;
constructing a target abstract syntax tree according to the parameter list, the object names and the filtering device;
and generating corresponding preset CodeQL service according to the target abstract syntax tree.
7. The method for requesting data of multiple servers according to any one of claims 1 to 6, wherein the receiving data request information sent by each front-end component, and sending the data request information to a preset BFF service layer through the target BFF interface, so that the preset BFF service layer feeds back corresponding development data according to the data request information includes:
receiving data request information sent by each front-end component, and determining a corresponding data request type according to the data request information;
and sending the data request type to a preset BFF service layer through the target BFF interface so that the preset BFF service layer feeds back corresponding development data according to the data request type.
8. A multi-server data request apparatus, comprising:
the extraction module is used for acquiring the data interfaces of the servers and extracting the addresses of the data interfaces;
the construction module is used for constructing a target BFF interface according to the address of the data interface and a preset front-end development strategy;
the data feedback module is used for receiving data request information sent by each front-end component and sending the data request information to a preset BFF service layer through a target BFF interface so that the preset BFF service layer feeds back corresponding development data according to the data request information;
and the data request module is used for receiving the development data fed back by the preset BFF service layer and sending the development data to each front-end component so as to realize a multi-service data request.
9. A multi-server data request apparatus, characterized in that the multi-server data request apparatus comprises: a memory, a processor, and a multi-server data request program stored on the memory and operable on the processor, the multi-server data request program being configured with a data request method that implements the multi-server according to any one of claims 1 to 7.
10. A storage medium having stored thereon a multi-server data request program which, when executed by a processor, implements a multi-server data request method according to any one of claims 1 to 7.
CN202111237367.1A 2021-10-25 2021-10-25 Multi-server data request method, device, equipment and storage medium Active CN113709187B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111237367.1A CN113709187B (en) 2021-10-25 2021-10-25 Multi-server data request method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111237367.1A CN113709187B (en) 2021-10-25 2021-10-25 Multi-server data request method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113709187A true CN113709187A (en) 2021-11-26
CN113709187B CN113709187B (en) 2022-02-15

Family

ID=78646836

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111237367.1A Active CN113709187B (en) 2021-10-25 2021-10-25 Multi-server data request method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113709187B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114707155A (en) * 2022-04-12 2022-07-05 广州大学 Static code security check method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109922158A (en) * 2019-03-22 2019-06-21 泰康保险集团股份有限公司 Data processing method, device, medium and electronic equipment based on micro services
CN111596902A (en) * 2020-05-26 2020-08-28 牛津(海南)区块链研究院有限公司 Method, device, equipment and storage medium for building front-end and back-end development framework
CN111787036A (en) * 2019-04-03 2020-10-16 北京奇虎科技有限公司 Solution method, device, storage medium and equipment for front-end private cloud deployment
CN112363854A (en) * 2020-11-11 2021-02-12 南京莱斯信息技术股份有限公司 Front-end service framework optimization design method based on novel interface standard
CN112559350A (en) * 2020-12-16 2021-03-26 杭州数梦工场科技有限公司 Debugging method, device and equipment for front-end development page and storage medium
US11086702B1 (en) * 2020-08-21 2021-08-10 International Business Machines Corporation API invoke request management

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109922158A (en) * 2019-03-22 2019-06-21 泰康保险集团股份有限公司 Data processing method, device, medium and electronic equipment based on micro services
CN111787036A (en) * 2019-04-03 2020-10-16 北京奇虎科技有限公司 Solution method, device, storage medium and equipment for front-end private cloud deployment
CN111596902A (en) * 2020-05-26 2020-08-28 牛津(海南)区块链研究院有限公司 Method, device, equipment and storage medium for building front-end and back-end development framework
US11086702B1 (en) * 2020-08-21 2021-08-10 International Business Machines Corporation API invoke request management
CN112363854A (en) * 2020-11-11 2021-02-12 南京莱斯信息技术股份有限公司 Front-end service framework optimization design method based on novel interface standard
CN112559350A (en) * 2020-12-16 2021-03-26 杭州数梦工场科技有限公司 Debugging method, device and equipment for front-end development page and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
于敞: "基于微服务架构的接口自动化测试服务与测试报告的设计与实现", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114707155A (en) * 2022-04-12 2022-07-05 广州大学 Static code security check method

Also Published As

Publication number Publication date
CN113709187B (en) 2022-02-15

Similar Documents

Publication Publication Date Title
CN108509523B (en) Method and device for structured processing of block chain data and readable storage medium
CN103645951A (en) Cross-platform mobile data management system and method
CN102333115A (en) Method and device for transforming existing Web application into SaaS multi-tenant application
EP2717187A1 (en) Information processing system, access rights management method, information processing device, and control method and control program therefor
CN112597020A (en) Interface testing method and device, computer equipment and storage medium
WO2013152729A1 (en) Method and apparatus for providing software for terminal device
CN113709187B (en) Multi-server data request method, device, equipment and storage medium
US9350738B2 (en) Template representation of security resources
CN101916283B (en) Method for acquiring link information from dynamic webpage and server thereof
CN113688183A (en) Multi-type data source extraction method, system, terminal equipment and storage medium
CN113626512A (en) Data processing method, device, equipment and readable storage medium
CN113660359A (en) Management method and device for domain name resolution record, storage medium and electronic equipment
CN111488286B (en) Method and device for independently developing Android modules
CN111045928B (en) Interface data testing method, device, terminal and storage medium
CN117171108A (en) Virtual model mapping method and system
CN102546737A (en) Wireless Internet gateway access system and method
CN111026669A (en) Test log management method, test log management device, and storage medium
JP5224839B2 (en) Document management system, document management apparatus, document management method, and program
CN110874278A (en) Embedding method of external system, workflow system, device and storage medium
CN115599669A (en) Debugging method and device of microservice, electronic equipment and readable storage medium
CN110071921B (en) Internet of things platform access method, device, computer readable storage medium and system
CN110516189B (en) Interface self-service method, device, computer equipment and storage medium
CN110837612B (en) Uniform Resource Identifier (URI) data acquisition method and device and storage medium
CN113051299A (en) Proxy information processing method, proxy information processing device, computer equipment and storage medium
CN112765600A (en) Control method for collecting automatic synchronization CMDB based on HIDS intrusion detection

Legal Events

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