Movatterモバイル変換


[0]ホーム

URL:


CN116506657A - Data processing method and device and electronic equipment - Google Patents

Data processing method and device and electronic equipment
Download PDF

Info

Publication number
CN116506657A
CN116506657ACN202211091279.XACN202211091279ACN116506657ACN 116506657 ACN116506657 ACN 116506657ACN 202211091279 ACN202211091279 ACN 202211091279ACN 116506657 ACN116506657 ACN 116506657A
Authority
CN
China
Prior art keywords
data
target identifier
service
server
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211091279.XA
Other languages
Chinese (zh)
Inventor
杜萌
张鹏
王清华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Juhaokan Technology Co Ltd
Original Assignee
Juhaokan Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Juhaokan Technology Co LtdfiledCriticalJuhaokan Technology Co Ltd
Priority to CN202211091279.XApriorityCriticalpatent/CN116506657A/en
Publication of CN116506657ApublicationCriticalpatent/CN116506657A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本公开提供了一种数据处理方法、装置和电子设备,涉及互联网技术领域,用于解决在访问首页,或者访问某个媒资的详情页的请求超出业务应用程序界面API承受上限的情况下,如何防止发生服务中断的问题。该方法包括:接收网关发送的用户请求;获取业务服务器的运行参数;对用户请求进行泛化处理,确定泛化处理后的用户请求对应的目标标识;根据目标标识,确定目标标识对应的第一数据类型;在运行参数满足预设条件的情况下,根据运行参数,确定可处理的第二数据类型;在第一数据类型和第二数据类型不相同的情况下,从业务服务器获取用户请求的业务数据;通过网关向显示设备发送携带业务数据的第一显示信息。

The present disclosure provides a data processing method, device and electronic equipment, which relate to the field of Internet technology, and are used to solve the problem that when the request for accessing the home page or the details page of a certain media resource exceeds the upper limit of the API of the business application program interface, How to prevent the problem of service interruption. The method includes: receiving a user request sent by a gateway; obtaining operating parameters of a service server; performing generalization processing on the user request, and determining a target identifier corresponding to the generalized user request; according to the target identifier, determining the first Data type; when the operating parameters meet the preset conditions, determine the second data type that can be processed according to the operating parameters; Service data: sending the first display information carrying the service data to the display device through the gateway.

Description

Translated fromChinese
一种数据处理方法、装置和电子设备A data processing method, device and electronic equipment

技术领域technical field

本公开涉及互联网技术领域,尤其涉及一种数据处理方法、装置和电子设备。The present disclosure relates to the technical field of the Internet, and in particular to a data processing method, device and electronic equipment.

背景技术Background technique

在互联网场景中,用户在显示设备上访问首页、详情页等核心内容访问场景,如:电视机在开机后显示的首页,或者用户在电视机上选择了某个媒资的详情时,电视机显示该媒资的详情页,此时若访问首页,或者访问某个媒资的详情页的请求超出业务应用程序界面(Application Program Interface,API)承受上限,会出现服务中断的情况。In the Internet scenario, the user accesses core content such as the home page and details page on the display device. At this time, if the homepage of the media asset details page is accessed, or the request to access the details page of a certain media asset exceeds the upper limit of the application program interface (Application Program Interface, API), the service will be interrupted.

因此,如何在访问首页,或者访问某个媒资的详情页的请求超出业务应用程序界面API承受上限的情况下,防止发生服务中断的情况成为了一个亟待解决的问题。Therefore, how to prevent service interruption when the request to access the homepage or the details page of a certain media resource exceeds the upper limit of the business application program interface API has become an urgent problem to be solved.

发明内容Contents of the invention

为了解决上述技术问题,本公开提供了一种数据处理方法、装置和电子设备。In order to solve the above technical problems, the present disclosure provides a data processing method, device and electronic equipment.

本公开的技术方案如下:The disclosed technical scheme is as follows:

第一方面,本公开提供一种数据处理方法,包括:接收网关发送的用户请求;其中,用户请求为显示设备访问目标业务时向网关发送的,用户请求至少包括用户账号和设备标识码;获取业务服务器的运行参数;对用户请求进行泛化处理,确定泛化处理后的用户请求对应的目标标识;其中,一个用户账号对应一个账号类型,目标标识、账号类型和设备标识码三者一一对应;根据目标标识,确定目标标识对应的第一数据类型;在运行参数满足预设条件的情况下,根据运行参数,确定可处理的第二数据类型;在第一数据类型和第二数据类型不相同的情况下,从业务服务器获取用户请求的业务数据;通过网关向显示设备发送携带业务数据的第一显示信息。In a first aspect, the present disclosure provides a data processing method, including: receiving a user request sent by a gateway; wherein, the user request is sent to the gateway when a display device accesses a target service, and the user request includes at least a user account and a device identification code; obtaining The operating parameters of the business server; perform generalization processing on user requests, and determine the target identifier corresponding to the generalized user request; wherein, a user account corresponds to an account type, and the target identifier, account type, and device identification code are three one by one Correspondence; according to the target identification, determine the first data type corresponding to the target identification; when the operating parameters meet the preset conditions, determine the second data type that can be processed according to the operating parameters; between the first data type and the second data type If not, the service data requested by the user is obtained from the service server; and the first display information carrying the service data is sent to the display device through the gateway.

第二方面,本公开提供一种数据处理装置,包括:接收单元,用于接收网关发送的用户请求;其中,用户请求为显示设备访问目标业务时向网关发送的,用户请求至少包括用户账号和设备标识码;获取单元,用于获取业务服务器的运行参数;处理单元,用于对接收单元接收的用户请求进行泛化处理,确定泛化处理后的用户请求对应的目标标识;其中,一个用户账号对应一个账号类型,目标标识、账号类型和设备标识码三者一一对应;处理单元,还用于根据目标标识,确定目标标识对应的第一数据类型;处理单元,还用于在获取单元获取的运行参数满足预设条件的情况下,根据获取单元获取的运行参数,确定可处理的第二数据类型;处理单元,还用于在第一数据类型和第二数据类型不相同的情况下,从业务服务器获取用户请求的业务数据;处理单元,还用于控制发送单元通过网关向显示设备发送携带业务数据的第一显示信息。In a second aspect, the present disclosure provides a data processing device, including: a receiving unit, configured to receive a user request sent by a gateway; wherein, the user request is sent to the gateway when a display device accesses a target service, and the user request includes at least a user account and The device identification code; the obtaining unit is used to obtain the operating parameters of the business server; the processing unit is used to generalize the user request received by the receiving unit, and determine the target identifier corresponding to the generalized user request; wherein, a user The account number corresponds to an account type, and the target identification, account type and device identification code are in one-to-one correspondence; the processing unit is also used to determine the first data type corresponding to the target identification according to the target identification; the processing unit is also used in the acquisition unit When the obtained operating parameters meet the preset conditions, according to the operating parameters obtained by the obtaining unit, determine the second data type that can be processed; the processing unit is also used for when the first data type and the second data type are not the same , acquiring the service data requested by the user from the service server; the processing unit is further configured to control the sending unit to send the first display information carrying the service data to the display device through the gateway.

第三方面,本公开提供一种电子设备,包括:存储器和处理器,所述存储器用于存储计算机程序;所述处理器用于在执行计算机程序时,使得所述电子设备实现如上述第一方面提供的任一项数据处理方法。In a third aspect, the present disclosure provides an electronic device, including: a memory and a processor, the memory is used to store a computer program; the processor is used to enable the electronic device to implement the above first aspect when executing the computer program Any of the data processing methods provided.

第四方面,本公开提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,当所述计算机程序被计算设备执行时,使得所述计算设备实现如上述第一方面提供的任一项数据处理方法。In a fourth aspect, the present disclosure provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a computing device, the computing device realizes the above-mentioned first aspect Any of the data processing methods provided.

第五方面,本发明提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如第一方面提供的任一项的数据处理方法。In a fifth aspect, the present invention provides a computer program product, which, when the computer program product is run on a computer, causes the computer to execute any one of the data processing methods provided in the first aspect.

需要说明的是,上述计算机指令可以全部或者部分存储在第一计算机可读存储介质上。其中,第一计算机可读存储介质可以与数据处理装置的处理器封装在一起的,也可以与数据处理装置的处理器单独封装,本公开对此不作限定。It should be noted that all or part of the above computer instructions may be stored on the first computer-readable storage medium. Wherein, the first computer-readable storage medium may be packaged together with the processor of the data processing device, or may be packaged separately with the processor of the data processing device, which is not limited in the present disclosure.

本公开中第二方面、第三方面、第四方面以及第五方面的描述,可以参考第一方面的详细描述;并且,第二方面、第三方面、第四方面以及第五方面的描述的有益效果,可以参考第一方面的有益效果分析,此处不再赘述。For the description of the second aspect, the third aspect, the fourth aspect and the fifth aspect of the present disclosure, you can refer to the detailed description of the first aspect; and, the description of the second aspect, the third aspect, the fourth aspect and the fifth aspect For the beneficial effect, reference may be made to the analysis of the beneficial effect in the first aspect, which will not be repeated here.

在本公开中,上述数据处理装置的名字对设备或功能模块本身不构成限定,在实际实现中,这些设备或功能模块可以以其他名称出现。只要各个设备或功能模块的功能和本公开类似,属于本公开权利要求及其等同技术的范围之内。In the present disclosure, the names of the above-mentioned data processing apparatuses do not limit the devices or functional modules themselves, and in actual implementation, these devices or functional modules may appear with other names. As long as the functions of each device or functional module are similar to those of the present disclosure, they fall within the scope of the claims of the present disclosure and their equivalent technologies.

本公开的这些方面或其他方面在以下的描述中会更加简明易懂。These or other aspects of the present disclosure will be more clearly understood in the following description.

本公开提供的技术方案与现有技术相比具有如下优点:Compared with the prior art, the technical solution provided by the present disclosure has the following advantages:

为了能够在业务服务器同时接收到多个访问首页,或者访问某个媒资的详情页的请求超出业务应用程序界面API承受上限的情况,本公开实施例提供的数据处理方法,通过对业务服务器的运行参数进行监测,从而在接收到网关发送的用户请求后,通过对用户请求进行泛化处理,确定泛化处理后的用户请求对应的目标标识。如此,可以根据该目标标识,确定目标标识对应的第一数据类型;在运行参数满足预设条件,如运行参数包括CPU占用率时,CPU占用率大于预设阈值,或者运行参数包括访问量时,访问量大于目标阈值,此时说明业务服务器的负载较大,或者业务服务器发生异常。因此,需要根据运行参数,确定当前需要进行处理的第二数据类型。若第一数据类型与第二数据类型相同,此时无需业务服务器对第一数据类型的目标业务进行处理;若第一数据类型与第二数据类型不相同,此时需要业务服务器对第一数据类型的目标业务进行处理。这样,就可以防止业务服务器接收到多个访问首页,或者访问某个媒资的详情页的请求超出业务应用程序界面API承受上限,而出现服务中断的情况。解决了如何在访问首页,或者访问某个媒资的详情页的请求超出业务应用程序界面API承受上限的情况下,防止发生服务中断的情况的问题。In order to be able to receive multiple visits to the home page at the same time, or the request to visit the details page of a certain media resource exceeds the upper limit of the business application program interface API, the data processing method provided by the embodiment of the present disclosure, through the business server The operating parameters are monitored, so that after receiving the user request sent by the gateway, the user request is generalized to determine the target identifier corresponding to the generalized user request. In this way, the first data type corresponding to the target identifier can be determined according to the target identifier; when the operating parameters meet preset conditions, such as when the operating parameters include CPU usage, the CPU usage is greater than a preset threshold, or when the operating parameters include traffic , the number of visits is greater than the target threshold, which means that the business server is heavily loaded, or the business server is abnormal. Therefore, it is necessary to determine the second data type that needs to be processed currently according to the operating parameters. If the first data type is the same as the second data type, the service server does not need to process the target business of the first data type; if the first data type is different from the second data type, the service server needs to process the first data type type of target business to be processed. In this way, it is possible to prevent the business server from receiving multiple visits to the home page, or the request to visit the details page of a certain media resource exceeds the upper limit of the business application program interface API, resulting in service interruption. It solves the problem of how to prevent service interruption when the request to access the home page or the details page of a certain media resource exceeds the upper limit of the API of the business application program interface.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure.

为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, In other words, other drawings can also be obtained from these drawings without paying creative labor.

图1为本申请实施例提供的数据处理方法的流程示意图之一;Fig. 1 is one of the schematic flow charts of the data processing method provided by the embodiment of the present application;

图2为本申请实施例提供的数据处理方法中显示设备的结构示意图之一;FIG. 2 is one of the structural schematic diagrams of the display device in the data processing method provided by the embodiment of the present application;

图3为本申请实施例提供的数据处理方法中显示设备的结构示意图之二;FIG. 3 is the second structural schematic diagram of the display device in the data processing method provided by the embodiment of the present application;

图4为本申请实施例提供的数据处理方法的流程示意图之一;FIG. 4 is one of the schematic flow diagrams of the data processing method provided by the embodiment of the present application;

图5为本申请实施例提供的数据处理方法中个性推荐数据的示意图;FIG. 5 is a schematic diagram of personalized recommendation data in the data processing method provided by the embodiment of the present application;

图6为本申请实施例提供的数据处理方法中用户画像数据的示意图;6 is a schematic diagram of user portrait data in the data processing method provided by the embodiment of the present application;

图7为本申请实施例提供的数据处理方法中用户定制数据的示意图;FIG. 7 is a schematic diagram of user-customized data in the data processing method provided by the embodiment of the present application;

图8为本申请实施例提供的数据处理方法的流程示意图之二;FIG. 8 is the second schematic flow diagram of the data processing method provided by the embodiment of the present application;

图9为本申请实施例提供的数据处理方法的流程示意图之三;FIG. 9 is the third schematic flow diagram of the data processing method provided by the embodiment of the present application;

图10为本申请实施例提供的数据处理方法的流程示意图之四;FIG. 10 is the fourth schematic flow diagram of the data processing method provided by the embodiment of the present application;

图11为本申请实施例提供的数据处理方法的流程示意图之五;FIG. 11 is the fifth schematic flow diagram of the data processing method provided by the embodiment of the present application;

图12为本申请实施例提供的数据处理方法的流程示意图之六;FIG. 12 is the sixth schematic flow diagram of the data processing method provided by the embodiment of the present application;

图13为本申请实施例提供的数据处理方法的流程示意图之七。FIG. 13 is the seventh schematic flowchart of the data processing method provided by the embodiment of the present application.

具体实施方式Detailed ways

为了能够更清楚地理解本公开的上述目的、特征和优点,下面将对本公开的方案进行进一步描述。需要说明的是,在不冲突的情况下,本公开的实施例及实施例中的特征可以相互组合。In order to more clearly understand the above objects, features and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that, in the case of no conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other.

在下面的描述中阐述了很多具体细节以便于充分理解本公开,但本公开还可以采用其他不同于在此描述的方式来实施;显然,说明书中的实施例只是本公开的一部分实施例,而不是全部的实施例。In the following description, many specific details are set forth in order to fully understand the present disclosure, but the present disclosure can also be implemented in other ways than described here; obviously, the embodiments in the description are only some of the embodiments of the present disclosure, and Not all examples.

需要说明的是,在本文中,诸如“第一”和“第二”等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relative terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these No such actual relationship or order exists between entities or operations. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

图1为根据本申请一个或多个实施例的显示设备与控制装置之间操作场景的示意图,如图1所示,用户可通过移动终端300和控制装置100操作显示设备200。控制装置100可以是遥控器,遥控器和显示设备的通信包括红外协议通信、蓝牙协议通信,无线或其他有线方式来控制显示设备200。用户可以通过遥控器上按键,语音输入、控制面板输入等输入用户指令,来控制显示设备200。在一些实施例中,也可以使用移动终端、平板电脑、计算机、笔记本电脑、和其他智能设备以控制显示设备200。FIG. 1 is a schematic diagram of an operation scene between a display device and a control device according to one or more embodiments of the present application. As shown in FIG. 1 , a user can operate a display device 200 through a mobile terminal 300 and a control device 100 . The control device 100 may be a remote controller, and the communication between the remote controller 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 control the display device 200 by inputting user commands through buttons on the remote controller, voice input, control panel input, and the like. In some embodiments, mobile terminals, tablet computers, computers, notebook computers, and other smart devices can also be used to control the display device 200 .

在一些实施例中,移动终端300可与显示设备200安装软件应用,通过网络通信协议实现连接通信,实现一对一控制操作的和数据通信的目的。也可以将移动终端300上显示音视频内容传输到显示设备200上,实现同步显示功能显示设备200还与显示设备200通过多种通信方式进行数据通信。可允许显示设备200通过局域网(LAN)、无线局域网(WLAN)和其他网络进行通信连接。显示设备200可以向显示设备200提供各种内容和互动。显示设备200,可以液晶显示器、OLED显示器、投影显示设备。显示设备200除了提供广播接收电视功能之外,还可以附加提供计算机支持功能的智能网络电视功能。In some embodiments, the mobile terminal 300 can install software applications with the display device 200, realize connection and communication through a network communication protocol, and realize the purpose of one-to-one control operation and data communication. The audio and video content displayed on the mobile terminal 300 can also be transmitted to the display device 200 to realize a synchronous display function. The display device 200 can also perform data communication with the display device 200 through various communication methods. The display device 200 may be allowed to communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks. The display device 200 may provide various contents and interactions to the display device 200 . The display device 200 may be a liquid crystal display, an OLED display, or a projection display device. In addition to providing the TV function of broadcasting reception, the display device 200 may also provide an intelligent network TV function providing computer support functions.

在一些实施例中,本申请实施例提供电子设备可以为上述显示设备200。其中,显示设备200响应于对目标业务(如访问主页,或者访问媒资的详情)的访问操作,通过网关2向降级服务器3发送用户请求。降级服务器3在接收到网关发送的用户请求后,获取业务服务器4的运行参数。之后,降级服务器3对用户请求进行泛化处理,确定泛化处理后的用户请求对应的目标标识。之后,降级服务器3根据目标标识,确定目标标识对应的第一数据类型;降级服务器3在运行参数满足预设条件的情况下,根据运行参数,确定可处理的第二数据类型。从而,降级服务器3根据第一数据类型和第二数据类型,确定是否需要业务服务器4处理该用户请求,从而可以降低业务服务器4处理的用户请求的数量,实现对业务服务器4处理的用户请求进行分流。如:在第一数据类型和第二数据类型不相同的情况下,从业务服务器获取用户请求的业务数据。或者,在第一数据类型和第二数据类型相同的情况下,通过网关2向显示设备200发送携带目标标识的重定向信息。显示设备200在接收到网关2发送的重定向信息后,将重定向信息发送至边缘服务器5。之后,边缘服务器5根据该重定向信息中的目标标识,确定存储有与该目标标识对应的缓存数据时,向显示设备200发送携带降级数据的第二显示信息。或者,边缘服务器5根据该重定向信息中的目标标识,确定未存储有与该目标标识对应的缓存数据时,向网关2发送目标标识的回源信息。降级服务器3接收网关2发送的携带目标标识的回源信息。根据回源信息中的目标标识,确定降级数据。降级服务器3向边缘服务器5发送携带降级数据的返回信息。边缘服务器5接收到降级服务器3发送的返回信息后,生成与降级数据对应的缓存数据,并向显示设备200发送携带降级数据的第二显示信息。这样,因此降级服务器3在接收到多个相同账号类型,相同设备标识码的用户请求时,由于同一个账号类型和同一个设备标识码对应同一个目标标识,因此可以为相同账号类型,相同设备标识码的用户请求分配同一个业务数据,从而可以降低业务服务器的运行压力。In some embodiments, the electronic device provided in the embodiment of the present application may be the above-mentioned display device 200 . Wherein, the display device 200 sends a user request to the downgrade server 3 through the gateway 2 in response to an access operation to a target service (such as accessing a home page, or accessing details of media assets). After receiving the user request sent by the gateway, the downgrade server 3 acquires the operating parameters of the service server 4 . Afterwards, the downgrading server 3 performs generalization processing on the user request, and determines the target identifier corresponding to the generalization processing user request. Afterwards, the downgrade server 3 determines the first data type corresponding to the target ID according to the target ID; the downgrade server 3 determines the second data type that can be processed according to the operating parameters when the operating parameters meet the preset conditions. Thereby, the downgrading server 3 determines whether the service server 4 is required to process the user request according to the first data type and the second data type, thereby reducing the number of user requests processed by the service server 4 and realizing the user request processed by the service server 4. shunt. For example: when the first data type is different from the second data type, the service data requested by the user is obtained from the service server. Alternatively, in the case that the first data type is the same as the second data type, 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 . Afterwards, when the edge server 5 determines that the cached data corresponding to the target identifier is stored according to the target identifier in the redirection information, it sends the second display information carrying the degraded data to the display device 200 . Or, when the edge server 5 determines that no cached data corresponding to the target ID is stored according to the target ID in the redirection information, it sends the back-to-source information of the target ID to the gateway 2 . The downgrading server 3 receives the back-to-source information carrying the target identifier sent by the gateway 2 . The downgrade data is determined according to the target identifier in the back-to-source information. The downgrade server 3 sends return information carrying downgrade data to the edge server 5 . After receiving the return information sent by the downgrade server 3 , the edge server 5 generates cache data corresponding to the downgrade data, and sends the second display information carrying the downgrade data to the display device 200 . In this way, when the downgrade server 3 receives multiple user requests of the same account type and the same device identification code, since the same account type and the same device identification code correspond to the same target identification, they can be the same account type, the same device The user of the identification code requests to be allocated the same service data, thereby reducing the operating pressure of the service server.

图2示出了根据示例性实施例中显示设备200的硬件配置框图。如图2所示显示设备200包括调谐解调器210、通信器220、检测器230、外部装置接口240、控制器250、显示器260、音频输出接口270、存储器、供电电源、用户接口280中的至少一种。控制器包括中央处理器,视频处理器,音频处理器,图形处理器,RAM,ROM,用于输入/输出的第一接口至第n接口。显示器260可为具有触控功能的显示器,如触控显示器。调谐解调器210通过有线或无线接收方式接收广播电视信号,以及从多个无线或有线广播电视信号中解调出音视频信号,如以及EPG数据信号。检测器230用于采集外部环境或与外部交互的信号。控制器250和调谐解调器210可以位于不同的分体设备中,即调谐解调器210也可在控制器250所在的主体设备的外置设备中,如外置机顶盒等。FIG. 2 shows a block diagram of a hardware configuration of a display device 200 according to an exemplary embodiment. As shown in Figure 2, the display device 200 includes a tuner and 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. at least one. The controller includes a central processing unit, a video processor, an audio processor, a graphics processor, RAM, ROM, the first interface to the nth interface for input/output. The display 260 can be a display with touch function, such as a touch display. The tuner demodulator 210 receives broadcast TV signals through wired or wireless reception, and demodulates audio and video signals, such as EPG data signals, from multiple wireless or cable broadcast TV signals. The detector 230 is used to collect signals of the external environment or interaction with the outside. The controller 250 and the tuner-demodulator 210 may be located in different split devices, that is, the tuner-demodulator 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.

在一些实施例中,控制器250,通过存储在存储器上中各种软件控制程序,来控制显示设备的工作和响应用户的操作。控制器250控制显示设备200的整体操作。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 the memory. The controller 250 controls the overall operations of the display device 200 .

在一些示例中,以申请一个或多个实施例的显示设备200为电视机1,并且电视机1的操作系统为Android系统为例,如图3所示,电视机1从逻辑上可以分为应用程序(Applications)层(简称“应用层”)21,应用程序框架(Application Framework)层(简称“框架层”)22,安卓运行时(Android runtime)和系统库层(简称“系统运行库层”)23,以及内核层24。In some examples, for example, the display device 200 applying one or more embodiments is a television 1, and the operating system of the television 1 is an Android system. As shown in FIG. 3 , the television 1 can be logically divided into Application (Applications) layer (referred to as "application layer") 21, application framework (Application Framework) layer (referred to as "framework layer") 22, Android runtime (Android runtime) and system library layer (referred to as "system runtime layer") ”)23, and the kernel layer 24.

其中,应用层21包括一个或多个应用。应用可以为系统应用,也可以为第三方应用。如,应用层21包括第一应用,第一应用可以提供视频播放功能。框架层22为应用层21的应用程序提供应用编程接口(application programming interface,API)和编程框架。系统运行库层23为上层即框架层22提供支撑,当框架层22被使用时,安卓操作系统会运行系统运行库层23中包含的C/C++库以实现框架层22要实现的功能。内核层24作为硬件层和应用层21之间的软件中间件,用于管理和控制硬件与软件资源。Wherein, the application layer 21 includes one or more applications. The application can be a system application or a third-party application. For example, the application layer 21 includes a first application, and the first application may provide a video playing function. The framework layer 22 provides an application programming interface (application programming interface, API) and a programming framework for the application program of the application layer 21 . The system runtime layer 23 provides support for the upper layer, namely the framework layer 22. When the framework layer 22 is used, the Android operating system will run the C/C++ library contained in the system runtime layer 23 to realize the functions to be realized by the framework layer 22. The kernel layer 24 serves as software middleware between the hardware layer and the application layer 21, and is used to manage and control hardware and software resources.

在一些示例中,内核层24包括第一驱动和第二驱动,第一驱动用于将检测器230采集的用户操作发送至第一应用,第二驱动用于控制显示器260显示显示单元213发送的显示信息。In some examples, the kernel layer 24 includes a first driver and a second driver. The first driver is used to send the user operations collected by the detector 230 to the first application, and the second driver is used to control the display 260 to display the user operations sent by the display unit 213. Display information.

电视机1中的第一应用启动。之后,第一驱动用于将检测器230采集的用户操作发送至第一应用进行识别。之后,第一应用的处理单元212响应于接收单元210接收的目标操作(如:对第一应用中的首页进行了选择操作),此时处理单元212控制发送单元211通过网关2向降级服务器3发送用户请求。网关2的处理单元202确定接收单元200接收到电视机1发送的用户请求后,控制发送单元201向降级服务器3发送该用户请求。降级服务器3的分流服务模块301接收到网关2发的用户请求后,获取业务服务器4的运行参数。之后,分流服务模块301对用户请求进行泛化处理,确定泛化处理后的用户请求对应的目标标识。分流服务模块301根据目标标识,确定目标标识对应的第一数据类型;分流服务模块301在运行参数满足预设条件的情况下,根据降级策略模块304发送的降级策略表,根据运行参数查询降级策略表,确定可处理的第二数据类型。从而,分流服务模块301根据第一数据类型和第二数据类型,确定是否需要业务服务器4处理该用户请求。如:在第一数据类型和第二数据类型不相同的情况下,从业务服务器4获取用户请求的业务数据。或者,在第一数据类型和第二数据类型相同的情况下,通过网关2向显示设备200发送携带目标标识的重定向信息。显示设备200在接收到网关2发送的重定向信息后,将重定向信息发送至边缘服务器5。之后,边缘服务器5根据该重定向信息中的目标标识,确定存储有与该目标标识对应的缓存数据时,向显示设备200发送携带降级数据的第二显示信息。或者,边缘服务器5根据该重定向信息中的目标标识,确定未存储有与该目标标识对应的缓存数据时,向网关2发送目标标识的回源信息。分流服务模块301接收网关2发送的携带目标标识的回源信息。根据回源信息中的目标标识,确定降级数据。分流服务模块301向边缘服务器5发送携带降级数据的返回信息。边缘服务器5接收到降级服务器3发送的返回信息后,生成与降级数据对应的缓存数据,并向显示设备200发送携带降级数据的第二显示信息。网关2在向显示设备200发送业务服务器4发送的业务数据时,采用异步消息机制,将该业务数据发送至降级服务器3的消息订阅模块302。之后,消息订阅模块302将该业务数据发送至采集服务模块302中,采集服务器模块302根据当前时刻和业务数据对应的时间戳,确定时间间隔。若时间间隔大于时间阈值,从业务服务器4返回的在时间戳对应的时刻与当前时刻之间的,与目标标识相同的用户请求对应的业务数据中选取一个业务数据作为存储数据,并存储至数据存储模块303。The first application in TV 1 is started. Afterwards, the first driver is used to send the user operations collected by the detector 230 to the first application for identification. Afterwards, the processing unit 212 of the first application responds to the target operation received by the receiving unit 210 (such as: a selection operation is performed on the homepage in the first application), and the processing unit 212 controls the sending unit 211 to the downgrade server 3 through the gateway 2 at this time. Send user request. After the processing unit 202 of the gateway 2 determines that the receiving unit 200 has received the user request sent by the television 1 , it controls the sending unit 201 to send the user request to the downgrade server 3 . After receiving the user request sent by the gateway 2, the distribution service module 301 of the downgrade server 3 acquires the operating parameters of the service server 4. Afterwards, the distribution service module 301 performs generalization processing on the user request, and determines the target identifier corresponding to the generalized user request. The offload service module 301 determines the first data type corresponding to the target identifier according to the target identifier; the offload service module 301 queries the downgrade strategy according to the operation parameter according to the downgrade strategy table sent by the downgrade strategy module 304 when the operation parameter meets the preset condition A table that determines the second data type that can be processed. Therefore, the distribution service module 301 determines whether the service server 4 is required to process the user request according to the first data type and the second data type. For example: when the first data type is different from the second data type, the service data requested by the user is obtained from the service server 4 . Alternatively, in the case that the first data type is the same as the second data type, 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 . Afterwards, when the edge server 5 determines that the cached data corresponding to the target identifier is stored according to the target identifier in the redirection information, it sends the second display information carrying the degraded data to the display device 200 . Or, when the edge server 5 determines that no cached data corresponding to the target ID is stored according to the target ID in the redirection information, it sends the back-to-source information of the target ID to the gateway 2 . The distribution service module 301 receives the back-to-source information carrying the target identifier sent by the gateway 2 . The downgrade data is determined according to the target identifier in the back-to-source information. The distribution service module 301 sends return information carrying degraded data to the edge server 5 . After receiving the return information sent by the downgrade server 3 , the edge server 5 generates cache data corresponding to the downgrade data, and sends the second display information carrying the downgrade 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 downgrade server 3 . Afterwards, the message subscription module 302 sends the business data to the collection service module 302, and the collection server module 302 determines the time interval according to the current time and the timestamp corresponding to the business data. If the time interval is greater than the time threshold, select a business data as storage data from the business data corresponding to the user request identical to the target identifier between the time corresponding to the time stamp and the current time returned by the business server 4, and store it in the data Storage module 303.

具体的,运维人员可以根据实际情况对降级策略表进行修改,之后,运维人员可以降级策略模块304将修改后的降级策略表发送至分流服务模块301,保证分流服务模块301中保存的降级策略表能够及时进行更新,保证用户的体验。Specifically, the operation and maintenance personnel can modify the downgrade policy table according to the actual situation. After that, the operation and maintenance personnel can send the modified downgrade policy table to the distribution service module 301 in the downgrade strategy module 304, so as to ensure that the downgrade data saved in the distribution service module 301 The policy table can be updated in time to ensure user experience.

具体的,消息订阅模块302采用的系统可以是Apache Kafka。Specifically, the system used by the message subscription module 302 may be Apache Kafka.

具体的,本公开实施例提供的电子设备可以是上述降级服务器3,此处不做限定。Specifically, the electronic device provided in this embodiment of the present disclosure may be the above-mentioned downgrade server 3 , which is not limited here.

本申请所涉及的用户请求、业务数据、运行参数、身份信息均可以为经用户授权或者经过各方充分授权的数据。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.

以下实施例中以执行本公开实施例提供的数据处理方法的执行主体为上述降级服务器3为例,对本申请实施例的方法进行说明。In the following embodiments, the method in the embodiment of the present application will be described by taking the above-mentioned downgrade server 3 as an example for executing the data processing method provided in the embodiment of the present disclosure.

本申请实施例提供一种数据处理方法,如图4所示,该数据处理方法可以包括S11-S17。An embodiment of the present application provides a data processing method. As shown in FIG. 4 , the data processing method may include S11-S17.

S11、接收网关发送的用户请求。其中,用户请求为显示设备访问目标业务时向网关发送的,用户请求至少包括用户账号和设备标识码。S11. Receive the user request sent by the gateway. Wherein, the user request is sent to the gateway when the display device accesses the target service, and the user request includes at least a user account and a device identification code.

在一些示例中,相同型号的显示设备对应的设备标识码相同。In some examples, display devices of the same model have the same device identification codes.

S12、获取业务服务器的运行参数。S12. Acquiring operating parameters of the service server.

S13、对用户请求进行泛化处理,确定泛化处理后的用户请求对应的目标标识。其中,一个用户账号对应一个账号类型,目标标识、账号类型和设备标识码三者一一对应。S13. Perform generalization processing on the user request, and determine a target identifier corresponding to the generalized user request. Wherein, a user account corresponds to an account type, and there is a one-to-one correspondence among the target identifier, the account type, and the device identification code.

具体的,账号类型包括已实名账号和未实名账号。其中,已实名账号是指用户使用身份信息进行注册的账号,未实名账号是指用户未使用身份信息进行注册的账号(如:匿名账号)。Specifically, the account type includes a real-name account and an unreal-name account. Wherein, a real-name account refers to an account registered by the user using identity information, and an unreal-name account refers to an account registered by the user without identity information (such as an anonymous account).

在一些示例中,用户请求对应一个统一资源定位系统(uniform resourcelocato,URL),该URL中携带有用户账号和设备标识码。在对URL进行泛化处理时,可以采用MD5信息摘要算法(英语:MD5 Message-Digest Algorithm)对URL进行处理,得到该URL对应的MD5取值。之后,确定该MD5取值为目标标识。In some examples, the user request corresponds to a uniform resource locator (uniform resource locator, URL), and the URL carries a user account and a device identification code. When generalizing the URL, an MD5 message-digest algorithm (English: MD5 Message-Digest Algorithm) can be used to process the URL to obtain an MD5 value corresponding to the URL. Afterwards, it is determined that the MD5 value is the target identifier.

具体的,在对URL中的用户账号进行泛化处理时,如果该用户账号对应的账号类型为已实名账号,则设置customerId=1。反之,如果该用户账号对应的账号类型为非实名账号,则设置customerId=0。Specifically, when generalizing the user account in the URL, if the account type corresponding to the user account is a real-name account, set customerId=1. On the contrary, if the account type corresponding to the user account is a non-real-name account, set customerId=0.

S14、根据目标标识,确定目标标识对应的第一数据类型。S14. Determine the first data type corresponding to the target identifier according to the target identifier.

在一些示例中,本公开实施例提供的数据处理方法,通过对互联网业务中运营编排、用户行为的特点进行分析,将数据类型可分为静态数据、个性推荐数据、用户画像数据、用户定制数据。其中,第一数据类型为静态数据、个性推荐数据、用户画像数据、用户定制数据中的任一项。第二数据类型为静态数据、个性推荐数据、用户画像数据、用户定制数据中的任一项。In some examples, the data processing method provided by the embodiments of the present disclosure can classify the data types into static data, personalized recommendation data, user portrait data, and user customized data by analyzing the characteristics of Internet business operation arrangement and user behavior. . Wherein, the first data type is any one of static data, personalized recommendation data, user portrait data, and user customized data. The second data type is any one of static data, personalized recommendation data, user portrait data, and user customized data.

示例性的,第一数据类型对应的关系表如表1所示。Exemplarily, the relationship table corresponding to the first data type is shown in Table 1.

表1Table 1

具体的:匿名用户是指用户在显示设备上未登录用户账号的用户,业务服务器为该显示设备分配了默认的匿名用户标识码(Identity document,ID);实名用户是用户在显示设备上登录了用户账号的用户,业务服务器为该显示设备分配了一个唯一的用户标识码。Specifically: an anonymous user refers to a user who has not logged in a user account on the display device, and the service server assigns a default anonymous user identification code (Identity document, ID) for the display device; a real-name user refers to a user who has logged in on the display device For the user of the user account, the service server assigns a unique user identification code to the display device.

具体的,与“静态数据”的所见皆一致的特点相对,“个性推荐数据”和“用户画像数据”均按照实名用户的不同,会产生不同业务结果,对于数亿甚至数十亿级的互联网用户量,为每个用户存储一份降级数据,受存储资源限制显然是不合适的,所以本发明实施例提供的数据处理方法,采样同一账号类型、同一设备标识码的业务数据进行存储,由于相同账号类型,相同设备标识码对应的目标标识相同,又因为目标标识与已存储的业务数据一一对应,这样当业务服务器的负载较高(如:中央处理器(central processing unit,CPU)占用率大于预设阈值,和/或访问量大于目标阈值),或者业务服务器发生异常时,可以在降级服务器3中直接读取该目标标识对应的业务数据。同时,可以为不同账号类型、不同设备标识码的显示设备提供不同的业务数据,保证了用户的体验。Specifically, in contrast to the "static data" that is consistent in everything seen, "personalized recommendation data" and "user portrait data" will produce different business results according to different real-name users. For hundreds of millions or even billions of For the amount of Internet users, storing a copy of degraded data for each user is obviously inappropriate due to the limitation of storage resources. Therefore, the data processing method provided by the embodiment of the present invention samples the business data of the same account type and the same device identification code for storage. Due to the same account type and the same target ID corresponding to the same device identification code, and because the target ID corresponds to the stored business data one by one, when the load of the business server is high (such as: central processing unit (CPU) When the occupancy rate is greater than the preset threshold, and/or the access volume is greater than the target threshold), or the service server is abnormal, the service data corresponding to the target identifier can be directly read in the degraded server 3 . At the same time, different service data can be provided for display devices with different account types and different device identification codes, ensuring user experience.

S15、在运行参数满足预设条件的情况下,根据运行参数,确定可处理的第二数据类型。S15. When the operating parameters satisfy the preset condition, determine a second data type that can be processed according to the operating parameters.

在一些示例中,运行参数包括CPU占用率和访问量中的至少一项。如:运行参数包括CPU占用率时,若CPU占用率大于预设阈值(如20%)时,此时认为运行参数满足预设条件。或者,运行参数包括访问量时,若访问量大于目标阈值(如10000)时,此时认为运行参数满足预设条件。或者,运行参数包括CPU占用率和访问量时,若CPU占用率大于预设阈值(如20%),且访问量大于目标阈值(如10000)时,此时认为运行参数满足预设条件。In some examples, the running parameters include at least one of CPU usage and traffic. For example, when the operating parameters include CPU usage, if the CPU usage is greater than a preset threshold (eg, 20%), it is considered that the running parameters meet the preset condition. Alternatively, when the operating parameters include the number of visits, if the number of visits is greater than the target threshold (eg, 10000), it is considered that the operating parameters meet the preset condition. Alternatively, when the operating parameters include CPU usage and accesses, if the CPU usage is greater than a preset threshold (eg, 20%) and the accesses are greater than a target threshold (eg, 10,000), then the operating parameters are considered to meet the preset conditions.

在一些示例中,降级服务器中预先配置了降级策略表,当运行参数满足预设条件时,此时可以根据运行参数查询降级策略表,确定可处理的第二数据类型。In some examples, a downgrade policy table is pre-configured in the downgrade server. When the running parameters meet the preset conditions, the downgrade policy table can be queried according to the running parameters to determine the second data type that can be processed.

示例性的,以运行参数包括CPU占用率为例,降级策略表如表2所示。Exemplarily, taking running parameters including CPU usage as an example, the downgrade policy table is shown in Table 2.

表2Table 2

示例性的,以运行参数包括访问量为例,降级策略表如表3所示。Exemplarily, taking the running parameters including traffic as an example, the downgrade policy table is shown in Table 3.

表3table 3

示例性的,以运行参数包括CPU占用率和访问量为例,降级策略表如表4所示。Exemplarily, taking the operating parameters including CPU usage and traffic as an example, the downgrade policy table is shown in Table 4.

表4Table 4

具体的,第二数据类型为降级服务器可处理的数据类型。Specifically, the second data type is a data type that the downgraded server can process.

S16、在第一数据类型和第二数据类型不相同的情况下,从业务服务器获取用户请求的业务数据。S16. If the first data type is different from the second data type, acquire the service data requested by the user from the service server.

在一些示例中,本公开实施例提供的数据处理方法,为了保证对原有的业务结果返回没有影响,业务数据采用在返回的响应头Header中增加用于表示第一数据类型的标识,如:JHK-D-Data-Type,当第一数据类型为用户画像数据时,此时JHK-D-Data-Type=userpack。这样,就可以通过对业务数据进行解析,确定该业务数据对应的第一数据类型。In some examples, in order to ensure that the data processing method provided by the embodiments of the present disclosure has no impact on the return of the original business results, the business data uses an identifier for the first data type added to the returned response header, such as: JHK-D-Data-Type, when the first data type is user portrait data, then JHK-D-Data-Type=userpack. In this way, the first data type corresponding to the service data can be determined by parsing the service data.

S17、通过网关向显示设备发送携带业务数据的第一显示信息。S17. Send the first display information carrying the service data to the display device through the gateway.

在一些示例中,为了防止业务服务器的负载突然增大,或者业务服务器发生异常。通过对业务服务器的运行参数进行监测,从而可以自动地选择由业务服务器处理的用户请求,或者由降级服务器处理的用户请求。如:运行参数包括CPU占用率时,若CPU占用率为15%,通过查询表2可知,确定可处理的第二数据类型包括静态数据。此时,若第一数据类型为个性化推荐数据,由于第一数据类型与第二数据类型不同,此时可以通过业务服务器去处理用户请求。或者,运行参数包括CPU占用率时,CPU占用率为30%,通过查询表2可知,确定可处理的第二数据类型包括静态数据和个性化推荐数据。此时,若第一数据类型为个性化推荐数据,由于第一数据类型与第二数据类型相同,此时可以不通过业务服务器去处理用户请求,从而可以实现对用户请求的分流。In some examples, in order to prevent the load of the business server from suddenly increasing, or the business server is abnormal. By monitoring the operating parameters of the service server, the user request processed by the service server or the user request processed by the degraded server can be automatically selected. For example, when the operating parameters include the CPU occupancy rate, if the CPU occupancy rate is 15%, it can be known from the query table 2 that the second data type that can be processed includes static data. At this time, 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 service server at this time. Alternatively, when the running parameter includes the CPU usage rate, the CPU usage rate is 30%, and it can be seen from Table 2 that the second data type that can be determined to be processed includes static data and personalized recommendation data. At this time, if the first data type is personalized recommendation data, since the first data type is the same as the second data type, the service server may not be used to process the user request at this time, so that the distribution of user requests can be realized.

或者,运行参数包括访问量时,若访问量为8000,通过查询表3可知,确定可处理的第二数据类型包括静态数据。此时,若第一数据类型为个性化推荐数据,由于第一数据类型与第二数据类型不同,此时可以通过业务服务器去处理用户请求。或者,运行参数包括访问量时,若访问量为30000,通过查询表3可知,确定可处理的第二数据类型包括静态数据和个性化推荐数据。此时,若第一数据类型为个性化推荐数据,由于第一数据类型与第二数据类型不同,此时可以通过业务服务器去处理用户请求,从而可以实现对用户请求的分流。Alternatively, when the operating parameters include the number of visits, if the number of visits is 8000, it can be seen from the lookup table 3 that the second data type determined to be processed includes static data. At this time, 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 service server at this time. Alternatively, when the operating parameters include the number of visits, if the number of visits is 30,000, it can be known from the lookup table 3 that the second data type determined to be processed includes static data and personalized recommendation data. At this time, 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 by the service server at this time, so that the distribution of user requests can be realized.

或者,运行参数包括CPU占用率和访问量时,若CPU占用率为15%,访问量为8000,通过查询表4可知,确定可处理的第二数据类型包括静态数据。此时,若第一数据类型为个性化推荐数据,由于第一数据类型与第二数据类型不同,此时可以通过业务服务器去处理用户请求。或者,运行参数包括访问量时,若CPU占用率为30%,访问量为30000,通过查询表4可知,确定可处理的第二数据类型包括静态数据和个性化推荐数据。此时,若第一数据类型为个性化推荐数据,由于第一数据类型与第二数据类型不同,此时可以通过业务服务器去处理用户请求,从而可以实现对用户请求的分流。Alternatively, when the operating parameters include CPU occupancy rate and access volume, if the CPU occupancy rate is 15% and the access volume is 8000, it can be known from the query table 4 that the second data type determined to be processed includes static data. At this time, 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 service server at this time. Alternatively, when the operating parameters include the number of visits, if the CPU usage is 30% and the number of visits is 30,000, it can be seen from the lookup table 4 that the second data type determined to be processed includes static data and personalized recommendation data. At this time, 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 by the service server at this time, so that the distribution of user requests can be realized.

可以看出,本公开实施例提供的数据处理方法,通过对业务服务器的运行参数进行监测,从而可以根据运行参数确定业务服务器的负载情况,或者是否发生异常,进而可以分配业务服务器处理的用户请求,以及降级服务器处理的用户请求,实现对业务服务器的负载进行均衡,避免由于业务服务器的负载较大,导致用户无法正常进行业务访问的问题。It can be seen that the data processing method provided by the embodiment of the present disclosure monitors the operating parameters of the business server, so that the load of the business server can be determined according to the operating parameters, or whether an abnormality occurs, and then the user request processed by the business server can be allocated. , and downgrade the user request processed by the server to balance the load of the business server and avoid the problem that the user cannot normally access the business due to the heavy load of the business server.

在一些可实施的示例中,结合图4,如图8所示,本公开实施例提供的数据处理方法,还包括:S18-S21。In some practicable examples, referring to FIG. 4 , as shown in FIG. 8 , the data processing method provided by the embodiment of the present disclosure further includes: S18-S21.

S18、在第一数据类型和第二数据类型相同的情况下,通过网关向显示设备发送携带目标标识的重定向信息,以便显示设备在接收到重定向信息后,将重定向信息发送至边缘服务器。S18. In the case that 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 sends the redirection information to the edge server after receiving the redirection information .

在一些示例中,边缘服务器在接收到显示设备发送的重定向信息后,边缘服务器会根据重定向信息中的目标标识,查询边缘服务器的存储器中是否存在与该目标标识对应的缓存数据。In some examples, after the edge server receives the redirection information sent by the display device, the edge server queries whether there is cache data corresponding to the target identifier in the memory of the edge server according to the target identifier in the redirection information.

当边缘服务器确定存储器中存储有与该目标标识对应的缓存数据时,边缘服务器向显示设备发送携带该缓存数据的显示信息。When the edge server determines that cached data corresponding to the target identifier is stored in the memory, the edge server sends display information carrying the cached data to the display device.

当边缘服务器确定存储器中未存储有与该目标标识对应的缓存数据时,此时边缘服务器会向网关发送携带目标标识的回源信息。之后,网关在接收到边缘服务器发送的回源信息后,将该回源信息转发至降级服务器。降级服务器在接收到网关发送的回源信息后,根据该回源信息中的目标标识,确定降级数据。之后,向边缘服务器发送携带降级数据的返回信息。边缘服务器在接收到降级服务器发送的返回信息后,将该返回信息携带的降级数据存储至存储器中,生成缓存数据,方便下次有相同的目标标识再次查询缓存数据时,可以直接读取该目标标识对应的缓存数据。同时,边缘服务器还需要向显示设备发送携带降级数据的第二显示信息。When the edge server determines that there is no cached data corresponding to the target ID stored in the memory, the edge server will send back-to-origin information carrying the target ID to the gateway. Afterwards, after receiving the back-to-origin information sent by the edge server, the gateway forwards the back-to-origin information to the degraded server. After receiving the back-to-source information sent by the gateway, the downgrade server determines downgrade data according to the target identifier in the back-to-source information. Afterwards, return information carrying the degraded data is sent to the edge server. After receiving the return information sent by the downgrading server, the edge server stores the downgraded data carried in the returned information in the memory to generate cached data, so that the target can be read directly when the next time the same target ID queries the cached data again. Identifies the corresponding cached data. At the same time, the edge server also needs to send the second display information carrying the degraded data to the display device.

具体的,边缘服务器在将降级数据存储至存储器时,可以生成内容分发网络(Content Delivery Network,CDN)缓存数据。Specifically, when the edge server stores the degraded data in the memory, it may generate content delivery network (Content Delivery Network, CDN) cache data.

S19、接收网关发送的携带目标标识的回源信息。其中,回源信息为边缘服务器在接收到重定向信息后,根据重定向信息中的目标标识,确定不存在与目标标识相匹配的缓存数据时,向网关发送的。S19. Receive the back-to-source information carrying the target identifier sent by the gateway. Wherein, the back-to-source information is sent by the edge server to the gateway after receiving the redirection information and determining that there is no cached data matching the target identifier according to the target identifier in the redirection information.

S20、根据回源信息中的目标标识,确定降级数据。其中,降级数据为业务服务器返回的与目标标识相同的用户请求对应的业务数据中的一个。S20. Determine downgraded data according to the target identifier in the back-to-source information. 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.

S21、通过网关向边缘服务器发送携带降级数据的返回信息,以便边缘服务器根据返回信息,生成与降级数据对应的缓存数据,并向显示设备发送携带降级数据的第二显示信息。S21. Send return information carrying downgraded data to the edge server through the gateway, so that the edge server generates cache data corresponding to the downgraded data according to the returned information, and sends second display information carrying the downgraded data to the display device.

在一些可实施的示例中,账号类型包括已实名账号和未实名账号,结合图8,如图9所示,上述S20具体可以通过下述S200和S201实现。In some practicable examples, the account type includes a real-name account and an unreal-name account. Referring to FIG. 8 , as shown in FIG. 9 , the above S20 can be specifically implemented through the following S200 and S201.

S200、在目标标识对应的账号类型为已实名账号的情况下,对目标标识对应的账号类型进行转换,将目标标识对应的账号类型更改为未实名账号。S200. In the case that the account type corresponding to the target identifier is a real-name account, convert the account type corresponding to the target identifier, and change the account type corresponding to the target identifier into an unreal-name account.

S201、根据更改后的目标标识,确定存在与更改后的目标标识对应的业务数据的情况下,将更改后的目标标识对应的业务数据作为降级数据。S201. According to the changed target identifier, if it is determined that there is service data corresponding to the changed target identifier, use the service data corresponding to the changed target identifier as downgraded data.

在一些示例中,降级服务器的分流服务模块还包括回源接口。回源接口判断泛化后的URL中的customerId是否为已实名账号(如:customerId=1时,表示是已实名账号;customerId=0时,表示是未实名账号)。由于未实名账号的降级数据与该未实名账号的实际业务数据的差距较小,因此确定泛化后的URL中的customerId为已实名账号,则转换为customerId=0的未实名账号的泛化URL。这样,可以保证显示设备显示的目标业务的显示页面的显示质量。In some examples, the distribution service module of the degraded server further includes a back-to-source interface. The back-to-source interface judges whether the customerId in the generalized URL is a real-named account (for example, when customerId=1, it means that it is a real-named account; when customerId=0, it means that it is an unrealized account). Since there is a small gap between the degraded data of the unverified account and the actual business data of the unverified account, it is determined that the customerId in the generalized URL is a verified account, and then converted to the generalized URL of the unverified account with customerId=0 . In this way, the display quality of the display page of the target service displayed by the display device can be guaranteed.

一种情况下,回源接口按照未实名账号的泛化URL对应的md5'取值作为Key,在降级服务器的存储器中查询与该md5'取值相对应的存储数据。若降级服务器的存储器中存在与该md5'取值相对应的存储数据,则通过网关将该存储数据返回给边缘服务器。In one case, the back-to-source interface uses the md5' value corresponding to the generalized URL of the unreal-name account as the Key, and queries the storage data corresponding to the md5' value in the storage of the downgraded server. If there is stored data corresponding to the md5' value in the memory of the degraded server, the stored data is returned to the edge server through the gateway.

另一种情况下,降级服务器的存储器中不存在与该md5'取值相对应的存储数据,此时需要重新按照已实名账号的泛化URL(即更改前的目标标识)对应的md5”取值作为Key,重新在降级服务器的存储器中查询与该md5”取值相对应的存储数据。若降级服务器的存储器中存在与该md5”取值相对应的存储数据,则将该存储数据返回给显示设备。若降级服务器的存储器中不存在与该md5”取值相对应的存储数据,向业务服务器请求获取该用户请求对应的业务数据,并通过网关将该业务数据返回给边缘服务器。In another case, there is no stored data corresponding to the value of md5' in the memory of the downgraded server. At this time, it is necessary to retake the md5" corresponding to the generalized URL of the real-name account (that is, the target ID before the change). The value is used as the Key, and the storage data corresponding to the md5" value is queried again in the memory of the degraded server. If there is stored data corresponding to the md5" value in the memory of the downgraded server, then the stored data is returned to the display device. If there is no stored data corresponding to the md5" value in the memory of the downgraded server, send to The service server requests to acquire the service data corresponding to the user request, and returns the service data to the edge server through the gateway.

具体的,降级服务器的存储器中查询与该md5取值相对应的存储数据,或者降级服务器向业务服务器请求获取该用户请求对应的业务数据的逻辑如下:Specifically, the storage data corresponding to the md5 value is queried in the memory of the degraded server, or the logic of the degraded server requesting the business server to obtain the business data corresponding to the user request is as follows:

一、降级服务器优先在存储器中查询与该md5取值相对应的存储数据,若降级服务器的存储器中存在与该md5取值相对应的存储数据,将该存储数据作为降级数据并通过网关将降级数据返回给边缘服务器,同时在返回的降级数据的Header中添加JHK-D-Collect-Data=0的不采集标识,和CDN生存时间(Time To Live,TTL)有效时间。网关在接收到降级服务器发送的降级数据后,通过对降级数据Header进行识别,当JHK-D-Collect-Data=0时,此时网关将该降级数据发送至边缘服务器。1. The downgrading server first queries the stored data corresponding to the md5 value in the memory. If there is stored data corresponding to the md5 value in the memory of the downgrading server, the stored data is used as the downgraded data and the downgraded data is passed through the gateway. The data is returned to the edge server, and at the same time, a non-collection flag of JHK-D-Collect-Data=0 is added to the Header of the returned degraded data, and the effective time of CDN Time To Live (TTL) is added. After receiving the downgraded data sent by the downgraded server, the gateway identifies the downgraded data Header, and when JHK-D-Collect-Data=0, the gateway sends the downgraded data to the edge server.

若降级服务器的存储器中不存在与该md5取值相对应的存储数据,则向业务服务器请求获取该用户请求对应的业务数据,业务服务器返回http status=200的业务数据,将该业务服务器返回的业务数据作降级数据,并通过网关将降级数据返回给边缘服务器,同时在返回的降级数据的Header中添加JHK-D-Collect-Data=1的采集标识,和CDN TTL有效时间。网关在接收到降级服务器发送的降级数据后,通过对降级数据Header进行识别,当JHK-D-Collect-Data=1时,此时网关将该降级数据发送至边缘服务器,并采用异步消息机制,向降级服务器的消息订阅模块发送携带该降级数据的异步消息。之后,消息订阅模块在接收到该异步消息后,将该降级数据发送至采集服务器模块。采集服务器模块确定数据存储模块中为存储有与该降级数据对应的md5的存储数据时,将该降级数据存储至数据存储模块,并于后续使用。If there is no stored data corresponding to the md5 value in the memory of the degraded server, then request the business server to obtain the business data corresponding to the user request, the business server returns the business data of http status=200, and the business server returns the The business data is used as downgraded data, and the downgraded data is returned to the edge server through the gateway, and at the same time, the collection identifier of JHK-D-Collect-Data=1 is added to the Header of the returned downgraded data, and the effective time of CDN TTL is added. After receiving the degraded data sent by the degraded server, the gateway identifies the degraded data Header. When JHK-D-Collect-Data=1, the gateway sends the degraded data to the edge server and adopts an asynchronous message mechanism. Send an asynchronous message carrying the downgrade data to the message subscription module of the downgrade server. Afterwards, after receiving the asynchronous message, the message subscription module sends the degraded data to the collection server module. When the acquisition server module determines that the md5 storage data corresponding to the degraded data is stored in the data storage module, the degraded data is stored in the data storage module for subsequent use.

在一些可实施的示例中,结合图9,如图10所示,上述S20具体可以通过下述S202实现。In some practicable examples, referring to FIG. 9 , as shown in FIG. 10 , the above S20 may be specifically implemented through the following S202.

S202、根据更改后的目标标识,确定不存在与更改后的目标标识对应的降级数据,且根据更改前的目标标识,确定存在与更改前的目标标识对应的业务数据的情况下,将更改后的目标标识对应的业务数据作为降级数据。S202. According to the changed target ID, it is determined that there is no degraded data corresponding to the changed target ID, and according to the pre-changed target ID, if it is determined that there is business data corresponding to the pre-changed target ID, the modified The business data corresponding to the target identifier is used as the degraded data.

在一些可实施的示例中,结合图4,如图11所示,上述S14具体可以通过下述S140和S141实现。In some practicable examples, referring to FIG. 4 , as shown in FIG. 11 , the above S14 may be specifically implemented through the following S140 and S141.

S140、根据目标标识在数据库中进行查询,确定目标标识对应的存储数据。其中,存储数据为业务服务器返回的与目标标识相同的用户请求对应的业务数据中的一个。S140. Perform a query in the database according to the target identifier, and determine stored data corresponding to the target identifier. Wherein, the stored data is one of the service data returned by the service server corresponding to the user request with the same target identifier.

示例性的,存储数据的数据格式如表5所示。Exemplarily, the data format of the stored data is shown in Table 5.

表5table 5

S141、根据存储数据,确定存储数据的第一数据类型。S141. Determine a first data type of the stored data according to the stored data.

在一些可实施的示例中,一个存储数据对应一个时间戳;结合图11,如图12所示,本公开实施例提供的数据处理方法还包括S22和S23。In some practicable examples, one piece of stored data corresponds to one time stamp; with reference to FIG. 11 , as shown in FIG. 12 , the data processing method provided by the embodiment of the present disclosure further includes S22 and S23.

S22、根据当前时刻和时间戳对应的时刻,确定时间间隔。S22. Determine the time interval according to the current time and the time corresponding to the time stamp.

S23、在时间间隔大于时间阈值的情况下,从业务服务器返回的在时间戳对应的时刻与当前时刻之间的,与目标标识相同的用户请求对应的业务数据中选取一个业务数据作为存储数据。S23. When the time interval is greater than the time threshold, select a service data as storage data from the service data corresponding to the user request with the same target identifier returned by the service server between the time corresponding to the time stamp and the current time.

在一些示例中,为了在业务服务器的负载较高,或者业务服务器发生异常时,显示设备可以正常的进行业务请求,本公开实施例提供的数据处理方法,网关在将用户请求对应的业务数据发送至显示设备时,通过异步消息机制将该业务数据发送至降级服务器的消息订阅模块。之后,降级服务器的消息订阅模块将该业务数据发送至采集服务模块。为了防止频繁地将业务数据存储至降级服务器的数据存储模块,采集服务模块在接收到业务数据后,通过对该业务数据进行识别,从而可以确定该业务数据的数据类型,以及该业务数据对应的目标标识(如:md5”')。之后,采集服务模块获取数据存储模块存储的该md5”'对应的存储数据的时间戳。之后,采集服务模块通过对当前时刻和该md5”'对应的存储数据的时间戳对应的时刻作差,确定时间间隔。当时间间隔小于或等于时间阈值时,采集服务模块丢弃消息订阅模块发送的业务数据。当时间间隔大于时间阈值时,采集服务模块将消息订阅模块发送的业务数据发送至数据存储模块。数据存储模块在接收到采集服务模块发送的业务数据后,替换该md5”'对应的存储数据。In some examples, in order for the display device to normally perform service requests when the load of the service server is high or the service server is abnormal, in the data processing method provided by the embodiment of the present disclosure, the gateway sends the service data corresponding to the user request to When reaching the display device, the business data is sent to the message subscription module of the downgrade server through an asynchronous message mechanism. Afterwards, the message subscription module of the degraded server sends the business data to the collection service module. In order to prevent business data from being frequently stored in the data storage module of the degraded server, after receiving the business data, the acquisition service module can identify the business data to determine the data type of the business data and the corresponding The target identifier (such as: md5"'). Afterwards, the collection service module obtains the time stamp of the stored data corresponding to the md5"' stored by the data storage module. Afterwards, the collection service module determines the time interval by making a difference between the current time and the time corresponding to the time stamp of the stored data corresponding to the md5"'. When the time interval is less than or equal to the time threshold, the collection service module discards the message sent by the message subscription module Business data. When the time interval is greater than the time threshold, the collection 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 collection service module, the data storage module replaces the md5"' corresponding Storing data.

具体的,采集服务模块向数据存储模块发送业务数据时,可以将时间间隔大于时间阈值时,将消息订阅模块发送的目标标识为该md5”'的第一个业务数据发送至数据存储模块。Specifically, when the acquisition service module sends business data to the data storage module, when the time interval is greater than the time threshold, the message subscription module sends the first business data identified as the md5"' to the data storage module.

或者,采集服务模块向数据存储模块发送业务数据时,可以将时间间隔大于时间阈值时,在预设时间内随机选择消息订阅模块发送的目标标识为该md5”'的业务数据中的一个,发送至数据存储模块。Or, when the acquisition service module sends business data to the data storage module, when the time interval is greater than the time threshold, it can randomly select one of the business data sent by the message subscription module as the md5"' within the preset time, and send to the data storage module.

这样,及时业务服务器的负载较高,或者业务服务器发生异常时,降级服务器也可以正常地下对显示设备发送的业务请求进行处理,从而保证用户的体验。In this way, even when the load of the service server is high, or the service server is abnormal, the degraded server can also normally process the service request sent by the display device, thereby ensuring user experience.

在一些可实施的示例中,运行参数至少包括中央处理器CPU占用率和访问量中的任一项;结合图4,如图13所示,上述S15具体可以通过下述S150实现。In some practicable examples, the operating parameters include at least any one of the CPU usage rate of the central processing unit and the access amount; referring to FIG. 4 , as shown in FIG. 13 , the above S15 can be specifically implemented through the following S150.

S150、在运行参数满足预设条件的情况下,根据运行参数查询降级策略表,确定运行参数对应的第二数据类型。其中,降级策略表包括运行参数与第二数据类型的对应关系。S150. When the operating parameters meet the preset condition, query the downgrade policy table according to the operating parameters, and determine the second data type corresponding to the operating parameters. Wherein, the downgrading policy table includes the corresponding relationship between the operating parameters and the second data type.

上述主要从方法的角度对本申请实施例提供的方案进行了介绍。为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The foregoing mainly introduces the solutions provided by the embodiments of the present application from the perspective of methods. In order to realize the above functions, it includes corresponding hardware structures and/or software modules for performing various functions. Those skilled in the art should easily realize that the present application can be implemented in the form of hardware or a combination of hardware and computer software in combination with the units and algorithm steps of each example described in the embodiments disclosed herein. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.

本申请实施例可以根据上述方法示例对数据处理装置进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiments of the present application may divide the functional modules of the data processing device according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. It should be noted that the division of modules in the embodiment of the present application is schematic, and is only a logical function division, and there may be other division methods in actual implementation.

本申请的实施例提供一种降级服务器3的结构示意图。包括通信器101和处理器102。The embodiment of the present application provides a schematic structural diagram of a downgrade server 3 . It includes a communicator 101 and a processor 102 .

通信器101,用于接收网关发送的用户请求;其中,用户请求为显示设备访问目标业务时向网关发送的,用户请求至少包括用户账号和设备标识码;通信器101,用于获取业务服务器的运行参数;处理器102,用于对接收单元接收的用户请求进行泛化处理,确定泛化处理后的用户请求对应的目标标识;其中,一个用户账号对应一个账号类型,目标标识、账号类型和设备标识码三者一一对应;处理器102,还用于根据目标标识,确定目标标识对应的第一数据类型;处理器102,还用于在运行参数满足预设条件的情况下,根据运行参数,确定可处理的第二数据类型;处理器102,还用于在第一数据类型和第二数据类型不相同的情况下,控制通信器101从业务服务器获取用户请求的业务数据;处理器102,还用于控制通信器101通过网关向显示设备发送携带业务数据的第一显示信息。The communicator 101 is used to receive the user request sent by the gateway; wherein, the user request is sent to the gateway when the display device accesses the target service, and the user request includes at least a user account and a device identification code; the communicator 101 is used to obtain the service server's Operating parameters; the processor 102 is configured to generalize the user request received by the receiving unit, and determine the target identifier corresponding to the generalized user request; wherein, a user account corresponds to an account type, and the target identifier, account type and The three equipment identification codes correspond to each other; the processor 102 is also used to determine the first data type corresponding to the target ID according to the target ID; the processor 102 is also used to determine the first data type corresponding to the target ID according to the operating parameters parameter, to determine the second data type that can be processed; the processor 102 is also used to control the communicator 101 to obtain the service data requested by the user from the service server when the first data type and the second data type are different; the processor 102, further configured to control the communicator 101 to send the first display information carrying service data to the display device through the gateway.

在一些可实施的示例中,处理器102,还用于在第一数据类型和第二数据类型相同的情况下,控制通信器101通过网关向显示设备发送携带目标标识的重定向信息,以便显示设备在接收到重定向信息后,将重定向信息发送至边缘服务器;通信器101,还用于接收网关发送的携带目标标识的回源信息;其中,回源信息为边缘服务器在接收到重定向信息后,根据重定向信息中的目标标识,确定不存在与目标标识相匹配的缓存数据时,向网关发送的;处理器102,还用于根据通信器101接收的回源信息中的目标标识,确定降级数据;其中,降级数据为业务服务器返回的与目标标识相同的用户请求对应的业务数据中的一个;处理器102,还用于控制通信器101向边缘服务器发送携带降级数据的返回信息,以便边缘服务器根据返回信息,生成与降级数据对应的缓存数据,并向显示设备发送携带降级数据的第二显示信息。In some practicable examples, the processor 102 is further configured to control the communicator 101 to send redirection information carrying the target identifier to the display device through the gateway in order to display After receiving the redirection information, the device sends the redirection information to the edge server; the communicator 101 is also used to receive the back-to-source information carrying the target identifier sent by the gateway; wherein, the back-to-source information is the edge server receiving the redirection After receiving the information, according to the target identifier in the redirection information, when it is determined that there is no cached data matching the target identifier, it is sent to the gateway; the processor 102 is also used to , to determine the degraded data; where the degraded data is one of the service data returned by the service server corresponding to the user request with the same target identifier; the processor 102 is also used to control the communicator 101 to send return information carrying the degraded data to the edge server , so that the edge server generates cache data corresponding to the downgraded data according to the returned information, and sends the second display information carrying the downgraded data to the display device.

在一些可实施的示例中,账号类型包括已实名账号和未实名账号;处理器102,具体用于在通信器101接收的回源信息中的目标标识对应的账号类型为已实名账号的情况下,对目标标识对应的账号类型进行转换,将目标标识对应的账号类型更改为未实名账号;处理器102,具体用于根据更改后的目标标识,确定存在与更改后的目标标识对应的业务数据的情况下,将更改后的目标标识对应的业务数据作为降级数据。In some practicable examples, the account type includes a real-name account and an unreal-name account; the processor 102 is specifically used in the case where the account type corresponding to the target identifier in the back-to-source information received by the communicator 101 is a real-name account , converting the account type corresponding to the target identifier, and changing the account type corresponding to the target identifier into an unreal-name account; the processor 102 is specifically configured to determine that there is business data corresponding to the changed target identifier according to the changed target identifier In the case of , take the business data corresponding to the changed target ID as the downgraded data.

在一些可实施的示例中,处理器102,具体用于根据更改后的目标标识,确定不存在与更改后的目标标识对应的降级数据,且根据更改前的目标标识,确定存在与更改前的目标标识对应的业务数据的情况下,将更改后的目标标识对应的业务数据作为降级数据。In some practicable examples, the processor 102 is specifically configured to determine, according to the modified target ID, that there is no degraded data corresponding to the modified target ID, and determine that there is In the case of the business data corresponding to the target ID, the business data corresponding to the changed target ID is taken as the degraded data.

在一些可实施的示例中,处理器102,具体用于根据目标标识在数据库中进行查询,确定目标标识对应的存储数据;其中,存储数据为业务服务器返回的与目标标识相同的用户请求对应的业务数据中的一个;处理器102,具体用于根据存储数据,确定存储数据的第一数据类型。In some practicable examples, the processor 102 is specifically configured to perform a query in the database according to the target ID, and determine the stored data corresponding to the target ID; where the stored data is returned by the service server and corresponds to the user request identical to the target ID One of the service data; the processor 102 is specifically configured to determine a first data type of the stored data according to the stored data.

在一些可实施的示例中,一个存储数据对应一个时间戳;处理器102,还用于根据当前时刻和时间戳对应的时刻,确定时间间隔;处理器102,还用于在时间间隔大于时间阈值的情况下,控制通信器101从业务服务器返回的在时间戳对应的时刻与当前时刻之间的,与目标标识相同的用户请求对应的业务数据中选取一个业务数据作为存储数据。In some practicable examples, one stored data corresponds to a time stamp; the processor 102 is further configured to determine the time interval according to the current time and the time corresponding to the time stamp; the processor 102 is further configured to determine the time interval when the time interval is greater than the time threshold In the case of , the control communicator 101 selects one service data as stored data from the service data corresponding to the user request with the same target identifier returned by the service server between the time corresponding to the time stamp and the current time.

在一些可实施的示例中,运行参数至少包括中央处理器CPU占用率和访问量中的任一项;处理器102,具体用于在通信器101获取的运行参数满足预设条件的情况下,根据运行参数查询降级策略表,确定运行参数对应的第二数据类型;其中,降级策略表包括运行参数与第二数据类型的对应关系。In some practicable examples, the operating parameters include at least any one of the CPU usage of the central processing unit and the number of visits; the processor 102 is specifically configured to, when the operating parameters obtained by the communicator 101 meet a preset condition, The downgrading strategy table is queried according to the operating parameters to determine the second data type corresponding to the operating parameters; wherein, the downgrading strategy table includes a corresponding relationship between the operating parameters and the second data type.

其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,其作用在此不再赘述。Wherein, all relevant content of each step involved in the above method embodiment can be referred to the function description of the corresponding function module, and its function will not be repeated here.

当然,本申请实施例提供的降级服务器3包括但不限于上述模块,例如降级服务器3还可以包括存储器103。存储器103可以用于存储该降级服务器3的程序代码,还可以用于存储降级服务器3在运行过程中生成的数据,如写请求中的数据等。Of course, the downgrade server 3 provided in this embodiment of the present application includes but is not limited to the above-mentioned modules, for example, the downgrade server 3 may also include a memory 103 . The memory 103 can be used to store the program code of the downgrade server 3 , and can also be used to store data generated by the downgrade server 3 during operation, such as data in a write request.

作为一个示例,结合图3,降级服务器3中的消息订阅模块302、降级策略模块304实现的功能通信器101的功能相同,分流服务模块301和采集服务模块302实现的功能与处理器102的功能相同,显示单元212实现的功能与显示器103的功能相同,数据存储模块303实现的功能与存储器103的功能相同。As an example, in conjunction with FIG. 3 , the function communicator 101 implemented by the message subscription module 302 in the downgrade server 3 and the downgrade strategy module 304 have the same functions, and the functions realized by the distribution service module 301 and the collection service module 302 are the same as those of the processor 102 Similarly, the function realized by the display unit 212 is the same as that of the display 103 , and the function realized by the data storage module 303 is the same as that of the memory 103 .

本申请实施例还提供一种芯片系统,该芯片系统可以应用于前述实施例中的降级服务器3。该芯片系统包括至少一个处理器1501和至少一个接口电路1502。该处理器1501可以是上述降级服务器3中的处理器。处理器1501和接口电路1502可通过线路互联。该处理器1501可以通过接口电路1502从上述降级服务器3的存储器接收并执行计算机指令。当计算机指令被处理器1501执行时,可使得降级服务器3执行上述实施例中降级服务器3执行的各个步骤。当然,该芯片系统还可以包含其他分立器件,本申请实施例对此不作具体限定。The embodiment of the present application also provides a chip system, which can be applied to the degraded server 3 in the foregoing embodiments. The chip system includes at least one processor 1501 and at least one interface circuit 1502 . The processor 1501 may be the processor in the above-mentioned downgrade server 3 . The processor 1501 and the interface circuit 1502 can be interconnected through wires. The processor 1501 can receive and execute computer instructions from the memory of the above-mentioned downgrade server 3 through the interface circuit 1502 . When the computer instructions are executed by the processor 1501, the downgrade server 3 can be made to perform various steps performed by the downgrade server 3 in the above-mentioned embodiments. Of course, the chip system may also include other discrete devices, which is not specifically limited in this embodiment of the present application.

本申请实施例还提供一种计算机可读存储介质,用于存储上述降级服务器3运行的计算机指令。The embodiment of the present application also provides a computer-readable storage medium for storing the computer instructions for running the above-mentioned downgrade server 3 .

本申请实施例还提供一种计算机程序产品,包括上述降级服务器3运行的计算机指令。The embodiment of the present application also provides a computer program product, including computer instructions for running the above-mentioned downgrade server 3 .

以上所述仅是本公开的具体实施方式,使本领域技术人员能够理解或实现本公开。对这些实施例的多种修改对本领域的技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本公开的精神或范围的情况下,在其它实施例中实现。因此,本公开将不会被限制于本文所述的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above descriptions are only specific implementation manners of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. 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 the present disclosure. Therefore, the present disclosure will not 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 (10)

Translated fromChinese
1.一种数据处理方法,其特征在于,包括:1. A data processing method, characterized in that, comprising:接收网关发送的用户请求;其中,所述用户请求为显示设备访问目标业务时向所述网关发送的,所述用户请求至少包括用户账号和设备标识码;Receiving a user request sent by the gateway; wherein, the user request is sent to the gateway when the display device accesses the target service, and the user request includes at least a user account and a device identification code;获取业务服务器的运行参数;Obtain the operating parameters of the business server;对所述用户请求进行泛化处理,确定泛化处理后的所述用户请求对应的目标标识;其中,一个用户账号对应一个账号类型,目标标识、账号类型和设备标识码三者一一对应;Perform generalization processing on the user request, and determine a target identifier corresponding to the user request after the generalization processing; wherein, a user account corresponds to an account type, and the target identifier, account type, and device identification code are in one-to-one correspondence;根据所述目标标识,确定所述目标标识对应的第一数据类型;determining a first data type corresponding to the target identifier according to the target identifier;在所述运行参数满足预设条件的情况下,根据所述运行参数,确定可处理的第二数据类型;When the operating parameters meet the preset conditions, according to the operating parameters, determine the second data type that can be processed;在所述第一数据类型和所述第二数据类型不相同的情况下,从所述业务服务器获取所述用户请求的业务数据;If the first data type is different from the second data type, obtain the service data requested by the user from the service server;通过所述网关向所述显示设备发送携带所述业务数据的第一显示信息。Sending the first display information carrying the service data to the display device through the gateway.2.根据权利要求1所述的数据处理方法,其特征在于,所述方法还包括:2. The data processing method according to claim 1, wherein the method further comprises:在所述第一数据类型和所述第二数据类型相同的情况下,通过所述网关向所述显示设备发送携带所述目标标识的重定向信息,以便所述显示设备在接收到所述重定向信息后,将所述重定向信息发送至边缘服务器;In the case that the first data type is the same as the second data type, the gateway sends redirection information carrying the target identifier to the display device, so that the display device receives the redirection information After the orientation information is sent, the redirection information is sent to the edge server;接收所述网关发送的携带所述目标标识的回源信息;其中,所述回源信息为所述边缘服务器在接收到所述重定向信息后,根据所述重定向信息中的目标标识,确定不存在与所述目标标识相匹配的缓存数据时,向所述网关发送的;receiving the origin-returning information carrying the target identifier sent by the gateway; wherein the origin-returning information is determined by the edge server according to the target identifier in the redirection information after receiving the redirection information sent to the gateway when there is no cached data matching the target identifier;根据所述回源信息中的目标标识,确定降级数据;其中,所述降级数据为所述业务服务器返回的与所述目标标识相同的用户请求对应的业务数据中的一个;Determine degraded data according to the target identifier in the back-to-source information; wherein, the degraded data is one of the service data returned by the service server corresponding to the user request identical to the target identifier;通过所述网关向所述边缘服务器发送携带所述降级数据的返回信息,以便所述边缘服务器根据所述返回信息,生成与所述降级数据对应的缓存数据,并向所述显示设备发送携带所述降级数据的第二显示信息。The gateway sends the return information carrying the degraded data to the edge server, so that the edge server generates cache data corresponding to the degraded data according to the returned information, and sends the returned information carrying the degraded data to the display device. The second display message of the degraded data.3.根据权利要求2所述的数据处理方法,其特征在于,所述账号类型包括已实名账号和未实名账号;3. The data processing method according to claim 2, wherein the account type includes a real-name account and an unreal-name account;所述根据所述回源信息中的目标标识,确定降级数据,包括:The determining the degraded data according to the target identifier in the back-to-source information includes:在所述回源信息中的目标标识对应的账号类型为已实名账号的情况下,对所述目标标识对应的账号类型进行转换,将所述目标标识对应的账号类型更改为未实名账号;In the case that the account type corresponding to the target identifier in the back-to-source information is a real-name account, converting the account type corresponding to the target identifier, changing the account type corresponding to the target identifier to an unreal-name account;根据更改后的目标标识,确定存在与所述更改后的目标标识对应的业务数据的情况下,将所述更改后的目标标识对应的业务数据作为所述降级数据。If it is determined according to the changed target identifier that there is service data corresponding to the changed target identifier, the service data corresponding to the changed target identifier is used as the degraded data.4.根据权利要求3所述的数据处理方法,其特征在于,所述方法还包括:4. the data processing method according to claim 3, is characterized in that, described method also comprises:根据更改后的目标标识,确定不存在与所述更改后的目标标识对应的降级数据,且根据更改前的目标标识,确定存在与所述更改前的目标标识对应的业务数据的情况下,将所述更改后的目标标识对应的业务数据作为所述降级数据。According to the changed target ID, if it is determined that there is no degraded data corresponding to the changed target ID, and according to the pre-changed target ID, if it is determined that there is business data corresponding to the pre-changed target ID, the The service data corresponding to the modified target identifier is used as the degraded data.5.根据权利要求1所述的数据处理方法,其特征在于,所述根据所述目标标识,确定所述目标标识对应的第一数据类型,包括:5. The data processing method according to claim 1, wherein said determining the first data type corresponding to the target identifier according to the target identifier comprises:根据所述目标标识在数据库中进行查询,确定所述目标标识对应的存储数据;其中,所述存储数据为所述业务服务器返回的与所述目标标识相同的用户请求对应的业务数据中的一个;Perform a query in the database according to the target ID to determine the stored data corresponding to the target ID; wherein the stored data is one of the service data returned by the service server corresponding to the user request identical to the target ID ;根据所述存储数据,确定所述存储数据的第一数据类型。A first data type of the stored data is determined according to the stored data.6.根据权利要求5所述的数据处理方法,其特征在于,一个存储数据对应一个时间戳;6. The data processing method according to claim 5, wherein a stored data corresponds to a timestamp;所述方法还包括:The method also includes:根据当前时刻和所述时间戳对应的时刻,确定时间间隔;Determine the time interval according to the current moment and the moment corresponding to the timestamp;在所述时间间隔大于时间阈值的情况下,从所述业务服务器返回的在所述时间戳对应的时刻与所述当前时刻之间的,与所述目标标识相同的用户请求对应的业务数据中选取一个业务数据作为所述存储数据。If the time interval is greater than the time threshold, the service data corresponding to the user request with the same target identifier between the time corresponding to the time stamp and the current time returned from the service server A business data is selected as the stored data.7.根据权利要求1所述的数据处理方法,其特征在于,所述运行参数至少包括中央处理器CPU占用率和访问量中的任一项;7. The data processing method according to claim 1, wherein the operating parameters at least include any one of the CPU occupancy rate of the central processing unit and the amount of visits;所述在所述运行参数满足预设条件的情况下,根据所述运行参数,确定可处理的第二数据类型,包括:The determining the second data type that can be processed according to the operating parameters when the operating parameters meet the preset conditions includes:在所述运行参数满足预设条件的情况下,根据所述运行参数查询降级策略表,确定所述运行参数对应的第二数据类型;其中,所述降级策略表包括运行参数与可处理的第二数据类型的对应关系。In the case that the operating parameters meet the preset conditions, query the downgrading policy table according to the operating parameters, and determine the second data type corresponding to the operating parameters; wherein, the downgrading policy table includes operating parameters and processable second data types. Correspondence between two data types.8.一种数据处理装置,其特征在于,包括:8. A data processing device, characterized in that it comprises:接收单元,用于接收网关发送的用户请求;其中,所述用户请求为显示设备访问目标业务时向所述网关发送的,所述用户请求至少包括用户账号和设备标识码;The receiving unit is configured to receive a user request sent by the gateway; wherein, the user request is sent to the gateway when the display device accesses the target service, and the user request includes at least a user account and a device identification code;获取单元,用于获取业务服务器的运行参数;an acquisition unit, configured to acquire operating parameters of the business server;处理单元,用于对所述接收单元接收的所述用户请求进行泛化处理,确定泛化处理后的所述用户请求对应的目标标识;其中,一个用户账号对应一个账号类型,目标标识、账号类型和设备标识码三者一一对应;A processing unit, configured to perform generalization processing on the user request received by the receiving unit, and determine a target identifier corresponding to the generalized user request; wherein, a user account corresponds to an account type, and the target identifier, account number One-to-one correspondence between type and device identification code;所述处理单元,还用于根据所述目标标识,确定所述目标标识对应的第一数据类型;The processing unit is further configured to determine a first data type corresponding to the target identifier according to the target identifier;所述处理单元,还用于在所述获取单元获取的所述运行参数满足预设条件的情况下,根据所述获取单元获取的所述运行参数,确定可处理的第二数据类型;The processing unit is further configured to determine a processable second data type according to the operating parameter acquired by the acquiring unit when the operating parameter acquired by the acquiring unit satisfies a preset condition;所述处理单元,还用于在所述第一数据类型和所述第二数据类型不相同的情况下,从所述业务服务器获取所述用户请求的业务数据;The processing unit is further configured to obtain the service data requested by the user from the service server when the first data type is different from the second data type;所述处理单元,还用于控制发送单元通过所述网关向所述显示设备发送携带所述业务数据的第一显示信息。The processing unit is further configured to control the sending unit to send the first display information carrying the service data to the display device through the gateway.9.一种电子设备,其特征在于,包括:存储器和处理器,所述存储器用于存储计算机程序;所述处理器用于在执行计算机程序时,使得所述电子设备实现权利要求1-7任一项所述的数据处理方法。9. An electronic device, characterized in that it comprises: a memory and a processor, the memory is used to store a computer program; the processor is used to make the electronic device realize any of claims 1-7 when executing the computer program. One of the data processing methods.10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,当所述计算机程序被计算设备执行时,使得所述计算设备实现权利要求1-7任一项所述的数据处理方法。10. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a computing device, the computing device realizes any of claims 1-7. One of the data processing methods.
CN202211091279.XA2022-09-072022-09-07Data processing method and device and electronic equipmentPendingCN116506657A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202211091279.XACN116506657A (en)2022-09-072022-09-07Data processing method and device and electronic equipment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202211091279.XACN116506657A (en)2022-09-072022-09-07Data processing method and device and electronic equipment

Publications (1)

Publication NumberPublication Date
CN116506657Atrue CN116506657A (en)2023-07-28

Family

ID=87321903

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202211091279.XAPendingCN116506657A (en)2022-09-072022-09-07Data processing method and device and electronic equipment

Country Status (1)

CountryLink
CN (1)CN116506657A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107124621A (en)*2017-05-052017-09-01北京奇艺世纪科技有限公司A kind of business scheduling method and device based on cellular network
CN107566429A (en)*2016-06-302018-01-09中兴通讯股份有限公司Base station, the response method of access request, apparatus and system
CN110225104A (en)*2019-05-242019-09-10深圳市明源云科技有限公司Data capture method, device and terminal device
CN110417886A (en)*2019-07-292019-11-05广州竞远安全技术股份有限公司A kind of load-balancing method of integrated service, apparatus and system
CN112732757A (en)*2020-12-302021-04-30北京奇艺世纪科技有限公司Degraded data processing method, system, device, equipment and storage medium
CN114205361A (en)*2021-12-082022-03-18聚好看科技股份有限公司 A load balancing method and server
CN114238483A (en)*2021-12-212022-03-25中国建设银行股份有限公司Data processing method, apparatus, device, medium, and program product
CN114327907A (en)*2021-12-312022-04-12北京奇艺世纪科技有限公司 A service processing method, device, electronic device and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107566429A (en)*2016-06-302018-01-09中兴通讯股份有限公司Base station, the response method of access request, apparatus and system
CN107124621A (en)*2017-05-052017-09-01北京奇艺世纪科技有限公司A kind of business scheduling method and device based on cellular network
CN110225104A (en)*2019-05-242019-09-10深圳市明源云科技有限公司Data capture method, device and terminal device
CN110417886A (en)*2019-07-292019-11-05广州竞远安全技术股份有限公司A kind of load-balancing method of integrated service, apparatus and system
CN112732757A (en)*2020-12-302021-04-30北京奇艺世纪科技有限公司Degraded data processing method, system, device, equipment and storage medium
CN114205361A (en)*2021-12-082022-03-18聚好看科技股份有限公司 A load balancing method and server
CN114238483A (en)*2021-12-212022-03-25中国建设银行股份有限公司Data processing method, apparatus, device, medium, and program product
CN114327907A (en)*2021-12-312022-04-12北京奇艺世纪科技有限公司 A service processing method, device, electronic device and storage medium

Similar Documents

PublicationPublication DateTitle
US7636363B2 (en)Adaptive QoS system and method
US10241839B2 (en)Method and system for generating a virtual device resource accessible by an application
WO2020093500A1 (en)Intelligent scheduling method, terminal device, edge node cluster and intelligent scheduling system
US20130272316A1 (en)Allocating Processing Bandwidth at a Residential Gateway Utilizing Transmission Rules
US12212621B2 (en)Manipulation of content transmissions
US20140165119A1 (en)Offline download method, multimedia file download method and system thereof
US7899905B2 (en)Partial subscription/eventing and event filtering in a home network
US9509548B2 (en)Multimedia aggregation technique based on RSS feeds
CN108965884B (en)Distribution method of transcoding tasks, scheduling device and transcoding device
US20110162025A1 (en)Method and system for providing dynamic time slice encoding for complete internet anywhere
WO2015100994A1 (en)Page processing method, apparatus and system
CN102164117A (en)Video transcoding using a proxy device
US12212620B2 (en)Manipulation and recording of content transmissions
US20140215071A1 (en)Method and device for receiving content
CN102763373A (en)Method and apparatus for using service of home network device based on remote access
WO2022268032A1 (en)Video stream scheduling system and related product
CN102143211A (en)Media content processing method, equipment and system
EP1844591B1 (en)System architecture and method for scheduled downloading services
ChungA smartphone watch for mobile surveillance service
CN114339364A (en) Multimedia data processing method, device, electronic device and storage medium
CN116506657A (en)Data processing method and device and electronic equipment
US9071954B2 (en)Wireless optimized content delivery network
CN113411392A (en)Resource issuing method, device, equipment and computer program product
CN114053689A (en) Service scheduling method, device, device and storage medium for cloud games
CN114785778B (en)Gateway device and content distribution method

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp