CN-121996248-A - Back-end system serving front end, data processing method, device, equipment and storage medium
Abstract
The embodiment of the disclosure relates to a back-end system serving a front end, a data processing method, a device, equipment and a storage medium, which comprise a BFF management module and a BFF execution module, wherein the BFF execution module is distributed and deployed at a service end, the BFF management module is used for compiling a submitted BFF source code to obtain a compiled BFF code after receiving the submitted BFF source code, the compiled BFF code is sent to the BFF execution module, the BFF source code is generated based on data processing requirement information of a service client corresponding to a target service end, and the BFF execution module is used for processing a data processing request from the service client by executing the compiled BFF code. According to the method and the device, the BFF execution modules in the back-end system serving the front end are distributed and deployed on different business service ends, and the BFF execution modules are uniformly managed by the BFF management modules, so that independent maintenance is not needed, and the maintenance cost is reduced.
Inventors
- JIANG YIWANG
- Xun donghua
Assignees
- 成都光合信号科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241105
Claims (12)
- 1. A back-end system serving a front end, wherein the system comprises a back-end BFF management module serving the front end and at least one BFF execution module, wherein the at least one BFF execution module is distributed and deployed at different business servers; The BFF management module is used for compiling the BFF source code after receiving the BFF source code submitted by a user to obtain a compiled BFF code, and sending the compiled BFF code to the BFF execution module deployed at the target service end, wherein the BFF source code is generated based on data processing requirement information of the service client corresponding to the target service end; The BFF executing module is used for processing the data processing request from the service client by executing the compiled BFF code.
- 2. The back-end system serving a front-end of claim 1, wherein, The BFF execution module is provided with a front-end code executor, and the front-end code executor is used for executing the compiled BFF code in the code environment of the target business service end.
- 3. The back-end system serving a front-end of claim 1, wherein, The BFF execution module is provided with a code updating module which is used for sending a BFF code updating request to the BFF management module; The BFF management module is specifically configured to, after receiving the BFF code update request, send the BFF code to be updated to the BFF execution module if it is determined that the BFF code to be updated exists.
- 4. The back-end system serving a front-end of claim 1, wherein, The BFF management module is specifically configured to send the compiled BFF code to a BFF execution module deployed at the target service server when a preset code issuing condition is satisfied.
- 5. The back-end system serving a front-end of claim 1, wherein, The BFF management module is further configured to store the compiled BFF code to a target storage space, where the target storage space includes a target database or a target cache.
- 6. The back-end system serving a front-end of claim 1, wherein, The target business service end comprises a plurality of business service ends, and BFF execution modules are respectively deployed on the business service ends.
- 7. The back-end system serving a front-end of claim 1, wherein, The BFF execution module is specifically configured to obtain a service processing result obtained by the target service end after performing service processing on a data processing request from the service client, and perform preset logic processing on the service processing result by executing the compiled BFF code to obtain a BFF processing result, where the BFF processing result is used to respond to the data processing request from the service client.
- 8. A data processing method, applied to a back-end system serving a front-end, the system including a BFF management module and at least one BFF execution module, the at least one BFF execution module being distributed for deployment to different business servers, the method comprising: Invoking the BFF management module, after receiving BFF source codes submitted by users, compiling the BFF source codes to obtain compiled BFF codes, and transmitting the compiled BFF codes to a BFF execution module deployed in a target service end; And calling the BFF execution module to process the data processing request from the service client by executing the compiled BFF code.
- 9. A data processing apparatus, applied to a back-end system serving a front-end, the system comprising a BFF management module and at least one BFF execution module, the at least one BFF execution module being distributed for deployment to different business servers, the apparatus comprising: The first calling module is used for calling the BFF management module to compile the BFF source code after receiving the BFF source code submitted by the user to obtain a compiled BFF code, and sending the compiled BFF code to the BFF execution module deployed at the target service end; And the second calling module is used for calling the BFF executing module to process the data processing request from the service client by executing the compiled BFF code.
- 10. An electronic device, the electronic device comprising: A processor; a memory for storing the processor-executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the data processing method of claim 8.
- 11. A computer readable storage medium, characterized in that the storage medium stores a computer program for executing the data processing method according to claim 8.
- 12. A computer program product, characterized in that the computer program product comprises a computer program/instruction which, when executed by a processor, implements the data processing method according to claim 8.
Description
Back-end system serving front end, data processing method, device, equipment and storage medium Technical Field The present disclosure relates to the field of data processing, and in particular, to a back-end system serving a front end, a data processing method, a device, equipment, and a storage medium. Background In the field of software development, BFF (Backend For Frontend; the back end serving the front end) is an architectural model for solving the problem of interactive collaboration between clients and business servers. Under the architecture, the client side does not directly communicate with the service server side, but interacts with the service server side through a BFF middle layer specially customized for the client side to acquire required data, so that unnecessary data transmission and processing can be reduced, performance is improved, the client side and the service server side can be mutually independent, and the coupling degree is reduced. Currently, the BFF middle layer is used as a new independent service, which needs to be developed and deployed separately, and the maintenance of the BFF middle layer also needs higher operation and maintenance cost. Disclosure of Invention To solve or at least partially solve the above technical problems, the present disclosure provides a backend system, a data processing method, a device, an apparatus, and a storage medium that serve a front end. In a first aspect, the present disclosure provides a back-end system that serves a front-end, the system including a back-end BFF management module that serves the front-end and at least one BFF execution module that is distributed across different business servers; The BFF management module is used for compiling the BFF source code after receiving the BFF source code submitted by a user to obtain a compiled BFF code, and sending the compiled BFF code to the BFF execution module deployed at the target service end, wherein the BFF source code is generated based on data processing requirement information of the service client corresponding to the target service end; The BFF executing module is used for processing the data processing request from the service client by executing the compiled BFF code. In an alternative embodiment, the BFF execution module deploys a front-end code executor, where the front-end code executor is configured to execute the compiled BFF code in a code environment of the target service end. In an optional implementation manner, a code update module is deployed in the BFF execution module, and the code update module is configured to send a BFF code update request to the BFF management module; The BFF management module is specifically configured to, after receiving the BFF code update request, send the BFF code to be updated to the BFF execution module if it is determined that the BFF code to be updated exists. In an optional implementation manner, the BFF management module is specifically configured to send the compiled BFF code to a BFF execution module deployed at the target service server when a preset code issuing condition is satisfied. In an optional implementation manner, the BFF management module is further configured to store the compiled BFF code to a target storage space, where the target storage space includes a target database or a target cache. In an optional implementation manner, the target service end includes a plurality of service ends, where BFF execution modules are deployed on the plurality of service ends respectively. In an optional implementation manner, the BFF execution module is specifically configured to obtain a service processing result obtained after the target service server performs service processing on a data processing request from the service client, and perform preset logic processing on the service processing result by executing the compiled BFF code to obtain a BFF processing result, where the BFF processing result is used to respond to the data processing request from the service client. In a second aspect, an embodiment of the present disclosure provides a data processing method, applied to a back-end system serving a front-end, where the system includes a BFF management module and at least one BFF execution module, where the at least one BFF execution module is distributed and deployed on different service ends, and the method includes: Invoking the BFF management module, after receiving BFF source codes submitted by users, compiling the BFF source codes to obtain compiled BFF codes, and transmitting the compiled BFF codes to a BFF execution module deployed in a target service end; And calling the BFF execution module to process the data processing request from the service client by executing the compiled BFF code. In a third aspect, the present disclosure provides a data processing apparatus applied to a back-end system serving a front-end, the system including a BFF management module and at least one BFF execution module, the at least one B