Request response method and apparatus, computer device, and readable storage medium

By introducing a business forwarder to identify and distribute business requests from mobile applications, the problems of inconsistent function iterations and code redundancy across multiple terminals are solved, achieving a unified development and data security solution for mobile application development, and improving development efficiency and security.

CN122285121APending Publication Date: 2026-06-26SHENZHEN XIAOE NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN XIAOE NETWORK TECH CO LTD
Filing Date
2026-02-28
Publication Date
2026-06-26

Smart Images

  • Figure CN122285121A_ABST
    Figure CN122285121A_ABST
Patent Text Reader

Abstract

This application relates to a request-response method, apparatus, computer device, and readable storage medium. The method includes: responding to a target service request sent by a user terminal, performing content recognition on the target service request; selecting a target request responder from candidate request responders based on the content recognition result of the target service request; and sending the target service request to the target request responder for processing. This method can improve APP development efficiency and reduce code redundancy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of application development technology, and in particular to a request-response method, apparatus, computer device, and readable storage medium. Background Technology

[0002] In the field of mobile application development technology, as the demand for brand building in various industries continues to rise, enterprise customers have an increasingly urgent need for exclusive native brand applications (Apps), which need to support key business scenarios such as core business delivery, user operation management, and service experience optimization.

[0003] However, the difficulty in synchronizing feature iterations across multiple terminals leads to inconsistent user experiences on different devices; development and maintenance costs remain high, code redundancy is severe, and resources are wasted. Furthermore, poor feature reusability between apps from different brands prevents resource sharing and complementary advantages. Summary of the Invention

[0004] Therefore, it is necessary to provide a request-response method, apparatus, computer device, and readable storage medium to address the aforementioned technical problems, which can improve App development efficiency and reduce code redundancy.

[0005] Firstly, this application provides a request-response method, including:

[0006] In response to a target service request sent by the user, perform content recognition on the target service request;

[0007] Based on the content recognition results of the target business request, select the target request responder from the candidate request responders;

[0008] The target business request is sent to the target request responder so that the target request responder can process the target business request.

[0009] In one embodiment, in response to a target service request sent by a user terminal, content recognition is performed on the target service request, including:

[0010] In response to a target service request sent by the user, determine the request category to which the target service request belongs; and / or,

[0011] In response to a target business request sent by the user, obtain the request attributes carried in the target business request;

[0012] Accordingly, the content recognition results include request category and / or request attributes.

[0013] In one embodiment, selecting the target request responder from the candidate request responders based on the content recognition result of the target service request includes:

[0014] When the request type is a front-end business request, the front-end request responder among the candidate request responders will be used as the target request responder;

[0015] When the request type is a backend business request, the backend request responder among the candidate request responders will be used as the target request responder; the backend request responder is equipped with at least one business call interface.

[0016] In one embodiment, the request attributes include the request service type; correspondingly, based on the content recognition result of the target service request, the target request responder is selected from the candidate request responders, including:

[0017] When the requested business type is a preset standardized business type, the backend request responder among the candidate request responders is taken as the target request responder; the backend request responder is equipped with at least one business call interface, and the business call interface corresponds one-to-one with the business component of the preset standardized business.

[0018] If the requested business type is not a preset standardized business type, the front-end request responder among the candidate request responders will be used as the target request responder.

[0019] In one embodiment, the request attributes include the amount of requested content; correspondingly, based on the content identification result of the target business request, the target request responder is selected from the candidate request responders, including:

[0020] If the requested content exceeds the preset content limit, the front-end request responder among the candidate request responders will be used as the target request responder.

[0021] If the requested content does not exceed the preset content limit, the backend request responder among the candidate request responders will be used as the target request responder; the backend request responder is equipped with at least one business call interface.

[0022] In one embodiment, in response to a target service request sent by a user terminal, content recognition is performed on the target service request, including:

[0023] In response to a target service request sent by the user, the routing path of the target service request is identified.

[0024] If the routing path identification result indicates that the routing path of the target service request belongs to the authorized response path, then content identification is performed on the target service request.

[0025] In one embodiment, the routing path identification for the target service request includes:

[0026] Based on the component identifier, determine the routing path for the target business request;

[0027] Identify the routing path for the target business request.

[0028] Secondly, this application also provides a request-response device, comprising:

[0029] The content recognition module is used to respond to the target business request sent by the user terminal and perform content recognition on the target business request;

[0030] The responder selection module is used to select the target request responder from the candidate request responders based on the content recognition results of the target business request.

[0031] The request sending module is used to send the target business request to the target request responder, so that the target request responder can process the target business request.

[0032] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0033] In response to a target service request sent by the user, perform content recognition on the target service request;

[0034] Based on the content recognition results of the target business request, select the target request responder from the candidate request responders;

[0035] The target business request is sent to the target request responder so that the target request responder can process the target business request.

[0036] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0037] In response to a target service request sent by the user, perform content recognition on the target service request;

[0038] Based on the content recognition results of the target business request, select the target request responder from the candidate request responders;

[0039] The target business request is sent to the target request responder so that the target request responder can process the target business request.

[0040] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0041] In response to a target service request sent by the user, perform content recognition on the target service request;

[0042] Based on the content recognition results of the target business request, select the target request responder from the candidate request responders;

[0043] The target business request is sent to the target request responder so that the target request responder can process the target business request.

[0044] The aforementioned request-response method, apparatus, computer equipment, and readable storage medium, by introducing a service forwarder, responds to a target service request sent by the user terminal by performing content recognition on the target service request; selecting a target request responder from candidate request responders based on the content recognition result; and sending the target service request to the target request responder for processing. In this process, the service forwarder can receive target service requests sent by terminals of different systems, identify the target service requests, match them with the appropriate responseers, and distribute the target service requests to the corresponding responseers for processing. This allows the request-response method to be applicable to terminals of different systems; that is, for terminals of different systems, corresponding apps can be developed uniformly without separate development and testing, thereby improving app development efficiency and reducing code redundancy. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 This is a diagram illustrating the application environment of a request-response method in one embodiment;

[0047] Figure 2 This is a flowchart illustrating a request-response method in one embodiment;

[0048] Figure 3 This is a flowchart illustrating the content recognition steps in one embodiment;

[0049] Figure 4 This is a flowchart illustrating the content recognition step in another embodiment;

[0050] Figure 5 This is a flowchart illustrating the request-response method in another embodiment;

[0051] Figure 6 This is a structural block diagram of a request-response device in one embodiment;

[0052] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0054] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0055] Before introducing the embodiments of this application, it should be noted that in the current business environment, the wave of brand building is surging across various industries, and the demand from enterprise customers for exclusive native brand apps is exploding. These apps are not only important windows for enterprises to showcase their brand image, but also core carriers for key business scenarios such as core business delivery, user operation management, and service experience optimization.

[0056] However, existing brand app development models suffer from numerous thorny issues. Asynchronous feature iterations across multiple devices prevent users from receiving a consistent and timely user experience; high development and maintenance costs and severe code redundancy lead to resource waste and increased difficulty in subsequent optimization. Poor feature reusability between different brand apps hinders resource sharing and complementary strengths. More seriously, core code is vulnerable to tampering and reverse engineering, posing significant data security risks to corporate trade secrets and user information. Furthermore, existing models struggle to quickly respond to customized enterprise needs, resulting in inefficient version delivery and an inability to meet rapidly changing market demands.

[0057] Faced with the aforementioned problems, there is an urgent need for a solution capable of efficient multi-terminal collaborative development, ensuring that the functions of different terminals can iterate synchronously and provide users with a consistent and high-quality user experience. Simultaneously, it should effectively reduce development and maintenance costs, minimize code redundancy, and improve development efficiency and resource utilization. In terms of security, it must possess robust protection mechanisms to prevent core code from being tampered with and reverse-engineered, ensuring data security. This application is specifically developed to address these issues. It identifies and distributes business requests sent from different user terminals by setting up a standardized App gateway (i.e., a business forwarder), enabling business requests to be processed based on corresponding business processing parties (i.e., request-response parties). The request-response parties are divided into front-end request-response parties and back-end request-response parties.

[0058] The request-response method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, the service forwarder 104 communicates with both the user terminal 102 and the candidate request responder 106 via the network. Specifically, in response to the target service request sent by the user terminal 102, the service forwarder 104 performs content recognition on the target service request; based on the content recognition result of the target service request, the service forwarder 104 selects the target request responder from the candidate request responders 106; and the service forwarder 104 sends the target service request to the target request responder for processing.

[0059] In one exemplary embodiment, such as Figure 2 As shown, a request-response method is provided, which is applied to... Figure 1 Taking the business forwarding party 104 in the example, the explanation includes the following steps:

[0060] S210 responds to the target service request sent by the user terminal and performs content recognition on the target service request.

[0061] The user terminal can include different system terminals, such as Android or iOS.

[0062] Among them, the target business request is used to request the App to respond to business requests and display pages.

[0063] In one alternative implementation, the target service request can be input into the content recognition model to obtain the content recognition result of the target service request.

[0064] In another alternative implementation, the request content carried by the target business request can be input into a large language model to identify the request intent of the target business request, and the content recognition result of the target request can be determined based on the request intent.

[0065] S220: Select the target request responder from the candidate request responders based on the content recognition results of the target business request.

[0066] In one optional implementation, different content recognition results correspond to different reference request responders. The correspondence between different content recognition results and reference request responders can be predetermined, and the reference request responder corresponding to the content recognition result of the target business request can be used as the target request responder.

[0067] In another alternative implementation, the content recognition result of the target business request can be input into a pre-trained request-response selection model, outputting a target request-response identifier, and the candidate request-response corresponding to the target request-response identifier can be used as the target request-response.

[0068] S230: Send the target service request to the target request responder for processing.

[0069] For example, a target service request is sent to a target request responder, and a request-response instruction is sent to the target request responder to instruct the target request responder to process the target service request.

[0070] Furthermore, the system receives the processing result of the target request responder on the target service request and synchronizes the processing result to the user terminal. For example, the request content of the target service request is displayed on the user terminal.

[0071] In the aforementioned request-response method, a business forwarder is introduced. The business forwarder responds to the target business request sent by the user by performing content recognition on the target business request; based on the content recognition result, it selects the target request responder from the candidate request responders; and then sends the target business request to the target request responder for processing. In this process, the business forwarder can receive target business requests sent from different system terminals, identify the target business requests, match them with the appropriate responseers, and distribute the target business requests to the corresponding responseers for processing. This makes the request-response method applicable to terminals on different systems. In other words, for terminals on different systems, the corresponding apps can be developed uniformly without separate development and testing, thereby improving app development efficiency and reducing code redundancy.

[0072] Based on the technical solutions of the above embodiments, this application also provides an optional embodiment. In this optional embodiment, the content recognition result includes request category and / or request attribute, and the process of performing content recognition on the target service request in response to the target service request sent by the user terminal is refined.

[0073] See Figure 3 The content recognition steps shown include at least one of the following:

[0074] S310, in response to the target service request sent by the user terminal, determines the request category to which the target service request belongs.

[0075] The request categories include front-end request categories and back-end request categories, original system categories and new system categories. The original system category can be understood as the reference app used when developing a new app, while the new system category is the new app that has been developed.

[0076] In one optional implementation, when the request type is a front-end business request, the front-end request responder among the candidate request responders is used as the target request responder; when the request type is a back-end business request, the back-end request responder among the candidate request responders is used as the target request responder; the back-end request responder is equipped with at least one business call interface for calling server functions.

[0077] The front-end request and response side handles simple business requests, such as page display requests and user login requests. The back-end request and response side handles business requirements that require a server connection to respond, such as data query requests.

[0078] Optionally, different request categories correspond to different reference request responders. The reference request responder corresponding to the request category of the target business request is used as the target request responder for the target business request.

[0079] In another alternative implementation, when the request category is the original system category, the backend request responder is used as the target request responder; when the request category is the new system category, the frontend request responder is used as the target request responder; the backend request responder is equipped with at least one business call interface for calling the original system function.

[0080] S320 responds to the target service request sent by the user terminal and obtains the request attributes carried in the target service request.

[0081] The request attributes may include at least one of the following: the amount of request content, the type of request business, etc.

[0082] In one optional implementation, if the requested content exceeds a preset content limit, the front-end request responder among the candidate request responders is selected as the target request responder; if the requested content does not exceed the preset content limit, the back-end request responder among the candidate request responders is selected as the target request responder; the back-end request responder is equipped with at least one business call interface.

[0083] The preset content volume can be set based on user needs, and this application does not impose any restrictions on it.

[0084] In another alternative implementation, when the requested service type is a preset standardized service, the backend request responder is used as the target request responder; when the requested service type is not a preset standardized service, the frontend request responder is used as the target request responder.

[0085] The pre-defined standardized business functions can be understood as the business functions that various apps may include, such as login functionality and the display of the "My Profile" page. Correspondingly, the backend request and response side is equipped with at least one business function call interface, and different standardized business components correspond to different business function call interfaces.

[0086] Using standardized business components as the login page components, this section introduces the encapsulated login page component: The user interface (UI) of the login page is reconstructed based on the XULoginUI component. Mature interfaces from the existing brand app are reused and optimized, covering all scenarios including SMS login, password login, and third-party login. It includes nine core interfaces: session acquisition, SMS verification code sending, mobile number binding, account and password reset, login state maintenance, abnormal login alerts, device binding verification, login log reporting, and cross-platform login synchronization. To prevent security risks such as SMS fraud and malicious login, a slider verification component and an SMS sending frequency limit mechanism are integrated, and abnormal login behavior is intercepted through device fingerprint recognition technology. When the component interacts with the backend, it adheres to interface parameter specifications and data encryption transmission protocols to ensure accurate generation, verification, and lifecycle management of the login state, thus guaranteeing account login security.

[0087] Using standardized business components as the components for the "My" page, the encapsulated "My" page components are introduced below: The "My" page is reconstructed based on a native development framework, adopting a modular layout design that allows for flexible addition or removal of functional modules according to the customized needs of enterprise clients. Core features include personal information management (editing and synchronizing basic information such as avatar, nickname, and gender), account security center (password reset, binding information management, and login device management), message notification configuration (system messages, business messages, and marketing message categorization switches), third-party account binding, privacy permission settings (location, album, push notification, and other permission control), help and feedback, and "About Us," among others. It utilizes 11 dedicated interfaces to achieve end-to-end data interaction.

[0088] Using standardized business components as the development toolkit, the encapsulated development toolkit components are introduced: Based on native development technologies, the core functional modules of the Course Software Development Kit (SDK) are encapsulated, enabling fine-grained configuration of functional permissions. Key information such as user identifiers, nicknames, levels, and permission identifiers are deeply associated with the SDK to achieve precise control over business permissions. Core functions such as picture-in-picture playback, scrolling watermarks, video content watermarks, adaptive resolution switching, playback speed adjustment, interactive comments, video caching, and offline playback are enabled, while unnecessary functions such as timed video shutdown and forced pop-up ads are disabled. A local resource encryption storage mechanism is set up, and cached videos and offline resources are encrypted in segments. Combined with multi-delegate callback technology, real-time monitoring of playback status and anomaly interception are achieved to prevent video content from being recorded or tampered with. Optimize caching strategy to support custom cache path, cache size limit, and automatic cleanup of expired resources; optimize screen mirroring function to be compatible with mainstream screen mirroring protocols such as DLNA and AirPlay, enabling seamless screen mirroring across devices; optimize App push function to support precise push by user tags and business scenarios, while providing push permission switch and historical message management functions, adopting a dual configuration mode of local configuration priority and dynamic cloud configuration update, balancing function response speed and configuration flexibility.

[0089] The above embodiments provide a specific method for content recognition of target business requests. The target request responder can be selected from candidate response responders based on the request category and / or the request attributes carried in the target business request. For preset standardized business types, the backend request responder is used as the target request responder to directly invoke the business component functions of the preset standardized business, avoiding redundant development of the same functional components.

[0090] Based on the technical solutions of the above embodiments, this application also provides an optional embodiment. In this optional embodiment, the process of performing content recognition on the target service request in response to the target service request sent by the user terminal is refined.

[0091] See Figure 4 The content recognition steps shown include:

[0092] S410 responds to the target service request sent by the user terminal and identifies the routing path for the target service request.

[0093] In one optional implementation, the target service request carries a component identifier, which is determined based on the functional component corresponding to the target service request. The user terminal has at least two functional components deployed. Accordingly, the routing path of the target service request can be determined based on the component identifier; and routing path identification can be performed on the target service request.

[0094] Different functional components have different component identifiers. When a user receives an initial business request, the user can add the component identifier to the initial business request to generate the target business request.

[0095] In some embodiments, after adding a component identifier, the business request can be processed to obtain the target business request. For example, the business request can be standardized and encapsulated, and data parsed.

[0096] The user terminal deploys a standardized function package library, which contains at least one preset standardized business component. Different standardized business components have different component identifiers. After the user terminal receives the initial business request, it will distribute the request to the corresponding standardized business component according to the request business type of the initial business request, so as to add the component identifier to the initial business request.

[0097] It should be noted that, since the standardized function package library contains code for different functional components, to ensure the case-based nature of the code, it is advisable to perform case-based encryption or custom package encryption on the code. For example, during the encryption process, core business logic code and sensitive data processing code are obfuscated, scrambled, and encrypted to hide the code execution flow and variable meanings; string constants are encrypted and stored, and dynamically decrypted at runtime to prevent static analysis attacks; control flow flattening techniques are used to scramble the code execution logic, increasing the difficulty of reverse engineering.

[0098] The user-side also deploys a general-purpose base library, which provides the basic capabilities required by all apps. This library does not contain specific business logic and has a unified basic standard: all branded apps and dual-terminal (Android / iOS) use the same XEBase (i.e., the general-purpose base library), ensuring consistent rules for basic operations such as API calls, data encryption, network requests, and local storage. For example, regardless of the client's app, login data encryption and API retry logic are the same, avoiding compatibility issues caused by inconsistencies. This reduces redundant development: capabilities used by all apps, such as "network adaptation (weak network handling, timeout retries)," "data parsing (JSON serialization)," "security encryption (parameter encryption, log encryption)," and "exception capture (crash log reporting)," are developed and encapsulated in XEBase once. Subsequent new app development can directly reuse these capabilities without rewriting code. This reduces maintenance costs: centralized maintenance of basic capabilities, such as upgrading encryption algorithms or optimizing network request strategies, only requires modifying XEBase. All apps and components that depend on it will take effect synchronously, eliminating the need to modify each app individually, thus solving the pain points of "excessive repetitive code and cumbersome maintenance."

[0099] In this embodiment, by pre-setting standardized functional components, the number of functional components is reduced, making the process of determining the routing path of the target service request based on the component identifier simpler and improving the efficiency of path identification.

[0100] S420: If the routing path identification result indicates that the routing path of the target service request belongs to the authorized response path, perform content identification on the target service request.

[0101] The authorized response path can be a set of paths that satisfy preset path rules.

[0102] In some embodiments, if the routing path identification result indicates that the routing path of the target service request belongs to the authorized response path, the target service request can also be authenticated, and then the content of the target service request can be identified.

[0103] In the above embodiments, before performing content recognition on the target service request, the routing path is first identified. Only when the routing path identification result indicates that the routing path of the target service request belongs to the authorized response path is the content recognition operation performed, which can improve the caseliness of the target service request response.

[0104] Based on the technical solutions of the above embodiments, this application also provides an optional embodiment. In this optional embodiment, the request-response method provided by this application will be described in detail.

[0105] See Figure 5 The request-response methods shown include:

[0106] S510, in response to the target service request sent by the user terminal, determines the routing path of the target service request based on the component identifier;

[0107] Taking the login scenario as an example, after the user receives the initial business request, the component identifier of the preset standardized business component corresponding to the request content type of the initial business request is added to the initial business request, and the request content in the initial business request is encrypted based on the general basic library to obtain the target business request;

[0108] S520 identifies the routing path for the target service request;

[0109] S530, when the routing path identification result indicates that the routing path of the target service request belongs to the authorized response path, the content of the target service request is identified.

[0110] The content recognition results include request category and / or request attributes;

[0111] Optionally, the request category to which the target business request belongs can be determined; and / or, the request attributes carried in the target business request can be obtained; if the request category is a front-end business request, the front-end request responder among the candidate request responders can be used as the target request responder; if the request category is a back-end business request, the back-end request responder among the candidate request responders can be used as the target request responder; the back-end request responder is equipped with at least one business call interface; if the request content exceeds a preset content limit, the front-end request responder among the candidate request responders can be used as the target request responder; if the request content does not exceed the preset content limit, the back-end request responder among the candidate request responders can be used as the target request responder; the back-end request responder is equipped with at least one business call interface.

[0112] S540 sends the target service request to the target request responder for processing.

[0113] In some embodiments, the service forwarder can be understood as a dedicated gateway server; the front-end request and response party can be understood as a service processing server; and the back-end request and response party can be understood as an application programming interface (API) gateway.

[0114] Optionally, the business forwarding party can undertake core responsibilities such as login status verification, account permission management, request routing, parameter validation, data encryption and decryption, and traffic control. After receiving the target business request sent by the user, the business forwarding party can first verify the integrity of the request header information and request parameters, verify the user's identity and permissions through the ko-token login status identifier, and automatically redirect to the login process for requests without a login status. After successful verification, it assembles additional parameters such as source identifier, device information, and user permission identifier, adds header information, such as "app-type:xet_ind_app", "App-Token:kotoken", and "Sign: request signature", etc.; encrypts sensitive parameters, and then accurately forwards the request to the corresponding backend service (frontend request responder or backend request responder) according to the request type. It is also responsible for decrypting the response results, standardizing the format, and uniformly encapsulating and returning exception information to achieve isolation and adaptation between the user client and the backend service.

[0115] The front-end request / response side is responsible for parsing requests forwarded by the business forwarder, obtaining public parameters such as the enterprise identifier through ko-token parsing, and matching the corresponding business configuration and data permissions based on the enterprise identifier. It corely handles business logic such as user management, order transactions, content distribution, membership benefits, and message push, completing data querying, processing, and storage, generating standardized response results, and encrypting them before returning them to the business forwarder. Simultaneously, it establishes a login state synchronization mechanism with the business forwarder to ensure consistency of user login states across different terminals and services, supporting cross-platform business data synchronization.

[0116] The backend request and response mechanism is used to expand the verification and parsing capabilities of ko-tokens, enabling unified routing and adaptation across multiple backend services. For the interface adaptation needs of certain business systems and the new standardized app, it provides adaptation functions such as interface protocol conversion, parameter format compatibility, and data mapping, ensuring compatibility with existing business processes while supporting rapid integration of new features. It also undertakes responsibilities such as load balancing, traffic monitoring, circuit breaking and degradation, and interface call logging to ensure the high availability and stability of the entire system and prevent a single service failure from impacting overall business operations.

[0117] Taking the login scenario as an example, the request-response method is described as follows: The user-side login component collects user login information (such as mobile phone number + verification code), encrypts the data using a general base library, and encapsulates the request through the user-side network module, sending it to the business forwarding party with additional information such as device fingerprint and App version number. After receiving the request, the business forwarding party first verifies the request signature, device validity, and SMS sending frequency. If these are verified, it assembles the source identifier and ko-token related parameters, adds specified header information, and encrypts and forwards it to the front-end response requester. The front-end response requester parses the request parameters, verifies the validity of the verification code, generates a login state ko-token and associates it with user and device information, records the login log, and returns the login result (including ko-token and user basic information). The result is decrypted and format-standardized by the business forwarding party and then sent back to the user end. The user-side login component receives the result, stores the login state through the general base library, updates the page display of user information, triggers a login success callback, and synchronously updates the login status of other components, completing the entire login process.

[0118] Taking a business data request scenario (such as a course list query) as an example, the request and response methods are described as follows: The user-side content display component initiates a course list query request, carrying the login state ko-token and query parameters (such as category ID, page number, and sorting rules); the request is encapsulated and encrypted by a general base library and sent to the business forwarding party; the business forwarding party verifies the validity of the ko-token and the user's permissions, and after confirming that the user can access the corresponding course resources, it forwards the request to the front-end request and response party; the front-end request and response party queries the course data according to the query parameters, encapsulates the data, and returns it; the result is sent back to the user-side component via the business forwarding party, and the user-side component parses the data and renders and displays the course list, while caching the data for offline viewing.

[0119] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0120] Based on the same inventive concept, this application also provides a request response apparatus for implementing the request response method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more request response apparatus embodiments provided below can be found in the limitations of the request response method described above, and will not be repeated here.

[0121] In one exemplary embodiment, such as Figure 6 As shown, a request-response device is provided, including: a content recognition module 610, a responder selection module 620, and a request sending module 630, wherein:

[0122] The content recognition module 610 is used to perform content recognition on the target business request in response to the target business request sent by the user terminal.

[0123] The responder selection module 620 is used to select the target request responder from the candidate request responders based on the content recognition results of the target business request;

[0124] The request sending module 630 is used to send the target business request to the target request responder so that the target request responder can process the target business request.

[0125] In one embodiment, the content recognition module 610 includes a first recognition unit, configured to determine the request category to which the target service request belongs in response to a target service request sent by the user terminal; and / or a second recognition unit, configured to obtain the request attributes carried in the target service request in response to a target service request sent by the user terminal; accordingly, the content recognition result includes the request category and / or the request attributes.

[0126] In one embodiment, the responder selection module 620 includes a first selection unit, configured to select a front-end request responder from the candidate request responders as the target request responder when the request type is a front-end business request; and a second selection unit, configured to select a back-end request responder from the candidate request responders as the target request responder when the request type is a back-end business request; the back-end request responder is equipped with at least one business call interface.

[0127] In one embodiment, the request attribute includes the request business type; correspondingly, the responder selection module 620 includes a third selection unit, used to select the backend request responder among the candidate request responders as the target request responder when the request business type is a preset standardized business type; the backend request responder is equipped with at least one business call interface, and the business call interface corresponds one-to-one with the business components of the preset standardized business; a fourth selection unit, used to select the frontend request responder among the candidate request responders as the target request responder when the request business type is not a preset standardized business type.

[0128] In one embodiment, the request attribute includes the request content amount; correspondingly, the responder selection module 620 includes a fifth selection unit, used to select the front-end request responder among the candidate request responders as the target request responder when the request content amount exceeds the preset content amount; and a sixth selection unit, used to select the back-end request responder among the candidate request responders as the target request responder when the request content amount does not exceed the preset content amount; the back-end request responder is equipped with at least one business call interface.

[0129] In one embodiment, the request sending module 630 includes a path identification unit, used to identify the routing path of the target service request in response to the target service request sent by the user terminal; and a content identification unit, used to identify the content of the target service request when the routing path identification result indicates that the routing path of the target service request belongs to the authorized response path.

[0130] In one embodiment, the path identification unit includes a path determination subunit for determining the routing path of a target service request based on a component identifier; and a path identification subunit for identifying the routing path of the target service request.

[0131] Each module in the aforementioned request-response device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can invoke and execute the operations corresponding to each module.

[0132] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a request-response method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0133] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0134] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0135] In response to a target service request sent by the user, perform content recognition on the target service request;

[0136] Based on the content recognition results of the target business request, select the target request responder from the candidate request responders;

[0137] The target business request is sent to the target request responder so that the target request responder can process the target business request.

[0138] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0139] In response to a target service request sent by the user, determine the request category to which the target service request belongs; and / or,

[0140] In response to a target business request sent by the user, obtain the request attributes carried in the target business request;

[0141] Accordingly, the content recognition results include request category and / or request attributes.

[0142] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0143] When the request type is a front-end business request, the front-end request responder among the candidate request responders will be used as the target request responder;

[0144] When the request type is a backend business request, the backend request responder among the candidate request responders will be used as the target request responder; the backend request responder is equipped with at least one business call interface.

[0145] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0146] When the requested business type is a preset standardized business type, the backend request responder among the candidate request responders is taken as the target request responder; the backend request responder is equipped with at least one business call interface, and the business call interface corresponds one-to-one with the business component of the preset standardized business.

[0147] If the requested business type is not a preset standardized business type, the front-end request responder among the candidate request responders will be used as the target request responder.

[0148] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0149] If the requested content exceeds the preset content limit, the front-end request responder among the candidate request responders will be used as the target request responder.

[0150] If the requested content does not exceed the preset content limit, the backend request responder among the candidate request responders will be used as the target request responder; the backend request responder is equipped with at least one business call interface.

[0151] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0152] In response to a target service request sent by the user, the routing path of the target service request is identified.

[0153] If the routing path identification result indicates that the routing path of the target service request belongs to the authorized response path, then content identification is performed on the target service request.

[0154] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0155] Based on the component identifier, determine the routing path for the target business request;

[0156] Identify the routing path for the target business request.

[0157] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0158] In response to a target service request sent by the user, perform content recognition on the target service request;

[0159] Based on the content recognition results of the target business request, select the target request responder from the candidate request responders;

[0160] The target business request is sent to the target request responder so that the target request responder can process the target business request.

[0161] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0162] In response to a target service request sent by the user, determine the request category to which the target service request belongs; and / or,

[0163] In response to a target business request sent by the user, obtain the request attributes carried in the target business request;

[0164] Accordingly, the content recognition results include request category and / or request attributes.

[0165] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0166] When the request type is a front-end business request, the front-end request responder among the candidate request responders will be used as the target request responder;

[0167] When the request type is a backend business request, the backend request responder among the candidate request responders will be used as the target request responder; the backend request responder is equipped with at least one business call interface.

[0168] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0169] When the requested business type is a preset standardized business type, the backend request responder among the candidate request responders is taken as the target request responder; the backend request responder is equipped with at least one business call interface, and the business call interface corresponds one-to-one with the business component of the preset standardized business.

[0170] If the requested business type is not a preset standardized business type, the front-end request responder among the candidate request responders will be used as the target request responder.

[0171] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0172] If the requested content exceeds the preset content limit, the front-end request responder among the candidate request responders will be used as the target request responder.

[0173] If the requested content does not exceed the preset content limit, the backend request responder among the candidate request responders will be used as the target request responder; the backend request responder is equipped with at least one business call interface.

[0174] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0175] In response to a target service request sent by the user, the routing path of the target service request is identified.

[0176] If the routing path identification result indicates that the routing path of the target service request belongs to the authorized response path, then content identification is performed on the target service request.

[0177] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0178] Based on the component identifier, determine the routing path for the target business request;

[0179] Identify the routing path for the target business request.

[0180] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0181] In response to a target service request sent by the user, perform content recognition on the target service request;

[0182] Based on the content recognition results of the target business request, select the target request responder from the candidate request responders;

[0183] The target business request is sent to the target request responder so that the target request responder can process the target business request.

[0184] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0185] In response to a target service request sent by the user, determine the request category to which the target service request belongs; and / or,

[0186] In response to a target business request sent by the user, obtain the request attributes carried in the target business request;

[0187] Accordingly, the content recognition results include request category and / or request attributes.

[0188] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0189] When the request type is a front-end business request, the front-end request responder among the candidate request responders will be used as the target request responder;

[0190] When the request type is a backend business request, the backend request responder among the candidate request responders will be used as the target request responder; the backend request responder is equipped with at least one business call interface.

[0191] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0192] When the requested business type is a preset standardized business type, the backend request responder among the candidate request responders is taken as the target request responder; the backend request responder is equipped with at least one business call interface, and the business call interface corresponds one-to-one with the business component of the preset standardized business.

[0193] If the requested business type is not a preset standardized business type, the front-end request responder among the candidate request responders will be used as the target request responder.

[0194] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0195] If the requested content exceeds the preset content limit, the front-end request responder among the candidate request responders will be used as the target request responder.

[0196] If the requested content does not exceed the preset content limit, the backend request responder among the candidate request responders will be used as the target request responder; the backend request responder is equipped with at least one business call interface.

[0197] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0198] In response to a target service request sent by the user, the routing path of the target service request is identified.

[0199] If the routing path identification result indicates that the routing path of the target service request belongs to the authorized response path, then content identification is performed on the target service request.

[0200] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0201] Based on the component identifier, determine the routing path for the target business request;

[0202] Identify the routing path for the target business request.

[0203] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0204] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0205] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0206] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A request-response method, characterized in that, Applied to the service forwarding party, the method includes: In response to a target service request sent by the user, content recognition is performed on the target service request; Based on the content recognition results of the target service request, select the target request responder from the candidate request responders; The target service request is sent to the target request responder for processing.

2. The method according to claim 1, characterized in that, The step of responding to a target service request sent by the user terminal and performing content recognition on the target service request includes: In response to a target service request sent by the user, determine the request category to which the target service request belongs; and / or, In response to a target service request sent by the user, obtain the request attributes carried in the target service request; Accordingly, the content recognition result includes the request category and / or request attributes.

3. The method according to claim 2, characterized in that, The step of selecting the target request responder from the candidate request responders based on the content recognition result of the target service request includes: When the request category is a front-end business request, the front-end request responder among the candidate request responders will be used as the target request responder; When the request category is a backend business request, the backend request responder among the candidate request responders is selected as the target request responder; the backend request responder is equipped with at least one business call interface.

4. The method according to claim 2, characterized in that, The request attributes include the request service type; correspondingly, selecting the target request responder from the candidate request responders based on the content recognition result of the target service request includes: When the requested business type is a preset standardized business type, the backend request responder among the candidate request responders is taken as the target request responder; the backend request responder is equipped with at least one business call interface, and the business call interface corresponds one-to-one with the business components of the preset standardized business. If the requested service type is not a preset standardized service type, the front-end request responder among the candidate request responders will be used as the target request responder.

5. The method according to claim 2, characterized in that, The request attributes include the amount of request content; correspondingly, selecting the target request responder from the candidate request responders based on the content identification result of the target business request includes: If the requested content exceeds the preset content limit, the front-end request responder among the candidate request responders will be selected as the target request responder. If the requested content does not exceed the preset content limit, the backend request responder among the candidate request responders will be selected as the target request responder; the backend request responder is equipped with at least one business call interface.

6. The method according to claim 1, characterized in that, The step of responding to a target service request sent by the user terminal and performing content recognition on the target service request includes: In response to a target service request sent by the user, a routing path is identified for the target service request; If the routing path identification result indicates that the routing path of the target service request belongs to the authorized response path, then the target service request is subject to content identification.

7. The method according to claim 6, characterized in that, The step of identifying the routing path for the target service request includes: Based on the component identifier, determine the routing path of the target service request; The routing path for the target service request is identified.

8. A request-response device, characterized in that, Configured on the service forwarder, the device includes: The content recognition module is used to perform content recognition on the target service request sent by the user terminal. The responder selection module is used to select the target request responder from the candidate request responders based on the content recognition result of the target service request; The request sending module is used to send the target service request to the target request responder so that the target request responder can process the target service request.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-7.