A data processing method, device and electronic equipment

By monitoring and generalizing the operating parameters of the business server, we achieved traffic splitting and caching when requests exceeded the API's capacity limit, solving the problem of service interruption in Internet scenarios and optimizing user experience and server load.

CN116506657BActive Publication Date: 2026-01-23JUHAOKAN TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211091279.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-07
Publication Date
2026-01-23
Estimated Expiration
2042-09-07

AI Technical Summary

Technical Problem

In internet scenarios, when user requests to access the homepage or media asset details page exceed the API capacity of the business application interface, it can easily lead to service interruption.

Method used

By monitoring the operating parameters of the business server, generalization processing is performed to determine the target identifier, and the data types that can be processed are determined based on the operating parameters. This enables the routing and caching of user requests, thus avoiding overload of the business server.

Benefits of technology

This effectively prevents service interruptions caused by requests exceeding the API's capacity limit, optimizes the user experience, and reduces the operational pressure on business servers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116506657B_ABST
    Figure CN116506657B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data processing method and device and electronic equipment, relating to the technical field of Internet, and is used to solve the problem of how to prevent service interruption when the request for accessing the home page or the detail page of a certain media asset exceeds the upper limit of the business application program interface (API). The method comprises the following steps: receiving a user request sent by a gateway; obtaining a running parameter of a business server; performing generalization processing on the user request to determine a target identifier corresponding to the user request after generalization processing; determining a first data type corresponding to the target identifier according to the target identifier; determining a second data type that can be processed according to the running parameter when the running parameter meets a preset condition; obtaining business data of the user request from the business server when the first data type and the second data type are different; and sending first display information carrying the business data to a display device through the gateway.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of Internet, and particularly relates to a data processing method and device and electronic equipment. BACKGROUND

[0002] In an Internet scenario, a user accesses a homepage, a detail page and the like core content access scenarios on a display device, such as a homepage displayed by a television after startup, or a detail page of a certain media asset displayed by the television when the user selects the detail of the media asset on the television. At this time, if the request for accessing the homepage or the detail page of the certain media asset exceeds the upper limit of a business application program interface (API), a service interruption may occur.

[0003] Therefore, how to prevent the service interruption in the case that the request for accessing the homepage or the detail page of the certain media asset exceeds the upper limit of the business application program interface (API) has become a problem to be solved urgently. SUMMARY

[0004] In order to solve the above technical problems, the present disclosure provides a data processing method, device and electronic equipment.

[0005] The technical solution of the present disclosure is as follows:

[0006] In a first aspect, the present disclosure provides a data processing method, comprising: receiving a user request sent by a gateway; wherein the user request is sent by a display device to the gateway when the display device accesses a target service, and the user request at least includes a user account and a device identification code; obtaining a running parameter of a service server; performing generalization processing on the user request to determine a target identification corresponding to the user request after the generalization processing; wherein one user account corresponds to one account type, and the target identification, the account type and the device identification code are in one-to-one correspondence; determining a first data type corresponding to the target identification according to the target identification; in the case that the running parameter meets a preset condition, determining a second data type that can be processed according to the running parameter; in the case that the first data type and the second data type are different, obtaining service data of the user request from the service server; and sending first display information carrying the service data to the display device through the gateway.

[0007] In a second aspect, the present disclosure provides a data processing apparatus, comprising: a receiving unit configured to receive a user request sent by a gateway; wherein the user request is sent by a display device to the gateway when the display device accesses a target service, and the user request comprises at least a user account and a device identification code; an obtaining unit configured to obtain an operation parameter of a service server; and a processing unit configured to perform generalization processing on the user request received by the receiving unit, and determine a target identification corresponding to the user request after the generalization processing; wherein one user account corresponds to one account type, and the target identification, the account type and the device identification code correspond to each other in one-to-one manner; the processing unit is further configured to determine a first data type corresponding to the target identification according to the target identification; the processing unit is further configured to determine a second data type that can be processed according to the operation parameter obtained by the obtaining unit, in a case where the operation parameter obtained by the obtaining unit meets a preset condition; the processing unit is further configured to obtain service data of the user request from the service server, in a case where the first data type and the second data type are different; and the processing unit is further configured to control a sending unit to send first display information carrying the service data to the display device through the gateway.

[0008] In a third aspect, the present disclosure provides an electronic device, comprising: a memory configured to store a computer program; and a processor configured to, when executing the computer program, cause the electronic device to implement any one of the data processing methods provided in the first aspect.

[0009] In a fourth aspect, the present disclosure provides a computer readable storage medium, which stores a computer program, and when the computer program is executed by a computing device, causes the computing device to implement any one of the data processing methods provided in the first aspect.

[0010] In a fifth aspect, the present disclosure provides a computer program product, which, when executed on a computer, causes the computer to perform any one of the data processing methods provided in the first aspect.

[0011] It should be noted that the above computer instructions can be stored on the first computer readable storage medium in whole or in part. The first computer readable storage medium can be packaged together with the processor of the data processing apparatus, or can be packaged separately from the processor of the data processing apparatus, and the present disclosure does not limit the same.

[0012] The description of the second aspect, the third aspect, the fourth aspect and the fifth aspect in the present disclosure can refer to the detailed description of the first aspect; and the beneficial effects of the description of the second aspect, the third aspect, the fourth aspect and the fifth aspect can refer to the beneficial effect analysis of the first aspect, which will not be described here again.

[0013] In this disclosure, the names of the above-mentioned data processing apparatuses do not constitute a limitation on the devices or functional modules themselves, and in actual implementation, these devices or functional modules can appear under other names. As long as the functions of the respective devices or functional modules are similar to those of this disclosure, they fall within the scope of the claims of this disclosure and equivalent technologies.

[0014] These aspects or other aspects of the present disclosure will be more fully understood in the following description.

[0015] The technical solutions provided by the present disclosure have the following advantages compared with the prior art:

[0016] In order to be able to receive multiple requests for accessing the home page or accessing the detail page of a certain media asset by the business server at the same time, or in the case that the number of requests exceeds the upper limit of the business application program interface API, the data processing method provided by the embodiments of the present disclosure monitors the running parameters of the business server, so that after receiving the user request sent by the gateway, the user request is processed by generalization, and the target identifier corresponding to the user request after generalization is determined. In this way, the target identifier can be used to determine the first data type corresponding to the target identifier; when the running parameters meet the preset conditions, such as when the running parameters include CPU occupancy, the CPU occupancy is greater than a preset threshold, or when the running parameters include the access amount, the access amount is greater than a target threshold, at this time, it indicates that the load of the business server is large, or the business server is abnormal. Therefore, the second data type that needs to be processed at present needs to be determined according to the running parameters. If the first data type and the second data type are the same, the business server does not need to process the target business of the first data type at this time; if the first data type and the second data type are different, the business server needs to process the target business of the first data type at this time. In this way, it can be prevented that the business server receives multiple requests for accessing the home page or accessing the detail page of a certain media asset, which exceeds the upper limit of the business application program interface API, and service interruption occurs. The problem of how to prevent service interruption in the case that the number of requests for accessing the home page or accessing the detail page of a certain media asset exceeds the upper limit of the business application program interface API is solved. BRIEF DESCRIPTION OF DRAWINGS

[0017] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the accompanying drawings needed in the embodiments or the prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained without creative labor.

[0019] Figure 1 One of the flowcharts of the data processing method provided by the embodiment of the present application;

[0020] Figure 2 One of the structural diagrams of the display device in the data processing method provided by the embodiment of the present application;

[0021] Figure 3 The second structural diagram of the display device in the data processing method provided by the embodiment of the present application;

[0022] Figure 4 One of the flowcharts of the data processing method provided by the embodiment of the present application;

[0023] Figure 5 The schematic diagram of the individual recommendation data in the data processing method provided by the embodiment of the present application;

[0024] Figure 6 The schematic diagram of the user portrait data in the data processing method provided by the embodiment of the present application;

[0025] Figure 7 The schematic diagram of the user customization data in the data processing method provided by the embodiment of the present application;

[0026] Figure 8 The second flowchart of the data processing method provided by the embodiment of the present application;

[0027] Figure 9 The third flowchart of the data processing method provided by the embodiment of the present application;

[0028] Figure 10 The fourth flowchart of the data processing method provided by the embodiment of the present application;

[0029] Figure 11 The fifth flowchart of the data processing method provided by the embodiment of the present application;

[0030] Figure 12 The sixth flowchart of the data processing method provided by the embodiment of the present application;

[0031] Figure 13 The seventh flowchart of the data processing method provided by the embodiment of the present application. DETAILED DESCRIPTION

[0032] In order to more clearly understand the above-mentioned purposes, features and advantages of the present disclosure, the schemes of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0033] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0034] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0035] Figure 1 This is a schematic diagram illustrating an operational scenario between a display device and a control device according to one or more embodiments of this application, such as... Figure 1 As shown, a user can operate the display device 200 via a mobile terminal 300 and a control device 100. The control device 100 can be a remote control, and communication between the remote control and the display device includes infrared protocol communication, Bluetooth protocol communication, wireless or other wired methods to control the display device 200. The user can input user commands through buttons on the remote control, voice input, control panel input, etc., to control the display device 200. In some embodiments, a mobile terminal, tablet computer, computer, laptop computer, and other smart devices can also be used to control the display device 200.

[0036] In some embodiments, the mobile terminal 300 can install software applications with the display device 200 to achieve connection and communication via network communication protocols, enabling one-to-one control operations and data communication. It can also transmit audio and video content displayed on the mobile terminal 300 to the display device 200 for synchronous display. The display device 200 can also communicate with the display device 200 via various communication methods. It can be allowed to communicate via a local area network (LAN), wireless local area network (WLAN), and other networks. The display device 200 can provide various content and interactive features. The display device 200 can be a liquid crystal display, an OLED display, or a projection display device. In addition to providing broadcast television reception functions, the display device 200 can also be equipped with a smart network television function that provides computer support.

[0037] In some embodiments, the electronic device provided in this application can be the display device 200 described above. The display device 200, in response to an access operation for a target service (such as accessing a homepage or accessing media asset details), sends a user request to the fallback server 3 via the gateway 2. After receiving the user request from the gateway, the fallback server 3 obtains the operating parameters of the service server 4. Then, the fallback server 3 performs generalization processing on the user request to determine the target identifier corresponding to the generalized user request. Next, the fallback server 3 determines the first data type corresponding to the target identifier based on the target identifier; if the operating parameters meet preset conditions, the fallback server 3 determines the second data type that can be processed based on the operating parameters. Thus, the fallback server 3 determines whether the service server 4 needs to process the user request based on the first and second data types, thereby reducing the number of user requests processed by the service server 4 and achieving traffic distribution for user requests processed by the service server 4. For example, if the first and second data types are different, the service data of the user request is obtained from the service server. Or, if the first and second data types are the same, redirection information carrying the target identifier is sent to the display device 200 via the gateway 2. After receiving the redirection information sent by gateway 2, display device 200 sends the redirection information to edge server 5. Then, edge server 5, based on the target identifier in the redirection information, determines if cached data corresponding to the target identifier is stored, and sends second display information carrying degraded data to display device 200. Alternatively, if edge server 5 determines that cached data corresponding to the target identifier is not stored, it sends origin information carrying the target identifier to gateway 2. Degrade server 3 receives the origin information carrying the target identifier sent by gateway 2. Based on the target identifier in the origin information, it determines the degraded data. Degrade server 3 sends return information carrying the degraded data to edge server 5. After receiving the return information from degrade server 3, edge server 5 generates cached data corresponding to the degraded data and sends second display information carrying the degraded data to display device 200. Therefore, when the downgraded server 3 receives multiple user requests with the same account type and the same device identifier, since the same account type and the same device identifier correspond to the same target identifier, it can allocate the same business data to user requests with the same account type and the same device identifier, thereby reducing the operating pressure on the business server.

[0038] Figure 2 A hardware configuration block diagram of a display device 200 according to an exemplary embodiment is shown. For example... Figure 2The display device 200 shown includes at least one of the following: a tuner / demodulator 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface 280. The controller includes a central processing unit, a video processor, an audio processor, a graphics processor, RAM, ROM, and a first to nth interface for input / output. The display 260 may be a touch-enabled display, such as a touch screen display. The tuner / demodulator 210 receives broadcast television signals via wired or wireless reception and demodulates audio and video signals, such as EPG data signals, from multiple wireless or wired broadcast television signals. The detector 230 is used to collect signals from the external environment or signals interacting with the external environment. The controller 250 and the tuner / demodulator 210 may be located in different separate devices; that is, the tuner / demodulator 210 may also be located in an external device of the main device containing the controller 250, such as an external set-top box.

[0039] In some embodiments, the controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in memory. The controller 250 controls the overall operation of the display device 200.

[0040] In some examples, the display device 200 of one or more embodiments is a television 1, and the operating system of the television 1 is the Android system, for example... Figure 3 As shown, TV 1 can be logically divided into an application layer (referred to as "application layer") 21, an application framework layer (referred to as "framework layer") 22, an Android runtime and system library layer (referred to as "system runtime library layer") 23, and a kernel layer 24.

[0041] The application layer 21 includes one or more applications. These applications can be system applications or third-party applications. For example, application layer 21 may include a first application that provides video playback functionality. The framework layer 22 provides application programming interfaces (APIs) and programming frameworks for the applications in application layer 21. The system runtime library layer 23 provides support for the upper layer, namely the framework layer 22. When the framework layer 22 is used, the Android operating system runs the C / C++ libraries contained in the system runtime library layer 23 to implement the functions required by the framework layer 22. The kernel layer 24 acts as software middleware between the hardware layer and application layer 21, managing and controlling hardware and software resources.

[0042] In some examples, kernel layer 24 includes a first driver and a second driver. The first driver is used to send user operations collected by detector 230 to a first application, and the second driver is used to control display 260 to display the display information sent by display unit 213.

[0043] The first application on TV 1 is launched. Then, the first driver sends the user operations collected by detector 230 to the first application for identification. Subsequently, the processing unit 212 of the first application responds to the target operation received by receiving unit 210 (e.g., selecting the homepage in the first application). At this time, processing unit 212 controls sending unit 211 to send a user request to fallback server 3 through gateway 2. After determining that receiving unit 200 has received the user request sent by TV 1, processing unit 202 of gateway 2 controls sending unit 201 to fallback server 3. After receiving the user request from gateway 2, the traffic distribution service module 301 of fallback server 3 obtains the operating parameters of service server 4. Then, traffic distribution service module 301 performs generalization processing on the user request to determine the target identifier corresponding to the generalized user request. The traffic distribution service module 301 determines the first data type corresponding to the target identifier based on the target identifier. When the operating parameters meet preset conditions, the traffic distribution service module 301 queries the degradation policy table sent by the degradation policy module 304 based on the operating parameters to determine the second data type that can be processed. Therefore, the traffic distribution service module 301 determines whether the business server 4 needs to process the user request based on the first and second data types. For example, if the first and second data types are different, the business data requested by the user is obtained from the business server 4. Or, if the first and second data types are the same, redirection information carrying the target identifier is sent to the display device 200 through the gateway 2. After receiving the redirection information sent by the gateway 2, the display device 200 sends the redirection information to the edge server 5. Then, the edge server 5, based on the target identifier in the redirection information, if it determines that cached data corresponding to the target identifier is stored, sends second display information carrying degradation data to the display device 200. Or, if the edge server 5, based on the target identifier in the redirection information, determines that cached data corresponding to the target identifier is not stored, it sends origin information of the target identifier to the gateway 2. The traffic splitting service module 301 receives the origin return information carrying the target identifier sent by the gateway 2. Based on the target identifier in the origin return information, it determines the degraded data. The traffic splitting service module 301 sends return information carrying the degraded data to the edge server 5. After receiving the return information sent by the degraded server 3, the edge server 5 generates cached data corresponding to the degraded data and sends second display information carrying the degraded data to the display device 200. When the gateway 2 sends the service data sent by the service server 4 to the display device 200, it uses an asynchronous message mechanism to send the service data to the message subscription module 302 of the degraded server 3. Then, the message subscription module 302 sends the service data to the acquisition service module 302, which determines the time interval based on the current time and the timestamp corresponding to the service data.If the time interval is greater than the time threshold, select one piece of business data from the business data corresponding to the user request with the same target identifier that is returned from the business server 4 between the time corresponding to the timestamp and the current time, and store it in the data storage module 303.

[0044] Specifically, operations and maintenance personnel can modify the degradation policy table according to the actual situation. Afterwards, the operations and maintenance personnel can send the modified degradation policy table to the traffic distribution service module 301 through the degradation policy module 304 to ensure that the degradation policy table stored in the traffic distribution service module 301 can be updated in a timely manner to ensure the user experience.

[0045] Specifically, the system used by the message subscription module 302 can be Apache Kafka.

[0046] Specifically, the electronic device provided in this embodiment may be the aforementioned downgrade server 3, and is not limited here.

[0047] The user requests, business data, operating parameters, and identity information involved in this application can all be data authorized by the user or fully authorized by all parties.

[0048] In the following embodiments, the execution subject of the data processing method provided in this disclosure is the aforementioned downgraded server 3, which will be used as an example to illustrate the method of this application embodiment.

[0049] This application provides a data processing method, such as... Figure 4 As shown, the data processing method may include S11-S17.

[0050] S11. Receive user requests sent by the gateway. The user request is sent to the gateway by the display device when accessing the target service, and the user request includes at least the user account and device identifier.

[0051] In some examples, display devices of the same model have the same device identification code.

[0052] S12. Obtain the operating parameters of the business server.

[0053] S13. Perform generalization processing on the user request to determine the target identifier corresponding to the generalized user request. One user account corresponds to one account type, and the target identifier, account type, and device identifier are in a one-to-one correspondence.

[0054] Specifically, account types include verified accounts and unverified accounts. Verified accounts are those registered using the user's identity information, while unverified accounts are those registered without the user's identity information (e.g., anonymous accounts).

[0055] In some examples, a user request corresponds to a Uniform Resource Locator (URL) that carries the user's account and device identifier. When generalizing the URL, the MD5 message-digest algorithm can be used to process it and obtain its MD5 hash. This MD5 hash is then used to identify the target identifier.

[0056] Specifically, when generalizing user accounts in a URL, if the user account corresponds to an account type that has been verified by real-name authentication, then customerId = 1. Conversely, if the user account corresponds to an account type that has not been verified by real-name authentication, then customerId = 0.

[0057] S14. Determine the first data type corresponding to the target identifier based on the target identifier.

[0058] In some examples, the data processing method provided in this disclosure analyzes the characteristics of operational orchestration and user behavior in internet services, classifying data types into static data, personalized recommendation data, user profile data, and user-customized data. The first data type is any one of static data, personalized recommendation data, user profile data, and user-customized data. The second data type is any one of static data, personalized recommendation data, user profile data, and user-customized data.

[0059] For example, the relational table corresponding to the first data type is shown in Table 1.

[0060] Table 1

[0061]

[0062] Specifically: Anonymous users are users who have not logged into their user accounts on the display device. The business server assigns a default anonymous user identification code (ID) to the display device; Real-name users are users who have logged into their user accounts on the display device. The business server assigns a unique user identification code to the display device.

[0063] Specifically, in contrast to the consistent nature of "static data," both "personalized recommendation data" and "user profile data" produce different business results depending on the real-name user. For hundreds of millions or even billions of internet users, storing a separate set of downgraded data for each user is clearly inappropriate due to storage resource limitations. Therefore, the data processing method provided in this embodiment of the invention samples and stores business data of the same account type and the same device identifier. Since the target identifiers corresponding to the same account type and the same device identifier are the same, and since the target identifiers correspond one-to-one with the stored business data, when the business server load is high (e.g., the central processing unit (CPU) utilization rate exceeds a preset threshold, and / or the access volume exceeds a target threshold), or when the business server malfunctions, the business data corresponding to the target identifier can be directly read from the downgraded server 3. At the same time, different business data can be provided to display devices with different account types and different device identifiers, ensuring a good user experience.

[0064] S15. If the operating parameters meet the preset conditions, determine the second data type that can be processed based on the operating parameters.

[0065] In some examples, the operating parameters include at least one of CPU utilization and access volume. For instance, if the operating parameters include CPU utilization, and the CPU utilization is greater than a preset threshold (e.g., 20%), then the operating parameters are considered to meet the preset conditions. Alternatively, if the operating parameters include access volume, and the access volume is greater than a target threshold (e.g., 10,000), then the operating parameters are considered to meet the preset conditions. Or, if the operating parameters include both CPU utilization and access volume, and the CPU utilization is greater than a preset threshold (e.g., 20%) and the access volume is greater than a target threshold (e.g., 10,000), then the operating parameters are considered to meet the preset conditions.

[0066] In some examples, a degradation policy table is pre-configured in the degradation server. When the running parameters meet the preset conditions, the degradation policy table can be queried based on the running parameters to determine the second data type that can be processed.

[0067] For example, taking the operating parameters including CPU utilization as an example, the degradation strategy table is shown in Table 2.

[0068] Table 2

[0069]

[0070] For example, taking the running parameters including access volume as an example, the degradation policy table is shown in Table 3.

[0071] Table 3

[0072]

[0073] For example, taking operating parameters including CPU utilization and access volume as an example, the degradation policy table is shown in Table 4.

[0074] Table 4

[0075]

[0076] Specifically, the second data type is a data type that the degraded server can process.

[0077] S16. If the first data type and the second data type are different, obtain the business data requested by the user from the business server.

[0078] In some examples, the data processing method provided in this disclosure, in order to ensure that there is no impact on the original business result return, adds an identifier to the returned response header to indicate the first data type, such as JHK-D-Data-Type. When the first data type is user profile data, JHK-D-Data-Type = userpack. In this way, the first data type corresponding to the business data can be determined by parsing the business data.

[0079] S17. Send the first display information carrying business data to the display device through the gateway.

[0080] In some examples, to prevent sudden increases in the load on the business server or in case of a business server malfunction, monitoring the business server's operating parameters can automatically select which user requests to handle—either the business server or a fallback server. For instance, if the operating parameters include CPU utilization, and the CPU utilization is 15%, Table 2 shows that the second data type that can be processed includes static data. In this case, if the first data type is personalized recommendation data, since the first data type is different from the second data type, the user request can be processed through the business server. Alternatively, if the operating parameters include CPU utilization, and the CPU utilization is 30%, Table 2 shows that the second data type that can be processed includes both static data and personalized recommendation data. In this case, if the first data type is personalized recommendation data, since the first data type is the same as the second data type, the user request can be bypassed by the business server, thus achieving request routing.

[0081] Alternatively, if the operating parameters include access volume, and the access volume is 8000, referring to Table 3, we can determine that the second data type that can be processed includes static data. In this case, if the first data type is personalized recommendation data, since the first data type is different from the second data type, user requests can be processed through the business server. Alternatively, if the operating parameters include access volume, and the access volume is 30000, referring to Table 3, we can determine that the second data type that can be processed includes both static data and personalized recommendation data. In this case, if the first data type is personalized recommendation data, since the first data type is different from the second data type, user requests can be processed through the business server, thus achieving request routing.

[0082] Alternatively, if the operating parameters include CPU utilization and access volume, and the CPU utilization is 15% with 8000 accesses, then by referring to Table 4, the second data type that can be processed includes static data. In this case, if the first data type is personalized recommendation data, since the first data type is different from the second data type, user requests can be processed through the business server. Alternatively, if the operating parameters include access volume, and the CPU utilization is 30% with 30000 accesses, then by referring to Table 4, the second data type that can be processed includes both static data and personalized recommendation data. In this case, if the first data type is personalized recommendation data, since the first data type is different from the second data type, user requests can be processed through the business server, thus achieving request routing.

[0083] As can be seen, the data processing method provided in this disclosure monitors the operating parameters of the business server, thereby determining the load of the business server or whether any abnormalities have occurred based on the operating parameters. This allows for the allocation of user requests processed by the business server and the demotion of user requests to the server, achieving load balancing of the business server and preventing users from being unable to access services normally due to a large load on the business server.

[0084] In some feasible examples, combining Figure 4 ,like Figure 8 As shown, the data processing method provided in this embodiment of the disclosure further includes: S18-S21.

[0085] S18. If the first data type and the second data type are the same, send redirection information carrying the target identifier to the display device through the gateway, so that the display device can send the redirection information to the edge server after receiving the redirection information.

[0086] In some examples, after receiving redirection information from the display device, the edge server will query its memory to see if there is cached data corresponding to the target identifier in the redirection information.

[0087] When the edge server determines that the memory contains cached data corresponding to the target identifier, the edge server sends display information carrying the cached data to the display device.

[0088] When the edge server determines that the cached data corresponding to the target identifier is not stored in the memory, it sends origin-fetching information carrying the target identifier to the gateway. The gateway, upon receiving the origin-fetching information from the edge server, forwards it to the degradation server. The degradation server, upon receiving the origin-fetching information from the gateway, determines the degradation data based on the target identifier in the origin-fetching information. It then sends return information carrying the degradation data to the edge server. Upon receiving the return information from the degradation server, the edge server stores the degradation data carried in the return information in its memory, generating cached data. This allows for direct retrieval of the cached data corresponding to the target identifier when the same target identifier is queried again. Simultaneously, the edge server also needs to send second display information carrying the degradation data to the display device.

[0089] Specifically, edge servers can generate Content Delivery Network (CDN) cache data when storing degraded data in storage.

[0090] S19. Receive origin feedback information carrying the target identifier sent by the gateway. The origin feedback information is sent by the edge server to the gateway after receiving the redirection information and determining, based on the target identifier in the redirection information, that no cached data matching the target identifier exists.

[0091] S20. Determine the downgraded data based on the target identifier in the origin information. The downgraded data is one of the business data items returned by the business server corresponding to the user request with the same target identifier.

[0092] S21. Send return information carrying degradation data to the edge server through the gateway, so that the edge server can generate cache data corresponding to the degradation data according to the return information, and send second display information carrying degradation data to the display device.

[0093] In some feasible examples, account types include both verified and unverified accounts, combined with... Figure 8 ,like Figure 9 As shown, the above S20 can be implemented by the following S200 and S201.

[0094] S200. If the account type corresponding to the target identifier is a verified account, convert the account type corresponding to the target identifier to an unverified account.

[0095] S201. If, based on the modified target identifier, it is determined that there is business data corresponding to the modified target identifier, the business data corresponding to the modified target identifier shall be treated as downgraded data.

[0096] In some examples, the traffic distribution service module of the degradation server also includes a back-to-origin interface. This interface determines whether the customerId in the generalized URL is a verified account (e.g., customerId=1 indicates a verified account; customerId=0 indicates an unverified account). Since the degradation data for an unverified account differs little from its actual business data, if the customerId in the generalized URL is determined to be a verified account, it is converted to a generalized URL for an unverified account with customerId=0. This ensures the display quality of the target business page displayed on the display device.

[0097] In one scenario, the origin server uses the MD5 hash of the generic URL associated with the unverified account as the key to query the stored data corresponding to that MD5 hash in the downgrade server's storage. If the downgrade server's storage contains the corresponding MD5 hash, it returns that data to the edge server via the gateway.

[0098] In another scenario, if the downgraded server's memory does not contain storage data corresponding to the 'md5' value, it is necessary to re-query the downgraded server's memory using the 'md5' value corresponding to the generic URL of the verified account (i.e., the target identifier before the change) as the key. If the downgraded server's memory contains storage data corresponding to the 'md5' value, this storage data is returned to the display device. If the downgraded server's memory does not contain storage data corresponding to the 'md5' value, it requests the business data corresponding to the user request from the business server and returns this business data to the edge server through the gateway.

[0099] Specifically, the logic for the downgraded server to query the stored data corresponding to the MD5 value in its storage, or for the downgraded server to request the business data corresponding to the user's request from the business server, is as follows:

[0100] 1. The degradation server first queries its storage for the data corresponding to the MD5 value. If the degradation server's storage contains the corresponding data, it uses this data as degradation data and returns it to the edge server through the gateway. Simultaneously, it adds a "no collection" flag (JHK-D-Collect-Data = 0) and the CDN Time To Live (TTL) validity period to the header of the returned degradation data. Upon receiving the degradation data from the degradation server, the gateway identifies the degradation data header. If JHK-D-Collect-Data = 0, the gateway then sends the degradation data to the edge server.

[0101] If the degradation server's storage does not contain the data corresponding to the MD5 hash, it requests the corresponding business data from the business server. The business server returns business data with an HTTP status code of 200. This returned business data is treated as degradation data and sent back to the edge server via the gateway. Simultaneously, a collection identifier of JHK-D-Collect-Data=1 and the CDN TTL validity period are added to the header of the returned degradation data. Upon receiving the degradation data from the degradation server, the gateway identifies the degradation data header. If JHK-D-Collect-Data=1, the gateway sends the degradation data to the edge server and sends an asynchronous message carrying the degradation data to the degradation server's message subscription module. Subsequently, the message subscription module, upon receiving this asynchronous message, sends the degradation data to the collection server module. If the collection server module determines that the data storage module does not contain the MD5 hash corresponding to the degradation data, it stores the degradation data in the data storage module for subsequent use.

[0102] In some feasible examples, combining Figure 9 ,like Figure 10 As shown, the above S20 can be implemented in the following S202.

[0103] S202. If, based on the changed target identifier, it is determined that there is no downgraded data corresponding to the changed target identifier, and based on the original target identifier, it is determined that there is business data corresponding to the original target identifier, then the business data corresponding to the changed target identifier shall be used as downgraded data.

[0104] In some feasible examples, combining Figure 4 ,like Figure 11 As shown, the above S14 can be implemented by the following S140 and S141.

[0105] S140. Query the database based on the target identifier to determine the stored data corresponding to the target identifier. The stored data is one of the business data returned by the business server corresponding to the user request with the same target identifier.

[0106] For example, the data format for storing data is shown in Table 5.

[0107] Table 5

[0108]

[0109] S141. Based on the stored data, determine the first data type of the stored data.

[0110] In some feasible examples, one stored data item corresponds to one timestamp; combined with Figure 11 ,like Figure 12 As shown, the data processing method provided in this embodiment of the disclosure further includes S22 and S23.

[0111] S22. Determine the time interval based on the current time and the time corresponding to the timestamp.

[0112] S23. If the time interval is greater than the time threshold, select one piece of business data from the business data corresponding to the user request with the same target identifier that is returned from the business server between the time corresponding to the timestamp and the current time.

[0113] In some examples, to ensure the display device can still process business requests normally when the business server is under high load or malfunctions, the data processing method provided in this disclosure involves the gateway sending the business data corresponding to the user request to the display device via an asynchronous message mechanism to the message subscription module of the fallback server. Subsequently, the message subscription module of the fallback server sends the business data to the acquisition service module. To prevent frequent storage of business data in the fallback server's data storage module, the acquisition service module, upon receiving the business data, identifies the data type and the corresponding target identifier (e.g., MD5 hash). Then, the acquisition service module obtains the timestamp of the stored data corresponding to the MD5 hash stored in the data storage module. Subsequently, the acquisition service module determines the time interval by subtracting the current time from the timestamp of the stored data corresponding to the 'md5'. When the time interval is less than or equal to the time threshold, the acquisition service module discards the business data sent by the message subscription module. When the time interval is greater than the time threshold, the acquisition service module sends the business data sent by the message subscription module to the data storage module. After receiving the business data sent by the acquisition service module, the data storage module replaces the stored data corresponding to the 'md5'.

[0114] Specifically, when the acquisition service module sends business data to the data storage module, it can send the first business data with the target identifier "md5" from the message subscription module to the data storage module when the time interval is greater than the time threshold.

[0115] Alternatively, when the acquisition service module sends business data to the data storage module, it can randomly select one of the business data whose target identifier is the md5"' sent by the message subscription module within a preset time when the time interval is greater than the time threshold, and send it to the data storage module.

[0116] In this way, even if the business server is under high load or malfunctions, the degraded server can still process the business requests sent by the display device normally, thus ensuring the user experience.

[0117] In some feasible examples, the operating parameters include at least one of the following: CPU utilization and access volume; combined with Figure 4 ,like Figure 13 As shown, the above S15 can be implemented in the following S150.

[0118] S150. If the operating parameters meet the preset conditions, query the degradation strategy table based on the operating parameters to determine the second data type corresponding to the operating parameters. The degradation strategy table includes the correspondence between operating parameters and the second data type.

[0119] The foregoing mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0120] This application embodiment can divide the data processing device into functional modules according to the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing unit. The integrated modules can be implemented in hardware or as software functional modules. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0121] An embodiment of this application provides a schematic diagram of the structure of a degradation server 3, including a communicator 101 and a processor 102.

[0122] The communicator 101 is used to receive user requests sent by the gateway; wherein the user request is sent to the gateway by the display device when accessing the target service, and the user request includes at least a user account and a device identifier; the communicator 101 is used to obtain the operating parameters of the service server; the processor 102 is used to perform generalization processing on the user request received by the receiving unit to determine the target identifier corresponding to the generalized user request; wherein one user account corresponds to one account type, and the target identifier, account type, and device identifier are in a one-to-one correspondence; the processor 102 is also used to determine the first data type corresponding to the target identifier based on the target identifier; the processor 102 is also used to determine the processable second data type based on the operating parameters when the operating parameters meet preset conditions; the processor 102 is also used to control the communicator 101 to obtain the service data of the user request from the service server when the first data type and the second data type are different; the processor 102 is also used to control the communicator 101 to send the first display information carrying the service data to the display device through the gateway.

[0123] In some implementable examples, processor 102 is further configured to, when the first data type and the second data type are the same, control communicator 101 to send redirection information carrying a target identifier to the display device through the gateway, so that the display device, upon receiving the redirection information, sends the redirection information to the edge server; communicator 101 is further configured to receive origin information carrying a target identifier sent by the gateway; wherein, the origin information is sent by the edge server to the gateway after receiving the redirection information and determining, based on the target identifier in the redirection information, that there is no cached data matching the target identifier; processor 102 is further configured to, based on the target identifier in the origin information received by communicator 101, determine degraded data; wherein, the degraded data is one of the service data corresponding to the user request with the same target identifier returned by the service server; processor 102 is further configured to, control communicator 101 to send return information carrying degraded data to the edge server, so that the edge server, based on the return information, generates cached data corresponding to the degraded data and sends second display information carrying the degraded data to the display device.

[0124] In some feasible examples, the account type includes real-name accounts and unreal-name accounts; processor 102 is specifically used to convert the account type corresponding to the target identifier in the source information received by communicator 101 to an unreal-name account when the account type corresponding to the target identifier is a real-name account; processor 102 is specifically used to use the business data corresponding to the changed target identifier as downgraded data when it is determined that there is business data corresponding to the changed target identifier based on the changed target identifier.

[0125] In some implementable examples, processor 102 is specifically configured to, based on the modified target identifier, determine that there is no degraded data corresponding to the modified target identifier, and based on the original target identifier, determine that there is business data corresponding to the original target identifier, and then use the business data corresponding to the modified target identifier as degraded data.

[0126] In some implementable examples, processor 102 is specifically used to query the database based on the target identifier to determine the stored data corresponding to the target identifier; wherein, the stored data is one of the business data corresponding to the user request with the same target identifier returned by the business server; processor 102 is specifically used to determine the first data type of the stored data based on the stored data.

[0127] In some feasible examples, one stored data corresponds to one timestamp; the processor 102 is also configured to determine the time interval based on the current time and the time corresponding to the timestamp; the processor 102 is also configured to control the communicator 101 to select one piece of business data as stored data from the business data corresponding to the user request with the same target identifier that is returned from the business server between the time corresponding to the timestamp and the current time if the time interval is greater than a time threshold.

[0128] In some feasible examples, the operating parameters include at least one of the central processing unit (CPU) utilization and access volume; the processor 102 is specifically used to query the degradation policy table according to the operating parameters to determine the second data type corresponding to the operating parameters when the operating parameters obtained by the communicator 101 meet the preset conditions; wherein, the degradation policy table includes the correspondence between the operating parameters and the second data type.

[0129] All relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and their functions will not be repeated here.

[0130] Of course, the downgrade server 3 provided in this application embodiment includes, but is not limited to, the modules described above. For example, the downgrade server 3 may also include a memory 103. The memory 103 may be used to store the program code of the downgrade server 3, and may also be used to store data generated by the downgrade server 3 during operation, such as data in write requests.

[0131] As an example, combined Figure 3 The message subscription module 302 and the degradation strategy module 304 in the degradation server 3 have the same function as the communicator 101. The functions of the traffic distribution service module 301 and the acquisition service module 302 are the same as those of the processor 102. The functions of the display unit 212 are the same as those of the display 103. The functions of the data storage module 303 are the same as those of the memory 103.

[0132] This application also provides a chip system that can be applied to the degradation server 3 in the aforementioned embodiments. The chip system includes at least one processor 1501 and at least one interface circuit 1502. The processor 1501 can be the processor in the degradation server 3. The processor 1501 and the interface circuit 1502 can be interconnected via a line. The processor 1501 can receive and execute computer instructions from the memory of the degradation server 3 through the interface circuit 1502. When the computer instructions are executed by the processor 1501, the degradation server 3 can perform the various steps executed by the degradation server 3 in the aforementioned embodiments. Of course, the chip system may also include other discrete devices, which are not specifically limited in this application.

[0133] This application also provides a computer-readable storage medium for storing computer instructions executed by the aforementioned downgraded server 3.

[0134] This application also provides a computer program product, including computer instructions for running the aforementioned downgrade server 3.

[0135] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. 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 disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data processing method, characterized in that, include: Receive user requests sent by the gateway; wherein, the user request is sent to the gateway by the display device when accessing the target service, and the user request includes at least a user account and a device identifier; Obtain the operating parameters of the business server; The user request is generalized to determine the target identifier corresponding to the generalized user request; wherein, one user account corresponds to one account type, and the target identifier, account type and device identifier code are in one-to-one correspondence; Based on the target identifier, determine the first data type corresponding to the target identifier; wherein, the first data type is any one of static data, personalized recommendation data, user profile data, and user-customized data. If the operating parameters meet the preset conditions, a second data type that can be processed is determined based on the operating parameters; wherein, the second data type is any one of the static data, personalized recommendation data, user profile data, and user-customized data; If the first data type and the second data type are different, the business data requested by the user is obtained from the business server; The gateway sends first display information carrying the service data to the display device. When the first data type and the second data type are the same, the gateway sends redirection information carrying the target identifier to the display device, so that the display device can send the redirection information to the edge server after receiving the redirection information; The edge server receives origin retrieval information carrying the target identifier from the gateway; wherein the origin retrieval information is sent to the gateway by the edge server after receiving the redirection information and determining, based on the target identifier in the redirection information, that there is no cached data matching the target identifier. Based on the target identifier in the source information, the downgraded data is determined; wherein, the downgraded data is one of the business data corresponding to the user request with the same target identifier returned by the business server; The gateway sends a return message carrying the degraded data to the edge server, so that the edge server can generate cached data corresponding to the degraded data based on the return message, and send second display information carrying the degraded data to the display device.

2. The data processing method according to claim 1, characterized in that, The account types include verified accounts and unverified accounts; The step of determining the downgraded data based on the target identifier in the source information includes: If the account type corresponding to the target identifier in the source information is a real-name account, the account type corresponding to the target identifier is converted to an unreal-name account. If, based on the modified target identifier, it is determined that there is business data corresponding to the modified target identifier, then the business data corresponding to the modified target identifier shall be used as the downgraded data.

3. The data processing method according to claim 2, characterized in that, The method further includes: If, based on the modified target identifier, it is determined that there is no downgraded data corresponding to the modified target identifier, and based on the original target identifier, it is determined that there is business data corresponding to the original target identifier, then the business data corresponding to the modified target identifier shall be used as the downgraded data.

4. The data processing method according to claim 1, characterized in that, The step of determining the first data type corresponding to the target identifier based on the target identifier includes: A query is performed in the database based on the target identifier to determine the stored data corresponding to the target identifier; wherein, the stored data is one of the business data corresponding to the user request with the same target identifier returned by the business server; Based on the stored data, determine the first data type of the stored data.

5. The data processing method according to claim 4, characterized in that, One stored data item corresponds to one timestamp; The step of querying the database based on the target identifier to determine the stored data corresponding to the target identifier includes: The time interval is determined based on the current time and the time corresponding to the timestamp. If the time interval is greater than a time threshold, one piece of business data is selected from the business data corresponding to the user request with the same target identifier that is returned from the business server between the time corresponding to the timestamp and the current time, and is used as the stored data.

6. The data processing method according to claim 1, characterized in that, The operating parameters include at least one of the central processing unit CPU utilization and access volume; The step of determining the processable second data type based on the operating parameters when the operating parameters meet preset conditions includes: If the operating parameters meet the preset conditions, the degradation strategy table is queried according to the operating parameters to determine the second data type corresponding to the operating parameters; wherein, the degradation strategy table includes the correspondence between operating parameters and the second data type that can be processed.

7. A data processing apparatus, characterized in that, include: A receiving unit is used to receive user requests sent by a gateway; wherein the user request is sent to the gateway by the display device when accessing the target service, and the user request includes at least a user account and a device identifier code; The acquisition unit is used to acquire the operating parameters of the business server; The processing unit is used to perform generalization processing on the user request received by the receiving unit and determine the target identifier corresponding to the generalized user request; wherein, one user account corresponds to one account type, and the target identifier, account type and device identifier code are in one-to-one correspondence; The processing unit is further configured to determine a first data type corresponding to the target identifier based on the target identifier; wherein the first data type is any one of static data, personalized recommendation data, user profile data, and user-customized data; The processing unit is further configured to determine a second data type that can be processed based on the operating parameters obtained by the acquisition unit, provided that the operating parameters obtained by the acquisition unit meet preset conditions; wherein the second data type is any one of static data, personalized recommendation data, user profile data, and user-customized data. The processing unit is further configured to obtain the user-requested business data from the business server when the first data type and the second data type are different. The processing unit is further configured to control the sending unit to send first display information carrying the service data to the display device through the gateway; The processing unit is further configured to send redirection information carrying the target identifier to the display device through the gateway when the first data type and the second data type are the same, so that the display device can send the redirection information to the edge server after receiving the redirection information; The processing unit is further configured to receive origin retrieval information carrying the target identifier sent by the gateway; wherein the origin retrieval information is sent by the edge server to the gateway after receiving the redirection information and determining, based on the target identifier in the redirection information, that there is no cached data matching the target identifier; The processing unit is further configured to determine downgraded data based on the target identifier in the source information; wherein the downgraded data is one of the business data corresponding to the user request with the same target identifier returned by the business server; The processing unit is further configured to send return information carrying the degraded data to the edge server through the gateway, so that the edge server can generate cached data corresponding to the degraded data according to the return information, and send second display information carrying the degraded data to the display device.

8. An electronic device, characterized in that, include: A memory and a processor, the memory being used to store a computer program; the processor being used to cause the electronic device to implement the data processing method according to any one of claims 1-6 when executing the computer program.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a computing device, causes the computing device to implement the data processing method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Service scheduling method and device based on cellular network

    CN107124621A

  • Data acquisition method and device and terminal equipment

    CN110225104A

  • Load balancing method, device and system for integrated service

    CN110417886A