Serial request processing method and apparatus, electronic device, and storage medium

CN117793124BActive Publication Date: 2026-10-27BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311828286.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-27
Publication Date
2026-10-27
Estimated Expiration
2043-12-27

AI Technical Summary

Technical Problem

但该方法通常是将不同时刻的请求对应到同一缓存,造成从缓存中调用的数据与实际所需的数据不一致的问题

Benefits of technology

[0018]本申请实施例提供的串行请求处理方法、装置、电子设备及计算机可读存储介质,通过串行依赖关系的节点服务集合中的目标节点服务接收第一数据请求,若第一数据请求中包含共享依赖数据,从第一数据请求中提取共享依赖数据,然后基于共享依赖数据,生成目标节点服务对应的本级反馈数据,并将本级反馈数据发送至目标节点服务的上级节点服务,实现了在串行调用多个节点服务的场景下,节点服务只需从第一数据请求中提取共享依赖数据即可,无需每个节点服务都调用底层服务获取共享依赖数据,从而避免多个节点服务重复多次请求数据耗费过多的流量,并提高了请求数据的效率。并且由于本申请实施例中的数据请求是针对目标用户端一次操作发出的请求,因此,请求的共享依赖数据对于每个节点是相同的,而非现有技术的缓存针对用户端在不同时刻发送的不同请求设置的,因此,可以解决调用的数据与实际所需的数据不一致的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117793124B_ABST
    Figure CN117793124B_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to a serial request processing method and device, electronic equipment and storage medium, the method comprising: receiving a first data request by a target node service in a node service set, wherein the node services in the node service set are in a serial dependency relationship, and the first data request is used to extract data required by a target user terminal; determining whether the first data request contains shared dependent data, wherein the shared dependent data is data commonly dependent by each node service in the node service set; if the shared dependent data is contained, extracting the shared dependent data from the first data request; generating a local feedback data corresponding to the target node service based on the shared dependent data, and sending the local feedback data to a superior node service of the target node service. The embodiments of the present application can avoid multiple node services repeatedly requesting data for too many times and consuming too much traffic, and improve the efficiency of requesting data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Microservice distributed architecture is a technique for developing a single application as a set of small services, each running in its own process, with lightweight communication mechanisms between services. These services are built around business capabilities and can be deployed independently through fully automated deployment mechanisms.

[0003] One drawback of microservice distributed architecture compared to monolithic architecture is that distributed architecture cannot share variables as easily as monolithic architecture. For underlying services, a single user request may be requested multiple times by different business services, causing the cost of the underlying services to skyrocket.

[0004] When a user opens the application, a single request may pass through multiple microservices, and each microservice may depend on the same underlying central service, such as a user profiling service or an IP resolution service. However, for the same user making the same request, the returned content is identical, such as the user profile and the user's country. But because of the distributed architecture, different services need to retrieve the same content, requiring multiple repeated requests, resulting in high traffic to the underlying central service.

[0005] To reduce traffic, one approach is to use caching to store user-requested data and avoid duplicate data retrieval. However, this method typically maps requests from different times to the same cache, leading to inconsistencies between the cached data and the actual data needed. For example, a user might be a non-member at time T1 and purchase a membership at time T2. Due to caching, the user becomes a member at time T3, but the data displayed to the user is the cached data from time T1 (i.e., the non-member content), resulting in a mismatch between the displayed data and the actual data. Summary of the Invention

[0006] In view of this, in order to solve some or all of the above-mentioned technical problems, embodiments of this application provide a serial request processing method, apparatus, electronic device, and computer-readable storage medium.

[0007] In a first aspect, embodiments of this application provide a serial request processing method, the method comprising: receiving a first data request using a target node service in a node service set, wherein the node services in the node service set have a serial dependency relationship, and the first data request is used to extract data required by a target user; determining whether the first data request contains shared dependency data, wherein the shared dependency data is data that each node service in the node service set commonly depends on; if the shared dependency data is included, extracting the shared dependency data from the first data request; generating local feedback data corresponding to the target node service based on the shared dependency data, and sending the local feedback data to the superior node service of the target node service.

[0008] In one possible implementation, generating local feedback data corresponding to the target node service based on shared dependency data includes: if the target node service is not the last-level node service in the node service set, generating a second data request based on the shared dependency data and sending the second data request to the lower-level node service of the target node service; receiving lower-level feedback data sent by the lower-level node service; and generating local feedback data corresponding to the target node service based on the lower-level feedback data.

[0009] In one possible implementation, extracting shared dependency data from the first data request includes: extracting compressed data from the target portion of the first data request; and decompressing the compressed data to obtain the shared dependency data.

[0010] In one possible implementation, after determining whether the first data request contains shared dependency data, the method further includes: if it does not contain shared dependency data, and the target node service requires shared dependency data, determining the shared dependency service corresponding to the node service set; invoking the shared dependency service to obtain the shared dependency data; generating a third data request based on the shared dependency data; and sending the third data request to the subordinate node service of the target node service.

[0011] In one possible implementation, the method further includes: receiving lower-level feedback data sent by lower-level node services of a first-level node service in a set of node services; generating local feedback data corresponding to the first-level node service based on the lower-level feedback data; and sending the local feedback data to the target user terminal.

[0012] Secondly, embodiments of this application provide a serial request processing apparatus, comprising: a first receiving module, configured to receive a first data request using a target node service in a node service set, wherein the node services in the node service set have a serial dependency relationship, and the first data request is used to extract data required by a target user; a first determining module, configured to determine whether the first data request contains shared dependency data, wherein the shared dependency data is data that each node service in the node service set commonly depends on; an extraction module, configured to extract the shared dependency data from the first data request if it contains shared dependency data; and a first generating module, configured to generate local feedback data corresponding to the target node service based on the shared dependency data, and send the local feedback data to the superior node service of the target node service.

[0013] In one possible implementation, the first generation module includes: a first generation unit, configured to generate a second data request based on shared dependency data if the target node service is not the last-level node service in the node service set, and send the second data request to the lower-level node service of the target node service; a receiving unit, configured to receive the lower-level feedback data sent by the lower-level node service; and a second generation unit, configured to generate the current-level feedback data corresponding to the target node service based on the lower-level feedback data.

[0014] In one possible implementation, the extraction module includes: an extraction unit for extracting compressed data from the target location of the first data request; and a decompression unit for decompressing the compressed data to obtain shared dependency data.

[0015] Thirdly, embodiments of this application provide an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program stored in the memory, wherein when the computer program is executed, it implements the method of any embodiment of the serial request processing method of the first aspect of this application described above.

[0016] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method of any embodiment of the serial request processing method of the first aspect described above.

[0017] Fifthly, embodiments of this application provide a computer program including computer-readable code that, when executed on a device, causes a processor in the device to implement the method of any embodiment of the serial request processing method of the first aspect described above.

[0018] The serial request processing method, apparatus, electronic device, and computer-readable storage medium provided in this application receive a first data request through a target node service in a set of node services with serial dependencies. If the first data request contains shared dependency data, the shared dependency data is extracted from the first data request. Then, based on the shared dependency data, local feedback data corresponding to the target node service is generated and sent to the upper-level node service of the target node service. This enables node services to extract shared dependency data only from the first data request in scenarios where multiple node services are serially called, without each node service calling the underlying service to obtain shared dependency data. This avoids excessive bandwidth consumption caused by multiple node services repeatedly requesting data and improves the efficiency of data request. Furthermore, since the data request in this application embodiment is a request issued for a single operation by the target user, the requested shared dependency data is the same for each node, unlike the cache in existing technologies that is set for different requests sent by the user at different times. Therefore, it can solve the problem of inconsistency between the called data and the actual required data. Attached Figure Description

[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0022] Figure 1 A flowchart illustrating a serial request processing method provided in an embodiment of this application;

[0023] Figure 2 A schematic diagram illustrating an application scenario provided in an embodiment of this application;

[0024] Figure 3 This is a schematic diagram of the data transmission process according to an embodiment of this application;

[0025] Figure 4 A flowchart illustrating another serial request processing method provided in an embodiment of this application;

[0026] Figure 5 A flowchart illustrating another serial request processing method provided in an embodiment of this application;

[0027] Figure 6 A flowchart illustrating another serial request processing method provided in an embodiment of this application;

[0028] Figure 7 A flowchart illustrating another serial request processing method provided in an embodiment of this application;

[0029] Figure 8 This is a schematic diagram of the structure of a serial request processing device provided in an embodiment of this application;

[0030] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0031] Various exemplary embodiments of this application will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of this application.

[0032] Those skilled in the art will understand that the terms "first" and "second" in the embodiments of this application are only used to distinguish different steps, devices or modules, and do not represent any specific technical meaning, nor do they indicate the logical order between them.

[0033] It should also be understood that in this embodiment, "multiple" can refer to two or more, and "at least one" can refer to one, two or more.

[0034] It should also be understood that any component, data or structure mentioned in the embodiments of this application can generally be understood as one or more unless explicitly defined or given contrary guidance in the context.

[0035] Furthermore, the term "and / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this application generally indicates that the preceding and following related objects have an "or" relationship.

[0036] It should also be understood that the description of the various embodiments in this application emphasizes the differences between the various embodiments, and the similarities or similarities can be referred to each other. For the sake of brevity, they will not be described in detail.

[0037] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the scope of this application and its application or use.

[0038] Techniques, circuits, and devices known to a person skilled in the art may not be discussed in detail, but where appropriate, such techniques, circuits, and devices should be considered part of the specification.

[0039] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.

[0040] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. To facilitate understanding of the embodiments of this application, the application will be described in detail below with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0041] To address the issue of high data traffic consumption caused by serially calling different microservices in existing technologies, this application provides a serial request processing method. This method avoids excessive traffic consumption caused by multiple serial node services repeatedly requesting data and resolves the issue of inconsistency between the called data and the actual required data.

[0042] Figure 1 This is a flowchart illustrating a serial request processing method provided in an embodiment of this application. This method can be applied to one or more electronic devices such as servers, desktop computers, and laptops. This method is typically executed by a server, with the user's terminal device communicating with the server to respond to data requests sent by the terminal device, obtain feedback data corresponding to the data request, and send the feedback data back to the terminal device.

[0043] Furthermore, the execution subject of this method can be either hardware or software. When the execution subject is hardware, it can be one or more of the aforementioned electronic devices. For example, a single electronic device can execute this method, or multiple electronic devices can cooperate with each other to execute this method. When the execution subject is software, this method can be implemented as multiple software programs or software modules, or as a single software program or software module. No specific limitations are made here.

[0044] like Figure 1 As shown, the method specifically includes:

[0045] Step 101: Receive the first data request using the target node service in the node service set.

[0046] In this embodiment, the node services in the node service set have a sequential dependency relationship, and the first data request is used to extract the data required by the target user terminal. The target user terminal can be various types of electronic devices, such as smartphones, tablets, laptops, etc. Various types of applications can be installed on the target user terminal, such as browsers, video playback software, real-time communication software, etc.

[0047] Because the node services in the node service set have a sequential dependency relationship, each level of node service in the set needs to call its lower-level node. The lower-level node generates feedback data and returns it to the upper-level node. When calling a lower-level node, a data request can be sent to the lower-level node service. The aforementioned first data request is the data request received by a target node service. Typically, when the target node service is a first-level node service, the first data request can be a data request sent by the target user client; when the target node service is not a first-level node service, the first data request is a data request sent by the upper-level node service.

[0048] As an example, such as Figure 2 As shown, this diagram illustrates the application scenario of this embodiment. When a user opens the application, multiple microservices need to be called to display the content of the current page. These microservices include page navigation services, page services, tab services, and services such as recommendations and marketing under the tabs. The node services among these microservices that have serial dependencies constitute a node service set. Since the above-mentioned node service set is called for a data request from the target user, it is necessary to call each node service sequentially. Each node service depends on the same type of data (e.g., user profile) to obtain the data fed back by each node service.

[0049] It should be noted that each level of node service in the set of node services with serial dependencies in the embodiments of this application may include at least one node service, that is, a node service may send data requests to multiple lower-level node services, and multiple lower-level node services may send feedback data to the same upper-level node service.

[0050] It should also be noted that the set of node services and the services that each node service depends on in this embodiment can be set on the same server or on different servers. That is, the same server can be used as the execution subject of this embodiment, and a server cluster composed of multiple servers can also be used as the execution subject of this embodiment.

[0051] Step 102: Determine whether the first data request contains shared dependency data.

[0052] In this embodiment, shared dependency data refers to data that multiple node services in the node service set commonly depend on. For example, if each node service with a sequential dependency relationship depends on user profile data to obtain information for recommendations to users, then this user profile data is the shared dependency data.

[0053] When the target node service receives the first data request, it can parse the first data request and determine whether there is shared dependency data from a certain part of it (such as the request header).

[0054] Step 103: If shared dependency data is included, extract the shared dependency data from the first data request.

[0055] In this embodiment, if the first data request contains shared dependency data, it indicates that the target node service is not a first-level node service, and its superior node service has pre-stored the shared dependency data in the first data request sent by the superior node service. The target node service can then execute the corresponding function to extract the shared dependency data from the first data request. Optionally, the shared dependency data can be compressed data, and the target node service can decompress the compressed data to obtain the shared dependency data.

[0056] like Figure 3 As shown, it illustrates a schematic diagram of the data transmission process of a set of node services with relational dependencies according to an embodiment of this application. Figure 3 If the data requests received by nodes 3-n contain shared dependency data, then the shared dependency data can be extracted directly from them without calling the dependency service.

[0057] Step 104: Based on the shared dependency data, generate the local feedback data corresponding to the target node service, and send the local feedback data to the upper-level node service of the target node service.

[0058] In this embodiment, the target node service can execute corresponding functions and generate corresponding feedback data as local feedback data. For example, such as... Figure 2 In the application scenario shown, any one of the microservices such as page navigation service, page service, and tab service can generate feedback data to be displayed to the target user based on shared dependency data (such as user profile data). It can also utilize data from lower-level node services to generate feedback data for display to the target user. Since the target node service is not a first-level node service, the generated local feedback data can be sent to the upper-level node service, which will then further generate its own feedback data.

[0059] The serial request processing method provided in this application embodiment receives a first data request from a target node service in a set of node services with serial dependencies. If the first data request contains shared dependency data, the shared dependency data is extracted from the first data request. Then, based on the shared dependency data, local feedback data corresponding to the target node service is generated and sent to the parent node service of the target node service. This enables node services to extract shared dependency data from the first data request in scenarios where multiple node services are serially called, without each node service calling the underlying service to obtain shared dependency data. This avoids excessive bandwidth consumption caused by multiple node services repeatedly requesting data and improves the efficiency of data request. Furthermore, since the data request in this application embodiment is a request issued for a single operation by the target user, the requested shared dependency data is the same for each node, unlike the cache in existing technologies that is set for different requests sent by the user at different times. Therefore, it can solve the problem of inconsistency between the called data and the actual required data.

[0060] In some optional implementations of this embodiment, such as Figure 4 As shown, step 104 includes:

[0061] Step 1041: If the target node service is not the last-level node service in the node service set, generate a second data request based on the shared dependency data and send the second data request to the lower-level node service of the target node service.

[0062] like Figure 3 As shown, nodes 3 to n-1 are not the last-level node services, and all of them can extract shared dependency data from the data requests sent by the upper-level node services. Therefore, a new data request can be generated based on the shared dependency data as a second data request. This second data request is used to call the lower-level node to access and obtain the feedback data from the lower-level node access.

[0063] Step 1042: Receive feedback data from the lower-level node service.

[0064] Lower-level node services can use the received shared dependency data to perform corresponding functions, generate feedback data to be provided to the target user as lower-level feedback data, and then return the lower-level feedback data to the target node service.

[0065] Step 1043: Based on the feedback data from the lower level, generate the feedback data for the target node service at this level.

[0066] In this embodiment, when the target node service is not the last-level node service, a new data request is automatically generated based on the shared dependency service sent by the upper-level node service, and the data request is sent to the lower-level node service. This realizes that the same shared dependency service is sent to each level of node service in a serial manner. The lower-level node service does not need to call the dependency service again to obtain the shared dependency data, thereby saving the data traffic consumed in obtaining the shared dependency data and improving the efficiency of requesting data.

[0067] In some optional implementations of this embodiment, such as Figure 5 As shown, step 103 includes:

[0068] Step 1031: Extract compressed data from the target area of ​​the first data request.

[0069] The compressed data mentioned above refers to the shared dependency data that the parent node service of the target node service has pre-compressed and then stored in the target part of the first data request. The target part can be any part of the first data request, such as the request header.

[0070] Step 1032: Decompress the compressed data to obtain shared dependency data.

[0071] It should be noted that the target node service in this embodiment can be any node service other than the first-level node. Therefore, when the target node obtains the shared dependency data and generates a new data request for calling the lower-level node service, it can re-compress the shared dependency data and put it into the target part of the new data request.

[0072] This embodiment stores compressed data of shared dependency data in the target part of the first data request, thereby minimizing the amount of data transmitted during serial transmission of shared dependency data, which helps to further reduce data transmission traffic and improve the efficiency of data request.

[0073] In some optional implementations of this embodiment, such as Figure 6 As shown, after step 102, the method further includes:

[0074] Step 105: If the first data request does not contain shared dependency data, and the target node service requires shared dependency data, determine the shared dependency service corresponding to the node service set.

[0075] Specifically, the shared dependency services corresponding to the node service set can be pre-defined. When the target node service determines that the first data request it receives does not contain shared dependency data, it can determine whether the requested data needs to call the shared dependency service based on the type of data requested by the first data request. If so, it can determine which service is the pre-defined shared dependency service.

[0076] like Figure 3 As shown, Node 1 is the first node service in the set of node services with serial dependencies. The data it needs does not belong to the shared dependency service, so it obtains the data it needs from dependency service 1. Node 1 generates a data request and sends it to Node 2. Node 2 determines that the received data request does not contain shared dependency data, and that the shared dependency service needs to obtain the data from dependency service 2. Therefore, it determines that dependency service 2 is the shared dependency service.

[0077] Step 106: Call the shared dependency service to obtain shared dependency data.

[0078] like Figure 3 As shown, when node 2 is the target node service, node 2 can further call the shared dependency service to obtain the shared dependency data it needs.

[0079] Step 107: Generate a third data request based on shared dependency data.

[0080] Step 108: Send the third data request to the subordinate node service of the target node service.

[0081] like Figure 3 As shown, node 2 stores the shared dependency data into the generated data request, which can then serve as the third data request. The third data request is then sent to node 3. Node 3 generates a new data request based on the shared dependency data and sends it to node 4, and so on, until node n obtains the shared dependency data and executes the corresponding function.

[0082] This embodiment achieves the goal of requiring only one node service to call the shared dependency service when the first data request received by the target node service does not contain shared dependency data but requires it. The shared dependency data is then sent sequentially to the lower-level node services. This reduces the number of calls to the shared dependency service, improves the efficiency of data request, and reduces data transmission traffic.

[0083] In some optional implementations of this embodiment, such as Figure 7 As shown, the method also includes:

[0084] Step 109: Receive feedback data from the lower-level node services sent by the lower-level node services in the first-level node service set.

[0085] like Figure 3 As shown, Node 1 is the first-level node service. The feedback data generated by each lower-level node after Node 1 can be fed back to the upper-level node. Finally, Node 1 receives the lower-level feedback data sent by Node 2.

[0086] Step 110: Based on the feedback data from the lower level, generate the feedback data corresponding to the first-level node service and send the feedback data to the target user terminal.

[0087] like Figure 3 As shown, Node 1 processes the received feedback data from the lower level to obtain its own feedback data, and then sends the feedback data to the target user terminal. The target user terminal can use the received feedback data from Node 1 to perform processing such as display, calculation, and forwarding.

[0088] For example, in Figure 2 In the application scenario shown, the page navigation service can generate page navigation data to be displayed to the user based on the feedback data received from the subordinate service, and return the page navigation data to the target user for display.

[0089] In this embodiment, the data requested by the target user is fed back to the target user by the first-level node service in the node service set. Since each level of service node in the request link only needs to call the shared dependency service once, the traffic consumed by the entire link is reduced and the efficiency of returning the requested data to the target user is improved.

[0090] Figure 8 This is a schematic diagram of a serial request processing apparatus provided in an embodiment of this application. Specifically, it includes: a first receiving module 801, configured to receive a first data request using a target node service in a node service set, wherein the node services in the node service set have a serial dependency relationship, and the first data request is used to extract data required by the target user; a first determining module 802, configured to determine whether the first data request contains shared dependency data, wherein the shared dependency data is data commonly depended upon by each node service in the node service set; an extraction module 803, configured to extract the shared dependency data from the first data request if it contains shared dependency data; and a first generating module 804, configured to generate local feedback data corresponding to the target node service based on the shared dependency data, and send the local feedback data to the parent node service of the target node service.

[0091] In some optional implementations of this embodiment, the first generation module includes: a first generation unit, configured to generate a second data request based on shared dependency data if the target node service is not the last-level node service in the node service set, and send the second data request to the lower-level node service of the target node service; a receiving unit, configured to receive the lower-level feedback data sent by the lower-level node service; and a second generation unit, configured to generate the current-level feedback data corresponding to the target node service based on the lower-level feedback data.

[0092] In some optional implementations of this embodiment, the extraction module includes: an extraction unit for extracting compressed data from the target location of the first data request; and a decompression unit for decompressing the compressed data to obtain shared dependency data.

[0093] In some optional implementations of this embodiment, the apparatus further includes: a second determining module, configured to determine the shared dependency service corresponding to the node service set if the target node service does not contain shared dependency data and requires shared dependency data; a calling module, configured to call the shared dependency service to obtain the shared dependency data; a second generating module, configured to generate a third data request based on the shared dependency data; and a sending module, configured to send the third data request to the subordinate node service of the target node service.

[0094] In some optional implementations of this embodiment, the device further includes: a second receiving module, configured to receive lower-level feedback data sent by a lower-level node service of the first-level node service using a first-level node service in the node service set; and a third generating module, configured to generate local feedback data corresponding to the first-level node service based on the lower-level feedback data, and send the local feedback data to the target user terminal.

[0095] The serial request processing device provided in this embodiment can be as follows: Figure 8 The serial request processing device shown can execute all the steps of the above serial request processing methods, thereby achieving the technical effects of the above serial request processing methods. For details, please refer to the above descriptions. For the sake of brevity, it will not be elaborated here.

[0096] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 9 The illustrated electronic device 900 includes at least one processor 901, a memory 902, at least one network interface 904, and other user interfaces 903. The various components in the electronic device 900 are coupled together via a bus system 905. It is understood that the bus system 905 is used to implement communication between these components. In addition to a data bus, the bus system 905 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 9The general labeled all buses as Bus System 905.

[0097] The user interface 903 may include a display, keyboard, or clicking device (e.g., mouse, trackball, touchpad, or touchscreen).

[0098] It is understood that the memory 902 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 902 described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0099] In some implementations, memory 902 stores elements, executable units or data structures, or subsets thereof, or extended sets thereof: operating system 9021 and application program 9022.

[0100] The operating system 9021 includes various system programs, such as the framework layer, core library layer, and driver layer, used to implement various basic business functions and handle hardware-based tasks. The application program 9022 includes various applications, such as a media player and a browser, used to implement various application functions. The program implementing the method of this application embodiment can be included in the application program 9022.

[0101] In this embodiment, by calling the program or instructions stored in memory 902, specifically the program or instructions stored in application program 9022, processor 901 executes the method steps provided in each method embodiment, including, for example:

[0102] The system receives a first data request from a target node service in a set of node services, where the node services in the set have a sequential dependency relationship. The first data request is used to extract the data required by the target user. The system then determines whether the first data request contains shared dependency data, where shared dependency data is data that each node service in the set of node services commonly depends on. If shared dependency data is included, the system extracts the shared dependency data from the first data request. Based on the shared dependency data, the system generates local feedback data corresponding to the target node service and sends the local feedback data to the parent node service of the target node service.

[0103] The methods disclosed in the embodiments of this application can be applied to or implemented by processor 901. Processor 901 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware or by instructions in the form of software in processor 901. The processor 901 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or can be executed by a combination of hardware and software units in the decoding processor. The software units may be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 902. Processor 901 reads the information in memory 902 and, in conjunction with its hardware, completes the steps of the above method.

[0104] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described above in this application, or combinations thereof.

[0105] For software implementation, the techniques described herein can be implemented by units that perform the functions described above. The software code can be stored in memory and executed by a processor. The memory can be implemented within the processor or external to the processor.

[0106] The electronic device provided in this embodiment may be as follows: Figure 9 The electronic device shown can execute all the steps of the serial request processing methods described above, thereby achieving the technical effects of the serial request processing methods described above. For details, please refer to the relevant descriptions above. For the sake of brevity, further details are not provided here.

[0107] This application also provides a storage medium (computer-readable storage medium). This storage medium stores one or more programs. The storage medium may include volatile memory, such as random access memory; it may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid-state drive; and it may also include combinations of the above types of memory.

[0108] When one or more programs in the storage medium can be executed by one or more processors to implement the serial request processing method described above that is executed on the electronic device side.

[0109] The processor described above is used to execute a program stored in memory to implement the following steps of a serial request processing method executed on the electronic device side:

[0110] The system receives a first data request from a target node service in a set of node services, where the node services in the set have a sequential dependency relationship. The first data request is used to extract the data required by the target user. The system then determines whether the first data request contains shared dependency data, where shared dependency data is data that each node service in the set of node services commonly depends on. If shared dependency data is included, the system extracts the shared dependency data from the first data request. Based on the shared dependency data, the system generates local feedback data corresponding to the target node service and sends the local feedback data to the parent node service of the target node service.

[0111] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different circuits to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0112] The steps of the circuits or algorithms described in connection with the embodiments disclosed herein can be implemented in hardware, software modules executed by a processor, or a combination of both. The software modules can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art.

[0113] It should be understood that the terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “described” as used herein may also mean including the plural forms. The terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore indicate the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The circuit steps, processes, and operations described herein are not construed as requiring them to be performed in a particular order described or illustrated unless the order of execution is explicitly indicated. It should also be understood that additional or alternative steps may be used.

[0114] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A serial request processing method, characterized in that, The method includes: The first data request is received using the target node service in the node service set, wherein the node services in the node service set have a serial dependency relationship, and the first data request is used to extract the data required by the target user. Determine whether the first data request contains shared dependency data, wherein the shared dependency data is data that each node service in the node service set commonly depends on; If the shared dependency data is included, extract the shared dependency data from the first data request; Based on the shared dependency data, local feedback data corresponding to the target node service is generated, and the local feedback data is sent to the parent node service of the target node service.

2. The method according to claim 1, characterized in that, The step of generating local feedback data corresponding to the target node service based on the shared dependency data includes: If the target node service is not the last-level node service in the node service set, a second data request is generated based on the shared dependency data, and the second data request is sent to the lower-level node service of the target node service; Receive feedback data from lower-level node services; Based on the lower-level feedback data, the corresponding local-level feedback data for the target node service is generated.

3. The method according to claim 1, characterized in that, Extracting the shared dependency data from the first data request includes: Extract compressed data from the target location of the first data request; The compressed data is decompressed to obtain the shared dependency data.

4. The method according to any one of claims 1-3, characterized in that, After determining whether the first data request contains shared dependency data, the method further includes: If the shared dependency data is not included, and the target node service requires the shared dependency data, determine the shared dependency service corresponding to the node service set; Invoke the shared dependency service to obtain the shared dependency data; Based on the shared dependency data, a third data request is generated; The third data request is sent to the subordinate node service of the target node service.

5. The method according to claim 4, characterized in that, The method further includes: The first-level node service in the node service set is used to receive the lower-level feedback data sent by the lower-level node service of the first-level node service; Based on the lower-level feedback data, local feedback data corresponding to the first-level node service is generated, and the local feedback data is sent to the target user terminal.

6. A serial request processing apparatus, characterized in that, The device includes: The first receiving module is used to receive a first data request using a target node service in a node service set, wherein the node services in the node service set have a serial dependency relationship, and the first data request is used to extract data required by the target user terminal. The first determining module is used to determine whether the first data request contains shared dependency data, wherein the shared dependency data is data that each node service in the node service set commonly depends on; The extraction module is configured to extract the shared dependency data from the first data request if the shared dependency data is included. The first generation module is used to generate local feedback data corresponding to the target node service based on the shared dependency data, and send the local feedback data to the parent node service of the target node service.

7. The apparatus according to claim 6, characterized in that, The first generation module includes: The first generation unit is configured to generate a second data request based on the shared dependency data if the target node service is not the last-level node service in the node service set, and send the second data request to the lower-level node service of the target node service. The receiving unit is used to receive feedback data sent by the lower-level node service. The second generation unit is used to generate the local feedback data corresponding to the target node service based on the lower-level feedback data.

8. The apparatus according to claim 6, characterized in that, The extraction module includes: Extraction unit, used to extract compressed data from the target area of ​​the first data request; The decompression unit is used to decompress the compressed data to obtain the shared dependency data.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor is configured to execute a computer program stored in the memory, wherein when the computer program is executed, it implements the serial request processing method according to any one of claims 1-5.

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

Citation Information

Patent Citations

  • Data processing method and device applied to distributed system

    CN112995301A

  • Service calling method and device, electronic equipment and computer readable storage medium

    CN115866056A