Server and information query and recommendation method

By taking the identification information of the terminal device as the key and the identification information and version information of the data grouping as the value, the problem of low efficiency in querying the data grouping to which the terminal device belongs in the prior art is solved, and efficient personalized recommendation information generation and multi-version data grouping management are realized.

CN119807530APending Publication Date: 2025-04-11VIDAA (NETHERLANDS) INT HLDG LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411878732.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The prior art is less efficient when querying the data grouping to which the terminal device belongs, and it is difficult to save multiple versions of the data grouping, which affects the efficiency of personalized recommendation information.

Method used

Using a data storage structure with the identification information of the terminal device as the key and the identification information and version information of the data grouping as the value, the processor receives the acquisition request instruction of the terminal device, obtains the data grouping information associated with the terminal device, and generates personalized recommendation information.

Benefits of technology

Significantly reduce the amount of query data, improve query efficiency, improve the efficiency of generating personalized recommendation information, and facilitate the storage of multiple versions of data clustering, and determine the current data clustering of the terminal equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807530A_ABST
    Figure CN119807530A_ABST
Patent Text Reader

Abstract

Some embodiments of the invention provide a server and an information query and recommendation method, which are applied to the field of big data, and after receiving an acquisition request instruction of a terminal device, the server can acquire a first data group currently associated with the terminal device or historically associated with the terminal device according to identification information of the terminal device included in the acquisition request instruction. Then, according to the version correction information of the first data group and the version information of the first data group, obtaining a second data group currently associated with the terminal equipment; due to the adoption of the data storage structure which takes the identification information of the terminal equipment as a key and takes the identification information and the version information of the first data group as values, the classification to which the terminal equipment belongs can be determined only by traversing the identification information of the terminal equipment once under the condition that different data groups have the same identification information of the terminal equipment. The query data volume can be greatly reduced, the query efficiency is improved, and then the efficiency of generating personalized recommendation information is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data, and in particular to a server and an information query and recommendation method. Background Art

[0002] Data clustering refers to dividing data objects into different groups based on certain rules and characteristics in massive amounts of data. At present, some common application scenarios of data clustering are: formulating personalized recommendation information based on the characteristics of different groups. For example, for fashion lovers, the latest clothing styles and trendy accessories advertisements can be pushed; for electronic product enthusiasts, promotional information on new mobile phones, computers and other electronic products can be pushed. This can improve the effectiveness of marketing activities and increase conversion rates.

[0003] In order to formulate personalized recommendation information based on the characteristics of different groups, it is necessary to pre-store the association between data clusters and data objects, determine which data cluster the data object belongs to based on the association between data clusters and data objects, and then formulate personalized recommendation information based on the characteristics of the data cluster to which the data object belongs.

[0004] At present, it is common to use a data storage structure that uses data cluster ID as the key and data object ID as the value to store the association between data clusters and data objects. This data storage structure is generally called a forward data storage structure. Under this forward data storage structure, one data cluster often corresponds to tens of millions of data object IDs, and multiple data clusters may have a large number of identical data object IDs. When it is necessary to query which data clusters a certain data object belongs to, it is necessary to traverse the data object IDs in each data cluster. The query data volume is huge and the query efficiency is very low, which affects the efficiency of formulating personalized recommendation information.

[0005] In addition, the existing forward data storage structure is not conducive to saving multiple versions of data groups, and it is difficult to determine the data group to which the terminal device currently belongs. Summary of the invention

[0006] The present application provides a server and an information query and recommendation method to solve the problem of low efficiency in querying data grouping to which a terminal device belongs.

[0007] In a first aspect, some embodiments of the present application provide a server, including:

[0008] A communicator configured to establish a communication connection with a terminal device;

[0009] The processor is configured as:

[0010] Receiving an acquisition request instruction of a terminal device, the acquisition request instruction including identification information of the terminal device;

[0011] According to the identification information of the terminal device, a first data set using the identification information of the terminal device as a key is obtained from the database; the first data set includes first data grouping information, and the first data grouping information includes identification information and version information of the first data grouping; the first data grouping is a data grouping currently associated with the terminal device or a data grouping historically associated with the terminal device;

[0012] Obtaining version correction information of the first data group; the version correction information indicates the version information of the first data group that was most recently updated;

[0013] According to the version correction information and version information of the first data group, a second data set is obtained from the first data set; the second data set includes second data group information, the second data group information includes identification information and version information of the second data group, and the second data group is the data group currently associated with the terminal device;

[0014] generating personalized recommendation information according to identification information of the second data group included in the second data set;

[0015] Send personalized recommendation information to the terminal device.

[0016] After receiving the acquisition request instruction from the terminal device, the processor can acquire the first data group currently associated with or historically associated with the terminal device according to the identification information of the terminal device included in the acquisition request instruction. Then, according to the version correction information of the first data group and the version information of the first data group, acquire the second data group currently associated with the terminal device.

[0017] Since a data storage structure is adopted that uses the identification information of the terminal device as a key and the identification information and version information of the first data group as a value, when the identification information of the same terminal device exists in different data groups, the category to which the terminal device belongs can be determined by traversing the identification information of the terminal device only once. Compared with the forward data storage structure, the processor provided in the embodiment of the present application can significantly reduce the amount of query data, improve query efficiency, and thus improve the efficiency of generating personalized recommendation information.

[0018] In addition, since the value of the data storage structure of the embodiment of the present application is composed of the identification information and version information of the first data group to form a versioned data group, this versioned data group is conducive to storing multiple versions and facilitates determining the data group to which the terminal device currently belongs.

[0019] In some embodiments of the present application, the processor is further configured to:

[0020] It is detected that the data group being updated includes identification information of the terminal device, and the identification information and version information of the data group being updated are obtained; the data group being updated includes at least the first data group;

[0021] According to the identification information of the terminal device, querying a first data set with the identification information of the terminal device as a key from a database;

[0022] According to the identification information and version information of the data group being updated, new first data group information is added to the first data set; the new first data group information includes the identification information and version information of the new first data group.

[0023] Since data clusters carry version information, during the data cluster update process, if the data cluster is updated to the identification information of the terminal device, that is, after the data cluster is updated, the terminal device still belongs to the data cluster, then it is only necessary to add the new identification information and version information of the first data cluster to the first data set, and there is no need to change the original first data cluster information in the first data set. Compared with the forward storage structure, during the data cluster update process, it is necessary to completely delete the data set and then rewrite the new data set, or back up the entire data set and delete the old data set after the data cluster update is completed. The embodiment of the present application can reduce the amount of data update, improve data update efficiency, and maintain normal business operation during the data update process.

[0024] In some embodiments of the present application, the processor is further configured to:

[0025] The version information of the data group being updated is generated according to the system timestamp; or the version information of the data group being updated is generated according to the value of the system counter.

[0026] The processor uses the system timestamp or the value of the system counter as the version information of the data group being updated, which is unique and easy to manage and distinguish between new and old versions.

[0027] In some embodiments of the present application, the version correction information is stored in the database using the identification information of the data group as a key; multiple data groups with the same identification information correspond to the same version correction information;

[0028] The processor is also configured to:

[0029] After the data grouping is updated, the old version correction information using the data grouping identification information as the key is queried in the database according to the data grouping identification information;

[0030] Delete the old version information corresponding to the identification information;

[0031] According to the version information of the data grouping, the new version correction information is stored in the database.

[0032] After the data grouping is updated, the processor can update the version correction information corresponding to the identification information of the data grouping, so that the version correction information corresponding to the identification information of the data grouping always remains the most recently updated version, providing an accurate reference for determining the data grouping to which the terminal device currently belongs.

[0033] In some embodiments of the present application, the processor is further configured to:

[0034] If the number of first data groups with the same identification information in the first data set is greater than or equal to a preset number, obtaining version information of the first data groups with the same identification information in the first data set; the version information of the first data group indicates an update time of the first data group;

[0035] The version information of the first data groupings having the same identification information is compared, and the identification information and version information of the first data grouping with the earliest update time are deleted.

[0036] After several version iterations of the first data groupings with the same identification information, the processor deletes the first data grouping with the earliest update time, thereby effectively releasing storage space without affecting the query service.

[0037] In some embodiments of the present application, the processor executes the version correction information and the version information according to the first data grouping, and obtains the second data set from the first data set, which is specifically configured as follows:

[0038] If the version information of the currently traversed first data group is different from the version correction information, continue to traverse the next first data group information;

[0039] If the version information of the first data group currently traversed is the same as the version correction information, mark the first data group information currently traversed, and continue to traverse the next first data group information;

[0040] Until all the first data grouping information included in the first data set is traversed, the second data set is obtained according to all the marked first data grouping information.

[0041] When the processor executes the version correction information according to the first data grouping and obtains the second data group in the first data group, it can judge the first data groups included in the first data group one by one, and can accurately and without omission determine the second data group to which the terminal device currently belongs, thereby improving the accuracy of generating personalized recommendation information.

[0042] In some embodiments of the present application, before the processor executes if the version information of the currently traversed first data group is different from the version correction information, then continues to traverse the next first data group information, the processor is further configured to:

[0043] Obtaining status information of the first data group currently traversed, the status information including a first status and a second status, the first status indicating that the first data group currently traversed is normal, and the second status indicating that the first data group currently traversed is disabled;

[0044] If the state information of the first data group currently being traversed indicates the second state, continue to traverse the next first data group information;

[0045] If the state information of the first data group currently traversed indicates the first state, executing the step of continuing to traverse the next first data group information if the version information of the first data group currently traversed is different from the version correction information;

[0046] Alternatively, if the version information of the first data group currently traversed is the same as the version correction information, the step of marking the first data group information currently traversed and continuing to traverse the next first data group information is performed.

[0047] After executing the traversal of the first data grouping included in the first data set, the processor can also filter out the disabled first data grouping according to the status information of the first data grouping, thereby avoiding the influence of the deactivation of the first data grouping on the determination of the second data grouping to which the terminal device currently belongs, and increasing the stability of the output query result.

[0048] In some embodiments of the present application, the database includes a remote dictionary service database;

[0049] The processor executes, according to the identification information of the terminal device, obtaining, from the database, a first data set with the identification information of the terminal device as a key, and is specifically configured as follows:

[0050] Controlling the communicator to establish a communication connection with a remote dictionary service database;

[0051] Sending a first acquisition instruction to a remote dictionary service database through a communicator; the first acquisition instruction includes identification information of the terminal device;

[0052] An execution result returned by the remote dictionary service database according to the first acquisition instruction is received; the execution result includes a first data set with the identification information of the terminal device as a key.

[0053] The remote dictionary service database has the advantages of fast reading and writing speed and data persistence, which can improve the query speed.

[0054] In some embodiments of the present application, the processor executes obtaining version correction information of the first data group, and is further configured to:

[0055] Sending a second acquisition instruction to a remote dictionary service database through a communicator; the second acquisition instruction includes identification information of the data group;

[0056] Receive the execution result returned by the remote dictionary service database according to the second acquisition instruction; the execution result includes version correction information with the identification information of the data group as the key.

[0057] Storing the version correction information in the remote dictionary service database can increase the speed of reading and writing the version correction information and ensure the security of the version correction information.

[0058] In a second aspect, some embodiments of the present application further provide an information query and recommendation method, which is applied to a server, the server including a communicator and a processor, the communicator establishing a communication connection with a terminal device, and the method including:

[0059] Receiving an acquisition request instruction of a terminal device, the acquisition request instruction including identification information of the terminal device;

[0060] According to the identification information of the terminal device, a first data set using the identification information of the terminal device as a key is obtained from the database; the first data set includes first data grouping information, and the first data grouping information includes identification information and version information of the first data grouping; the first data grouping is a data grouping currently associated with the terminal device or a data grouping historically associated with the terminal device;

[0061] Obtaining version correction information of the first data group; the version correction information indicates the version information of the first data group that was most recently updated;

[0062] According to the version correction information and version information of the first data group, a second data set is obtained from the first data set; the second data set includes second data group information, the second data group information includes identification information and version information of the second data group, and the second data group is the data group currently associated with the terminal device;

[0063] generating personalized recommendation information according to identification information of the second data group included in the second data set;

[0064] Send personalized recommendation information to the terminal device.

[0065] It can be seen from the above technical solutions that the embodiments of the present application provide a server and information query and recommendation method, which can determine the category to which the terminal device belongs by traversing the identification information of the terminal device only once when the same terminal device identification information exists in different data groups. Compared with the forward data storage structure, the server provided by the embodiments of the present application can greatly reduce the amount of query data, improve query efficiency, and thus improve the efficiency of generating personalized recommendation information.

[0066] In addition, since the value of the data storage structure of the embodiment of the present application is composed of the identification information and version information of the first data group to form a versioned data group, this versioned data group is conducive to storing multiple versions and facilitates determining the data group to which the terminal device currently belongs. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0068] Figure 1 A schematic diagram of an operation scenario between a terminal device and a control device provided in some embodiments of the present application;

[0069] Figure 2 A schematic diagram of the hardware configuration of a terminal device provided in some embodiments of the present application;

[0070] Figure 3 A schematic diagram of software configuration of a terminal device provided in some embodiments of the present application;

[0071] Figure 4 A schematic diagram of a system framework applicable to a server provided in some embodiments of the present application;

[0072] Figure 5 A schematic diagram of interaction between a server and a database provided in some embodiments of the present application;

[0073] Figure 6 A flowchart of a method for executing information query and recommendation by a server provided in some embodiments of the present application;

[0074] Figure 7 An example diagram of a process for a server to obtain a second data set from a first data set provided in some embodiments of the present application;

[0075] Figure 8 An example diagram of a server executing data screening process provided in some embodiments of the present application;

[0076] Fig. 9 An example diagram of a process of a server executing a query on a data group to which a terminal device currently belongs, provided in some embodiments of the present application;

[0077] Fig.10 An interaction sequence diagram applicable to a server provided in some embodiments of the present application. DETAILED DESCRIPTION

[0078] The following embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following embodiments do not represent all implementations consistent with the present application. They are only examples of systems and methods consistent with some aspects of the present application as detailed in the claims.

[0079] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.

[0080] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.

[0081] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.

[0082] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.

[0083] In the embodiment of the present application, the terminal device 200 generally refers to a device with image display and data processing capabilities. For example, the terminal device 200 includes but is not limited to a smart TV, a mobile terminal, a computer, a monitor, an advertising screen, a wearable device, a virtual reality device, an augmented reality device, etc.

[0084] Figure 1 This is a schematic diagram of an operation scenario between a terminal device and a control device provided in some embodiments of the present application. Figure 1 As shown in FIG. 1 , a user can operate the terminal device 200 through touch operation, the mobile terminal 300 and the control device 100. The control device 100 is used to receive the operation instruction input by the user and convert the operation instruction into a control instruction that can be recognized and responded to by the terminal device 200. For example, the control device 100 can be a remote controller, a stylus pen, a handle, etc.

[0085] The mobile terminal 300 can be used as a control device for performing human-computer interaction between a user and the terminal device 200. The mobile terminal 300 can also be used as a communication device for establishing a communication connection with the terminal device 200 and performing data interaction. In some embodiments, the mobile terminal 300 can install software applications with the terminal device 200, and achieve connection and communication through a network communication protocol to achieve 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 terminal device 200 to achieve a synchronous display function.

[0086] In some embodiments, the mobile terminal 300 or other electronic devices can also simulate the functions of the control device 100 by running an application program of the control terminal device 200 .

[0087] like Figure 1 It is also shown that the server 400 and the terminal device 200 can communicate through various communication methods. The various communication methods include, for example, Ethernet connection, Fibre Channel, Wireless Fidelity connection, Bluetooth connection, cellular network connection, etc. The server 400 can communicate with the terminal device 200 according to these communication methods to realize functions such as querying the data group to which the terminal device 200 belongs and sending personalized recommendation information to the terminal device 200.

[0088] The server 400 may be a server 400 that provides various services, such as a backend server 400 that provides a query service and a personalized recommendation information service for the acquisition request instruction sent by the terminal device 200. The backend server 400 may process the acquisition request instruction sent by the terminal device 200, query the data group to which the terminal device 200 belongs, and then generate personalized recommendation information according to the data group to which the terminal device 200 belongs, and feed the personalized recommendation information back to the terminal device 200.

[0089] The terminal device 200 can provide a broadcast receiving television function, and can also provide an intelligent network television function with additional computer support functions, including but not limited to network television, smart television, Internet Protocol television (IPTV), etc.

[0090] Figure 2 Some embodiments of the present application provide Figure 1 2 is a block diagram of the hardware configuration of the terminal device 200.

[0091] In some embodiments, the terminal device 200 may include at least one of a tuner 210, a communication device 220, a detector 230, a device interface 240, a controller 250, a display 260, an audio output device 270, a memory, a power supply, and a user input interface.

[0092] In some embodiments, the detector 230 is used to collect signals of the external environment or external interaction. For example, the detector 230 includes a light receiver, a sensor for collecting the intensity of ambient light; or, the detector 230 includes an image collector, such as a camera, which can be used to collect external environment scenes, user attributes or user interaction gestures; or, the detector 230 includes a sound collector, such as a microphone, etc., for receiving external sounds.

[0093] In some embodiments, the display 260 includes a display function component for presenting a picture, and a driving component for driving an image display. The display 260 is used to receive an image signal output from the controller 250 for display. For example, the display 260 can be used to display video content, image content, and components of a menu control interface and a user control UI interface.

[0094] In some embodiments, the communication device 220 is a component for communicating with an external device or server 400 according to various communication protocol types. The terminal device 200 may be provided with multiple communication devices 220 according to different supported communication modes. For example, when the terminal device 200 supports wireless network communication, the terminal device 200 may be provided with a communication device 220 including a WiFi function. When the terminal device 200 supports Bluetooth connection communication, the terminal device 200 needs to be provided with a communication device 220 including a Bluetooth function.

[0095] The communication device 220 can enable the terminal device 200 to communicate with the external device or server 400 by wireless or wired connection. Among them, the wired connection can connect the terminal device 200 with the external device through components such as data cables and interfaces. The wireless connection can connect the terminal device 200 with the external device through wireless signals or wireless networks. The terminal device 200 can establish a connection relationship with the external device directly, or indirectly establish a connection relationship through a gateway, a router, a connection device, etc.

[0096] In some embodiments, the controller 250 may include at least one of a central processing unit, a video processor, an audio processor, a graphics processor, and a power processor, and a first interface to an nth interface for input / output. The controller 250 controls the operation of the terminal device and responds to the user's operation through various software control programs stored in the memory. The controller 250 controls the overall operation of the terminal device 200.

[0097] In some embodiments, the controller 250 and the tuner-demodulator 210 may be located in different separate devices, that is, the tuner-demodulator 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.

[0098] In some embodiments, the user may input a user instruction in a graphical user interface (GUI) displayed on the display 260 , and the user input interface receives the user input instruction through the graphical user interface (GUI).

[0099] In some embodiments, the audio output device 270 may be a local speaker of the terminal device 200, or may be an external audio output device of the terminal device 200. For the external audio output device of the terminal device 200, the terminal device 200 may also be provided with an external audio output terminal, and the audio output device may be connected to the terminal device 200 through the external audio output terminal to output the sound of the terminal device 200.

[0100] In some embodiments, the user input interface 280 may be used to receive instructions from a user.

[0101] In order to perform user interaction, in some embodiments, the terminal device 200 may run an operating system. The operating system is a computer program for managing and controlling hardware resources and software resources in the terminal device 200. The operating system can control the terminal device to provide a user interface, for example, the operating system can directly control the terminal device to provide a user interface, or provide a user interface by running an application program. The operating system also allows the user to interact with the terminal device 200.

[0102] It should be noted that the operating system may be a native operating system based on a specific operating platform, or a third-party operating system deeply customized based on a specific operating platform, or an independent operating system specially developed for a terminal device.

[0103] The operating system can be divided into different modules or layers according to the functions implemented, such as Figure 3 As shown, in some embodiments, the system is divided into four layers, from top to bottom, namely, the application layer (Applications) layer (referred to as "application layer"), the application framework layer (Application Framework) layer (referred to as "framework layer"), the system library layer and the kernel layer.

[0104] In some embodiments, the application layer is used to provide services and interfaces for applications so that the terminal device 200 can run applications and interact with users based on applications. At least one application can be run in the application layer, and these applications can be window programs, system settings programs, clock programs, etc. that come with the operating system; they can also be applications developed by third-party developers. In specific implementations, the application packages in the application layer are not limited to the above examples.

[0105] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications. The application framework layer includes some predefined functions. The application framework layer is equivalent to a processing center that determines the actions that applications in the application layer take. Through the API interface, applications can access system resources and obtain system services during execution.

[0106] like Figure 3 As shown, Figure 3 A software configuration diagram of a terminal device provided for some embodiments of the present application. In some embodiments, the system of the terminal device 200 can be divided into three layers, namely, an application layer, a middleware layer, and a hardware layer from top to bottom.

[0107] The application layer mainly includes applications on the TV and the application framework. Among them, applications are mainly applications developed based on the browser, such as HTML5 APPs and native applications.

[0108] The Application Framework is a complete program model that has all the basic functions required by standard application software, such as file access, data exchange, etc., as well as the user interfaces of these functions (toolbars, status bars, menus, dialog boxes).

[0109] Native apps can support online or offline, message push or local resource access.

[0110] The middleware layer includes various TV protocols, multimedia protocols, system components and other middleware. The middleware can use the basic services (functions) provided by the system software to connect various parts of the application system or different applications on the network, and can achieve the purpose of resource sharing and function sharing.

[0111] The hardware layer mainly includes HAL interface, hardware and driver. Among them, HAL interface is the unified interface for all TV chips to connect, and the specific logic is implemented by each chip. Drivers mainly include: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver, etc.

[0112] It should be noted that the above example is only a simple division of the operating system functions and does not constitute a limitation on the specific operating system form of the terminal device 200 in the embodiment of the present application. Depending on factors such as the function of the terminal device and the type of operating system, the number of levels and specific level types contained in the operating system may be expressed in other forms.

[0113] In the embodiment of the present application, the server 400 includes a communicator and a processor, and the communicator is used to establish a communication connection between the server 400 and the terminal device 200 together with the communication device 220 of the terminal device 200. The processor is used to control the server 400 to perform various operations such as querying the data group to which the terminal device 200 belongs, generating personalized recommendation information according to the data group to which the terminal device 200 belongs, etc. It can be known that the communicator and the processor are both device units on the server 400. The following embodiments take the server 400 as the execution subject, and no special explanation is given for this.

[0114] In the embodiment of the present application, the server 400 may be a single server or a server cluster consisting of multiple servers.

[0115] When the server 400 provided in the embodiment of the present application is a server cluster, the server cluster includes a query server and a recommendation server, and the query server and the recommendation server can be connected through a network.

[0116] Figure 4 A system framework diagram applicable to a server 400 provided in an embodiment of the present application is shown, and the system framework includes a terminal device 200, a query server 4001, and a recommendation server 4002.

[0117] The query server 4001 is used to receive the acquisition request instruction of the terminal device 200, query according to the acquisition request instruction of the terminal device 200 to obtain the query result, and the query result indicates the data group to which the terminal device 200 belongs. Then, the query result is sent to the recommendation server 4002.

[0118] The recommendation server 4002 is used to generate personalized recommendation information according to the query results, and then send the personalized recommendation information to the terminal device 200.

[0119] The server cluster has good flexibility and scalability, and one of the servers can be optimized or modified without interfering with other servers. For example, optimizing the query server 4001 and adding a new query algorithm will not affect the recommendation server 4002 generating personalized recommendation information based on the query results.

[0120] The embodiment of the present application can also implement the functions of querying the data group to which the terminal device 200 belongs, generating personalized recommendation information according to the data group to which the terminal device 200 belongs, and then sending the personalized recommendation information to the terminal device 200 only through one server 400.

[0121] It can be known that the embodiment of the present application does not limit the query function and the recommendation function to be implemented by a separate server 400 or a server cluster.

[0122] In addition, the server 400 provided in the embodiment of the present application also includes a database. The server 400 is the physical carrier of the database, and the database stores data such as identification information of the terminal device 200, identification information of the data group, and version information.

[0123] The database includes, for example: Remote Dictionary Server (Remote Dictionary Server, Redis for short). Redis uses key-value as the basic data storage structure. A key is a string used to uniquely identify data stored in Redis, and a value can include multiple data types (for example, strings, hashes, lists, sets, ordered sets, etc.). In an embodiment of the present application, the data storage structure stored in Redis uses the identification information of the terminal device 200 (hereinafter referred to as the device ID) as the key, and the identification information of the data group (hereinafter referred to as the data group ID) and the version information as the value. The value is a set, which is represented by a data set in an embodiment of the present application, wherein the data set includes a first data set and a second data set.

[0124] Figure 5A schematic diagram of the interaction between a server 400 and a database 500 provided in an embodiment of the present application is shown, and the server 400 includes a database (Redis) 500. The server 400 and Redis mainly communicate through the network. Redis supports multiple programming language libraries, such as redis-py library, Jedis library, etc. The server 400 can send instructions to Redis according to the multiple programming language libraries supported by Redis, thereby operating the data stored in Redis. In an embodiment of the present application, the server 400 can send a query instruction to Redis according to the device ID, and obtain the query result from Redis. The query result includes the identification information of the data group to which the terminal device 200 belongs.

[0125] Data clustering refers to the division of a large data set into multiple groups with similar properties based on the various characteristics of users or data objects in a big data environment. These characteristics can include behavioral characteristics (such as purchasing behavior, browsing behavior, etc.), demographic characteristics (age, gender, region, etc.), psychological characteristics (interests, hobbies, values, etc.), and many other aspects. Through data clustering, we can better understand the characteristics of different groups in the data and provide support for many business scenarios such as precision marketing, personalized services, and risk assessment.

[0126] In some application data grouping scenarios, some information recommendation services need to formulate personalized recommendation information based on the data grouping to which the terminal device 200 belongs, and then send the personalized recommendation information to the terminal device 200. In some embodiments, the data grouping to which the terminal device 200 belongs includes, for example, the following dimensions: The first dimension may include device performance, and data grouping may be set according to data such as the device's processor model, number of cores, main frequency, content capacity, and specifications. The second dimension may include user behavior data, and data grouping may be set according to data such as the length of time the user uses each application, the length of time the screen is on standby, and charging time habits. It can be known that the device information and user behavior data are obtained with the user's authorization.

[0127] For example, the data group to which a terminal device 200 belongs includes "processor running score of more than 800,000 points", "memory of more than 12GB", "processor main frequency of more than 3.3GHz", and "game application time of more than 6 hours". Then, according to the data group to which the terminal device 200 belongs, game application download information, game-related supporting equipment recommendation information, etc. can be pushed to the terminal device 200.

[0128] However, before formulating personalized recommendation information based on the data group to which the terminal device 200 belongs, it is necessary to pre-save the association between the terminal device 200 and the data group. At present, it is common to use a data storage structure with the data group ID as the key and the device ID as the value to save the association between the terminal device 200 and the data group. This data storage structure is generally called a forward data storage structure. Under this forward data storage structure, one data group often corresponds to tens of millions of device IDs, and there may be a large number of identical device IDs in multiple data groups. When it is necessary to query the data group to which a certain terminal device 200 belongs, it is necessary to traverse the device ID in each data group. Since each data group may contain a large number of repeated device IDs, the query data volume is huge and the query efficiency is very low, which affects the efficiency of formulating personalized recommendation information.

[0129] The embodiment of the present application provides a server 400, which can query the data group to which the terminal device 200 belongs in Redis according to the identification information (device ID) of the terminal device 200 after receiving the acquisition request instruction of the terminal device 200. Since Redis is a data storage structure with the device ID as the key and the data group ID and version information as the value. This data storage structure only needs to traverse the device ID once in the process of querying the data group to which the terminal device 200 belongs to obtain the data group to which the terminal device 200 belongs, avoiding traversing a large number of repeated device IDs, thereby reducing the amount of data queried and improving query efficiency.

[0130] The server 400 provided in the embodiment of the present application is described in detail below.

[0131] In some embodiments, Figure 6 As shown, the server 400 provided in the embodiment of the present application is configured to perform the following steps:

[0132] S601, receiving an acquisition request instruction from the terminal device 200.

[0133] The acquisition request instruction includes identification information of the terminal device 200 .

[0134] The acquisition request instruction of the terminal device 200 is used to acquire personalized recommendation information. In some embodiments, the personalized recommendation information includes, for example, promotion information of some software, promotion information of products, etc.

[0135] The acquisition request instruction includes the identification information of the terminal device 200. In some embodiments, the identification information of the terminal device 200 may include, for example, the serial number (Serial Number), device token (DeviceToken), universally unique identifier (UUID), etc. of the terminal device 200. The identification information of the terminal device 200 is the unique identification information of the data group to which the terminal device 200 belongs. The identification information of the terminal device 200 may also be referred to as the device ID.

[0136] S602: Acquire a first data set using the identification information of the terminal device as a key from a database according to the identification information of the terminal device.

[0137] The first data set includes first data grouping information, and the first data grouping information includes identification information and version information of the first data grouping; the first data grouping is a data grouping currently associated with the terminal device 200 or a data grouping associated historically.

[0138] Taking Redis as an example, Redis stores data using a data storage structure that uses the identification information of the terminal device as a key and the identification information and version information of the first data group as a value.

[0139] The first data set is a set of data in Redis, and Redis includes multiple types of data sets. In an embodiment of the present application, the first data set may be a set (Set) type data set (referred to as a Set data set), which may store some unordered, non-repetitive data, and may perform set operations such as intersection, union, and difference. In the application scenario of the embodiment of the present application, the identification information of the data cluster and the version information of the data cluster are combined to meet the characteristics of being unordered and non-repetitive.

[0140] In some other embodiments, the first data set may also be a list type data set, an ordered set type data set, etc., which is not limited here.

[0141] The first data set may include one or more sets of first data grouping information, wherein the identification information included in the first data grouping information may be referred to as the first data grouping ID, which is the unique identification information of the first data grouping. The version information included in the first data grouping information indicates the data update identifier of the first data grouping.

[0142] In some embodiments, the category information indicated by the first data grouping can be obtained through the first data grouping ID, and the category information of the first data grouping refers to similar features possessed by the terminal devices 200 belonging to the first data grouping.

[0143] In some embodiments, the version information of the first data group may include a system timestamp or a count value of a system counter.

[0144] In some embodiments, the data storage structure using the identification information of the terminal device 200 as a key and the identification information and version information of the first data group as a value is as follows:

[0145] The Redis Key is:<prefix information> _<device id> ;

[0146] Data in Redis Set:<cohort id 1><version a> ,<cohort id 1><version b> ,<cohort id2><version b> ,<cohort id n><version b> ].

[0147] The Redis Key includes the identification information (device id) of the terminal device 200. The Redis Set includes the identification information (cohort id 1, cohort id 2, cohort id n, etc.) and version information (versiona, versionb, etc.) of the first data group.

[0148] Since the first data grouping needs to perform data update to increase or decrease the terminal devices 200 belonging to the first data grouping, this will result in some terminal devices 200 belonging to the first data grouping before the first data grouping is updated, but not belonging to the first data grouping after the update. At the same time, in order to ensure that the first data grouping can be traced back to a version, the first data set usually includes multiple versions of the first data grouping. For example, a first data set includes: "2717300001", "27130002". This means that the first data set includes two versions of the first data grouping 27. Therefore, the identification information and version information of the first data grouping saved in the first data set can be the identification information and version information of the data grouping to which the terminal device 200 currently belongs, or it can be the identification information and version information of the data grouping to which the first data grouping historically belonged.

[0149] In some embodiments, the processor executes, according to the identification information of the terminal device, obtaining, from Redis, a first data set with the identification information of the terminal device as a key, and is specifically configured as follows:

[0150] Control the communicator to establish a communication connection with Redis; send a first acquisition instruction to Redis through the communicator; the first acquisition instruction includes identification information of the terminal device; receive an execution result returned by Redis according to the first acquisition instruction; the execution result includes a first data set with the identification information of the terminal device as a key.

[0151] Among them, the first acquisition instruction is used to obtain the value with the identification information of the terminal device as the key. For example, after the server sends "Get device id 1" to Redis, Redis queries the key name "device id 1" and obtains the values: "2717300001", "35190002". It means that "device id 1" belongs to two first data groups, one of which has the identification information of "27" and the other has the identification information of "35". Redis returns the execution result, which includes "2717300001" and "35190002".

[0152] S603: Obtain version correction information of the first data group.

[0153] The version correction information of the first data group indicates the version information of the first data group that has been updated most recently.

[0154] In some embodiments, the version correction information of the first data cluster may be stored in Redis.

[0155] In some embodiments, the version correction information of the first data group with the same identification information is unique, and before the new version correction information of the first data group is stored in Redis, the version correction information previously stored in the first data group will be deleted. For example, if the first data set includes three first data groups with identification information of 27, then these three first data groups with identification information of 27 have the same version correction information.

[0156] In some embodiments, after executing the above step S601 to obtain the acquisition request instruction of the terminal device 200, the server 400 may obtain the version correction information of all data groups including the first data group.

[0157] In some embodiments, the server 400 may also obtain version correction information of the first data group according to the identification information of the first data group included in the first data group after executing the above step S602 and obtaining the first data set from Redis according to the identification information of the terminal device 200.

[0158] In some embodiments, the processor executes obtaining version correction information of the first data group, and is further configured to:

[0159] A second acquisition instruction is sent to Redis through the communicator; the second acquisition instruction includes identification information of the data group; an execution result returned by Redis according to the second acquisition instruction is received; the execution result includes version correction information with the identification information of the data group as the key.

[0160] Among them, the second acquisition instruction is similar to the first acquisition instruction, both of which are Get instructions. The difference is that the second acquisition instruction is used to obtain the value with the identification information of the data group as the key. For example, after the server sends "Get 27" to Redis, Redis queries the key name "27" and obtains the value: "17300001". It means that the version information of the data group with the identification information "27" is "17300001". Redis returns the execution result, and the execution result includes "17300001".

[0161] S604: Obtain a second data set from the first data set according to the version correction information and the version information of the first data group.

[0162] The second data set includes second data grouping information, the second data grouping information includes identification information and version information of the second data grouping, and the second data grouping is the data grouping currently associated with the terminal device 200.

[0163] In some embodiments, the server 400 may compare the version information of the first data group with the version information of the first data group in the first data set, and if the version information of the first data group is the same as the version information, it indicates that the first data group is the latest version. If the version information of the first data group is different from the version information, it indicates that the first data group is a historical version.

[0164] For example, the first data set obtained by the server 400 according to the device ID of a terminal device 200 includes: "271730001", "271730002", and "321860001". If the version correction information of the first data cluster 27 is "1730002", and the version correction information of the first data cluster 32 is "1860001". Then, according to the version correction information of the first data cluster 27 and the version correction information of the first data cluster 32, the second data set obtained from the first data set includes: "271730002", and "321860001".

[0165] Since the first data set may include a plurality of first data grouping information, an implementation method of acquiring the second data set from the first data set including a plurality of first data grouping information is introduced below.

[0166] In some embodiments, Figure 7The server 400 executes the version correction information and version information according to the first data grouping to obtain the second data set from the first data set, and is specifically configured to perform the following steps:

[0167] S701: If the version information of the first data group currently being traversed is different from the version correction information, continue to traverse the next first data group information.

[0168] In some embodiments, the version information of the first data group is different from the version correction information in two cases:

[0169] The first case is that the value included in the version information of the first data group currently traversed is greater than the value included in the version correction information. The value included in the version information and the value included in the version correction information are, for example, generated by the system timestamp in the above embodiment, or generated by the count value of the system counter. The first case indicates that the first data group currently traversed is in the process of being updated. Since the version correction information is updated after the first data group is updated, it will appear that the value included in the version information of the first data group currently traversed is greater than the value included in the version correction information.

[0170] The second case is that the value included in the version information of the first data group currently traversed is less than the value included in the version correction information. The second case indicates that the version of the first data group currently traversed is a historical version.

[0171] S702: If the version information of the first data group currently traversed is the same as the version correction information, mark the first data group information currently traversed, and continue to traverse the next first data group information.

[0172] In some embodiments, the first data grouping information currently traversed can be marked by inserting a specific identification value into the first data grouping information. For example, the first data grouping information currently traversed is "321860001", indicating that the identification information of the first data grouping is "32" and the version information is "1860001". If the version information of the first data grouping currently traversed is the same as the version correction information, then the first data grouping information currently traversed is marked. The marked first data grouping information can be, for example, "32186000101", where "01" is a specific identification value, indicating that the first data grouping is marked.

[0173] S703: until all the first data grouping information included in the first data set is traversed, a second data set is acquired according to all the marked first data grouping information.

[0174] In some embodiments, it is possible to determine whether the first data grouping information in the first data set is marked by judging whether the first data grouping information carries a specific identification value, and then obtain the second data set based on the marked first data grouping information.

[0175] Since the version correction information of the first data group indicates the most recently updated version information of the first data group, when the server 400 obtains the second data set from the first data set based on the version correction information of the first data group, it can judge the first data groups included in the first data set one by one, and can accurately and without omission determine the second data group to which the terminal device 200 currently belongs.

[0176] In some application scenarios, some data groups may be deactivated due to data anomalies, low classification algorithm accuracy, non-compliance with current market expectations, etc., and the deactivated data groups need to be screened out. This helps to avoid the deactivated data group interfering with the determination of the data group to which the terminal device 200 currently belongs, and increases the stability of the output query results.

[0177] In some embodiments, Figure 8 In the example diagram of a data screening process shown in FIG. 1 , the processor is further configured to:

[0178] S801. Obtain status information of the first data group currently traversed.

[0179] The status information includes a first status and a second status, the first status indicates that the first data group currently traversed is normal, and the second status indicates that the first data group currently traversed is disabled.

[0180] In some embodiments, the state information of the first data grouping can be set manually or automatically by an algorithm. For example, some first data groupings have data anomalies. In order to avoid the first data groupings with data anomalies affecting subsequent processing, the first data groupings can be manually set to the second state, and then set to the first state after the data returns to normal.

[0181] S802: If the state information of the first data group currently being traversed indicates the second state, continue to traverse the next first data group information.

[0182] In some embodiments, if the currently traversed first data group is in the second state, indicating that the first data group has been disabled, there is no need to perform subsequent judgment on the first data group.

[0183] S803, if the state information of the first data group currently traversed indicates the first state, executing the step of continuing to traverse the next first data group information if the version information of the first data group currently traversed is different from the version correction information;

[0184] Alternatively, if the version information of the first data group currently traversed is the same as the version correction information, the step of marking the first data group information currently traversed and continuing to traverse the next first data group information is performed.

[0185] In this way, after traversing the first data grouping information included in the first data set, the server 400 can also filter out the deactivated first data grouping according to the status information of the first data grouping, thereby avoiding the influence of the deactivation of the first data grouping on the determination of the second data grouping to which the terminal device 200 currently belongs, and increasing the stability of the output query results.

[0186] The following is combined with the above Figure 7 , Figure 8 The embodiment of the present invention introduces in detail a process of querying the data group to which the terminal device 200 currently belongs. Fig. 9 As shown in the example diagram of a process of querying the data group to which the terminal device 200 currently belongs, after the processor obtains the acquisition request instruction of the terminal device 200, the processor performs the following steps:

[0187] S901. Obtain version correction information for each data group.

[0188] In some embodiments, a second query instruction may be sent to Redis using the programming language supported by Redis as described in the above embodiments to obtain version correction information for each data cluster.

[0189] S902: Acquire a first data set according to the device ID of the terminal device 200.

[0190] In some embodiments, a query instruction may be sent to Redis using a programming language supported by Redis as described in the above embodiments to obtain the first data set.

[0191] S903: traverse each first data grouping information in the first data set.

[0192] In some embodiments, a traversal (SSCAN) instruction may be used to traverse each first data grouping information in the first data set, and the SSCAN instruction provides a function of traversing set elements. A cursor iteration method is used, and each returned data includes a new cursor, and the new cursor is used to indicate the next traversed first data grouping.

[0193] It can be known that the SSCAN instruction is used to traverse the Set data set. There are corresponding traversal instructions for other types of data sets, which are not listed here one by one.

[0194] S904, judging the state information of the first data group currently traversed, if the first data group is in the first state, executing S905, if the first data group is in the second state, returning to S903, traversing the next first data group information.

[0195] In some embodiments, a key indicating a first state or a key indicating a second state may be stored in Redis, and only one of the key in the first state and the key in the second state can be stored. Then, the EXISTS instruction is used to determine whether a key indicating that the state information of the first data group is in the first state is stored in Redis. If so, 1 is returned to indicate that the first data group is in the first state, and if not, 0 is returned. Similarly, the EXISTS instruction is used to determine whether a key indicating that the state information of the first data group is in the second state is stored in Redis. If so, 1 is returned to indicate that the first data group is in the second state, and if not, 0 is returned. If neither the key in the first state nor the key in the second state exists, it indicates that the state information of the first data group is not set.

[0196] S905 , determining whether the version information of the first data group currently traversed lags behind the version correction information, if so, executing S903 , if not, executing S906 .

[0197] In some embodiments, a conditional control (if) instruction may be used to compare whether the system timestamp included in the version information of the first data group currently being traversed is greater than the system timestamp included in the version correction information. If so, it indicates that the version information of the first data group currently being traversed does not lag behind the version correction information, and if not, S906 is executed.

[0198] S906: Determine whether the version information of the first data group currently traversed is ahead of the version correction information. If so, execute S903; otherwise, execute S907.

[0199] In some embodiments, an if instruction may be used to compare whether the system timestamp included in the version information of the first data group currently being traversed is less than the system timestamp included in the version correction information. If so, it indicates that the version information of the first data group currently being traversed is not ahead of the version correction information, and if not, S907 is executed.

[0200] S907. The terminal device 200 belongs to the first data group currently traversed.

[0201] In some embodiments, the first data group is represented as the data group to which the terminal device 200 currently belongs.

[0202] S908, determine whether there is a first data group that has not been traversed, if so, execute S903, if not, execute S909.

[0203] In some embodiments, the SSCAN instruction traverses the first data set. When no new cursor is returned, it indicates that there is no first data group that has not been traversed.

[0204] S909, end the traversal process.

[0205] Next, after obtaining the second data set, the server 400 further executes the following S605.

[0206] S605: Generate personalized recommendation information according to the identification information of the second data group included in the second data set.

[0207] In some embodiments, a collaborative filtering recommendation algorithm, a content-based recommendation algorithm, etc. may be used to generate personalized recommendation information, which will not be described in detail here.

[0208] S606 : Send the personalized recommendation information to the terminal device 200 .

[0209] In some embodiments, for different terminal devices 200 , the server 400 sends personalized recommendation information to the terminal device 200 in different ways.

[0210] For example, if the terminal device 200 is a smart phone, the server 400 can push personalized recommendation information by means of push notification (Web Push), or through a recommendation information software toolkit, or based on a push service (such as Apple APNs, Android FCM, etc.). If the terminal device 200 is a smart TV, the server 400 can send personalized recommendation information to the terminal device 200 by means of a system-level advertising push mechanism or a push function provided by an application platform installed on the smart device.

[0211] After receiving the acquisition request instruction of the terminal device 200, the server 400 provided in the embodiment of the present application can acquire the first data group currently associated with or historically associated with the terminal device 200 according to the identification information of the terminal device 200 included in the acquisition request instruction. Then, according to the version correction information of the first data group and the version information of the first data group, the second data group currently associated with the terminal device 200 is acquired. Since the data storage structure uses the identification information of the terminal device 200 as the key and the identification information and version information of the data group as the value, in the process of querying the first data group to which the terminal device 200 belongs, there is no need to repeatedly traverse the identification information of the same terminal device 200, thereby greatly reducing the amount of query data and improving the query efficiency. Then, due to the improved query efficiency, the server 400 can formulate personalized recommendation information according to the data group to which the terminal device 200 currently belongs earlier after receiving the acquisition request instruction of the terminal device 200, thereby improving the overall information query and recommendation efficiency.

[0212] In some practical applications, data grouping will be updated according to a preset period or after receiving an update instruction.

[0213] A server 400 provided in an embodiment of the present application can save Redis storage space and accelerate the data update process.

[0214] In some embodiments, the processor is further configured to:

[0215] Detecting that the data group being updated includes identification information of the terminal device, and obtaining identification information and version information of the data group being updated;

[0216] The data group being updated includes the first data group or other data group, and the other data group is represented by a data group that does not exist in the first data set before it is detected that it includes the identification information of the terminal device 200.

[0217] In some embodiments, after the processor detects that the data group being updated includes identification information of the terminal device, the processor is further configured to:

[0218] The processor generates the version information of the data group being updated by executing any of the following methods:

[0219] The version information of the data group being updated is generated according to the system timestamp; or the version information of the data group being updated is generated according to the value of the system counter.

[0220] In some embodiments, the server 400 can obtain the system timestamp and generate the version information of the data group being updated according to the system timestamp. After obtaining the system timestamp, the version information of the data group being updated can be generated using milliseconds, seconds, hours, or days.

[0221] For example, the system timestamp obtained by the server 400 is "20241101120145". If the version information is generated using the hourly system timestamp, the version information of the data cluster being updated is: "2024110112". Other levels are similar and are not listed one by one.

[0222] In some embodiments, the system counter counts after the first data group is updated, and the server 400 obtains the value recorded by the system counter to generate the version information of the first data group. For example, when the first data group is in a certain version, the value recorded by the system counter is "1730001", and when the first data group is updated by a version, the value recorded by the system counter is "1730002". At this time, the server 400 obtains the value recorded by the system counter as the version information of the first data group.

[0223] The server 400 may also set the data type of the identification information and version information of the data group being updated to a long integer type.

[0224] Compared with the string data type, the long integer data format is more regular and the storage layout is simpler, which can save a lot of storage space and is conducive to storage and query operations.

[0225] After acquiring the identification information and version information of the data group being updated, the server 400 updates the first data set according to the identification information of the terminal device 200 and the identification information and version information of the data group being updated.

[0226] In some embodiments, the processor executes updating the first data set according to the identification information of the terminal device, the identification information of the data group being updated, and the version information, and is specifically configured as follows:

[0227] According to the identification information of the terminal device, a first data set with the identification information of the terminal device as the key is queried from Redis; according to the identification information and version information of the data group being updated, the identification information and version information of the new first data group are added to the first data set.

[0228] The version information of the new first data group is earlier than the version correction information.

[0229] In some embodiments, the add (SADD) instruction can be used to add the identification information and version information of the new first data group to the first data set. For example, the key of the first data set is: "device id: 1: data set" represents the data set with device ID 1. The value to be added to the first data set is: "27130001", indicating that the identification information of the new first data group is "27" and the version information is "130001". Then the "SADD device id: 1: data set 27130001" instruction can be used to add "27130001" to the first data set.

[0230] Since the storage is performed in a manner that uses the identification information and version information of the first data group as values, when the first data set is updated, the new identification information and version information of the first data group can be directly added to the first data set without deleting the existing data, thereby reducing the server 400 from executing a large number of operation instructions and improving data update efficiency.

[0231] In some embodiments, the version correction information is stored in Redis using the identification information of the data group as a key; multiple data groups with the same identification information correspond to the same version correction information; the processor is further configured to:

[0232] After the data cluster is updated, the old version correction information with the identification information of the data cluster as the key is queried in Redis according to the identification information of the data cluster; the old version information corresponding to the identification information is deleted; and the new version correction information is stored in Redis according to the version information of the data cluster.

[0233] In some embodiments, the version correction information corresponding to the identification information of the new first data group can be updated by using the SADD instruction and the Delete (SREM) instruction. For example, the SREM instruction is used to delete the existing version correction information first, and then the SADD instruction is used to add and update the version correction information of the first data group.

[0234] In some application scenarios, as the version of the first data group in the first data set is iterated, some versions stored earlier in the first data set are no longer useful. Therefore, it is necessary to delete the identification information and version information of the first data group stored earlier in the first data set to release the memory space of Redis.

[0235] In some embodiments, the server 400 is further configured to:

[0236] If the number of first data groups with the same identification information in the first data set is greater than or equal to a preset number, obtaining version information of the first data groups with the same identification information in the first data set; the version information of the first data group indicates an update time of the first data group;

[0237] The version information of the first data groupings having the same identification information is compared, and the identification information and version information of the first data grouping with the earliest update time are deleted.

[0238] The first data grouping with the same identification information is represented as indicating the same category but different versions of the first data grouping. When the number of first data groups with the same identification information in the first data set reaches a preset number (for example, 3), the identification information and version information of the first data grouping with the earliest update time can be deleted from the first data groups with the same identification information to release the storage space of Redis.

[0239] For example, the first data set includes: "271730002", "271730003", and "271730004". This indicates that the first data group 27 to which the terminal device 200 belongs includes three versions, wherein the version of "271730002" is earlier than the version of "271730003" and the version of "271730004". When it is necessary to delete redundant versions of the first data group 27, the first data group 27 with the earliest updated version information of "1730002" can be deleted according to the version number of the first data group 27. The deleted first data set includes: "271730003" and "271730004".

[0240] After several version iterations of the first data groupings with the same identification information, the server 400 deletes the first data grouping information with the earliest update time, thereby effectively releasing storage space without affecting the query service.

[0241] In addition, if Fig.10 As shown, the embodiment of the present application also provides an interaction sequence diagram applicable to a server 400 , wherein the interaction objects include: a terminal device 200 , a query server 4001 , a recommendation server 4002 , and a database 500 .

[0242] The terminal device 200 responds to the user's triggering operation or the application-triggered request to send a request instruction to the query server 4001. The user's triggering operation includes, for example, the user opening an application, the user turning on the terminal device 200, etc. The application-triggered request includes, for example, the application playing a video to a preset time point, etc.

[0243] After receiving the acquisition request instruction sent by the terminal device 200, the query server 4001 uses the programming language library provided by the database to send an acquisition instruction to the database 500.

[0244] In response to the acquisition instruction, the database 500 queries the stored key value information to obtain an execution result, wherein the execution result indicates the identification information of the data group to which the terminal device currently belongs.

[0245] The database 500 returns the execution result to the query server 4001 .

[0246] The query server 4001 sends the execution result to the recommendation server 4002 .

[0247] According to the execution result, the recommendation server 4002 inputs the identification information of the data group to which the terminal device 200 currently belongs as input data into a preset recommendation algorithm model.

[0248] The recommendation server 4002 obtains the personalized recommendation information output by the recommendation algorithm model.

[0249] The recommendation server 4002 sends the personalized recommendation information to the terminal device 200 .

[0250] Above Fig.10 The interaction sequence diagram shown can clearly demonstrate the interaction sequence between the query server 4001, the recommendation server 4002, the terminal device 200, and the database 500 provided in the embodiment of the present application, as well as the specific process of executing information query and recommendation.

[0251] It should be noted that the display content and effects of each prompt interface provided in the embodiment of the present application are only some exemplary descriptions, and the prompt interface may also include more or less content information, and the function can remain consistent with the function of the interface. This application does not limit this.

[0252] Based on the above terminal device 200, some embodiments of the present application further provide an information query and recommendation method, which includes:

[0253] Receiving an acquisition request instruction of a terminal device, the acquisition request instruction including identification information of the terminal device;

[0254] According to the identification information of the terminal device, a first data set using the identification information of the terminal device as a key is obtained from the database; the first data set includes first data grouping information, and the first data grouping information includes identification information and version information of the first data grouping; the first data grouping is a data grouping currently associated with the terminal device or a data grouping historically associated with the terminal device;

[0255] Obtaining version correction information of the first data group; the version correction information indicates the version information of the first data group that was most recently updated;

[0256] According to the version correction information and version information of the first data group, a second data set is obtained from the first data set; the second data set includes second data group information, the second data group information includes identification information and version information of the second data group, and the second data group is the data group currently associated with the terminal device;

[0257] generating personalized recommendation information according to identification information of the second data group included in the second data set;

[0258] Send personalized recommendation information to the terminal device.

[0259] The embodiment of the present application provides a server and an information query and recommendation method, which can determine the category to which the terminal device belongs by traversing the terminal device's identification information only once when the same terminal device identification information exists in different data groups. Compared with the forward data storage structure, the server provided by the embodiment of the present application can greatly reduce the amount of query data, improve query efficiency, and thus improve the efficiency of generating personalized recommendation information.

[0260] In addition, since the value of the data storage structure of the embodiment of the present application is composed of the identification information and version information of the first data group to form a versioned data group, this versioned data group is conducive to storing multiple versions and facilitates determining the data group to which the terminal device currently belongs.

[0261] The same and similar parts between the various embodiments in this specification can be referenced to each other and will not be described again here.

[0262] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of various embodiments of the present invention or certain parts of the embodiments.

[0263] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0264] For the convenience of explanation, the above description has been made in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are to better explain the principles and practical applications, so that those skilled in the art can better use the embodiments and various different variations of the embodiments suitable for specific use considerations.

Claims

1. A server, characterized in that: include: A communicator configured to establish a communication connection with a terminal device; The processor is configured as: Receiving an acquisition request instruction of a terminal device, wherein the acquisition request instruction includes identification information of the terminal device; According to the identification information of the terminal device, a first data set using the identification information of the terminal device as a key is obtained from a database; the first data set includes first data grouping information, and the first data grouping information includes identification information and version information of the first data grouping; the first data grouping is a data grouping currently associated with the terminal device or a data grouping historically associated with the terminal device; Obtaining version correction information of the first data group; the version correction information indicates the version information of the first data group that was most recently updated; According to the version correction information of the first data group and the version information, a second data set is obtained from the first data set; the second data set includes second data group information, the second data group information includes identification information and version information of the second data group, and the second data group is the data group currently associated with the terminal device; generating personalized recommendation information according to identification information of the second data group included in the second data set; The personalized recommendation information is sent to the terminal device.

2. The server according to claim 1, characterized in that: The processor is further configured to: Detecting that the data group being updated includes the identification information of the terminal device, acquiring the identification information and version information of the data group being updated; the data group being updated includes at least the first data group; According to the identification information of the terminal device, querying a first data set with the identification information of the terminal device as a key from a database; According to the identification information and version information of the data group being updated, new first data group information is added to the first data set; the new first data group information includes the identification information and version information of the new first data group.

3. The server according to claim 2, characterized in that: The processor is further configured to: The version information of the data group being updated is generated according to the system timestamp; or the version information of the data group being updated is generated according to the value of the system counter.

4. The server according to claim 2, characterized in that: The version correction information is stored in the database using the identification information of the data group as a key; multiple data groups with the same identification information correspond to the same version correction information; The processor is further configured to: After the data grouping is updated, searching the database for old version correction information using the identification information of the data grouping as a key according to the identification information of the data grouping; Deleting old version information corresponding to the identification information; According to the version information of the data grouping, new version correction information is stored in the database.

5. The server according to any one of claims 1 to 4, characterized in that: The processor is also configured to: If the number of first data groups with the same identification information in the first data set is greater than or equal to a preset number, obtaining version information of the first data groups with the same identification information in the first data set; the version information of the first data group indicates an update time of the first data group; The version information of the first data groups having the same identification information is compared, and the identification information and version information of the first data group having the earliest update time are deleted.

6. The server according to any one of claims 1 to 4, characterized in that: The processor executes, according to the version correction information of the first data grouping and the version information, obtaining the second data set from the first data set, and is specifically configured as follows: If the version information of the first data group currently being traversed is different from the version correction information, continue to traverse the next first data group information; If the version information of the first data group currently traversed is the same as the version correction information, mark the first data group information currently traversed, and continue to traverse the next first data group information; Until all the first data grouping information included in the first data set is traversed, the second data set is obtained according to all the marked first data grouping information.

7. The server according to claim 6, characterized in that: Before the processor executes if the version information of the currently traversed first data group is different from the version correction information, then continues to traverse the next first data group information, the processor is further configured to: Acquire status information of the first data group currently traversed, the status information including a first status and a second status, the first status indicating that the first data group currently traversed is normal, and the second status indicating that the first data group currently traversed is disabled; If the state information of the first data group currently being traversed indicates the second state, continue to traverse the next first data group information; If the state information of the first data group currently being traversed indicates the first state, executing the step of continuing to traverse the next first data group information if the version information of the first data group currently being traversed is different from the version correction information; Alternatively, if the version information of the first data group currently traversed is the same as the version correction information, the step of marking the first data group information currently traversed and continuing to traverse the next first data group information is performed.

8. The server according to claim 1, characterized in that: The database includes a remote dictionary service database; The processor executes, according to the identification information of the terminal device, obtaining from a database a first data set with the identification information of the terminal device as a key, and is specifically configured as follows: Controlling the communicator to establish a communication connection with the remote dictionary service database; Sending a first acquisition instruction to the remote dictionary service database through the communicator; the first acquisition instruction includes identification information of the terminal device; Receive an execution result returned by the remote dictionary service database according to the first acquisition instruction; the execution result includes a first data set with the identification information of the terminal device as a key.

9. The server according to claim 8, characterized in that: The processor executes obtaining version correction information of the first data group, and is further configured to: Sending a second acquisition instruction to the remote dictionary service database through the communicator; the second acquisition instruction includes identification information of the data grouping; Receive the execution result returned by the remote dictionary service database according to the second acquisition instruction; the execution result includes version correction information with the identification information of the data group as a key.

10. An information query and recommendation method, characterized in that: Applied to a server, the server includes a communicator and a processor, the communicator establishes a communication connection with a terminal device, and the method includes: Receiving an acquisition request instruction of the terminal device, wherein the acquisition request instruction includes identification information of the terminal device; According to the identification information of the terminal device, a first data set using the identification information of the terminal device as a key is obtained from a database; the first data set includes first data grouping information, and the first data grouping information includes identification information and version information of the first data grouping; the first data grouping is a data grouping currently associated with the terminal device or a data grouping historically associated with the terminal device; Obtaining version correction information of the first data group; the version correction information indicates the version information of the first data group that was most recently updated; According to the version correction information of the first data group and the version information, a second data set is obtained from the first data set; the second data set includes second data group information, the second data group information includes identification information and version information of the second data group, and the second data group is the data group currently associated with the terminal device; generating personalized recommendation information according to identification information of the second data group included in the second data set; The personalized recommendation information is sent to the terminal device.