WO2024051555A1 - Data query method, electronic device, and system - Google Patents

Data query method, electronic device, and system Download PDF

Info

Publication number
WO2024051555A1
WO2024051555A1 PCT/CN2023/115905 CN2023115905W WO2024051555A1 WO 2024051555 A1 WO2024051555 A1 WO 2024051555A1 CN 2023115905 W CN2023115905 W CN 2023115905W WO 2024051555 A1 WO2024051555 A1 WO 2024051555A1
Authority
WO
WIPO (PCT)
Prior art keywords
user
query
data
information
query result
Prior art date
Application number
PCT/CN2023/115905
Other languages
French (fr)
Chinese (zh)
Inventor
黄益贵
乔登龙
朱志峰
唐晓东
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024051555A1 publication Critical patent/WO2024051555A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries

Abstract

The present application provides a data query method, an electronic device, and a system. The method comprises that: a user equipment sends a query request to a server; the server sends first return data and first information to the user equipment according to the query request, wherein the first return data is a subset of query results, the query results comprise a plurality of pieces of query result data, and the first information is used for identifying part or all of the plurality of pieces of query result data; the user equipment sends a loading request to the server, wherein the loading request carries second information; and according to the loading request, the server sends the query result data identified by the second information to the user equipment. In this way, the server sends, to the user equipment, part of the query result data and the first information used for identifying part or all of the query result data, so that the server does not need to cache the query result data, the cache pressure and cost of the server are reduced, and the user equipment can obtain all of the query result data by means of the server.

Description

一种数据查询方法、电子设备及系统A data query method, electronic device and system
本申请要求于2022年09月09日提交国家知识产权局、申请号为202211104733.0、申请名称为“一种数据查询方法、电子设备及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority for a Chinese patent application submitted to the State Intellectual Property Office on September 9, 2022, with application number 202211104733.0 and application title "A data query method, electronic device and system", the entire content of which is incorporated by reference. in this application.
技术领域Technical field
本申请涉及终端技术领域,尤其涉及一种数据查询方法、电子设备及系统。The present application relates to the field of terminal technology, and in particular to a data query method, electronic equipment and system.
背景技术Background technique
随着互联网技术的快速发展和用户设备的广泛应用,人们逐渐进入了电子化阅读时代,人们更多的利用用户设备通过互联网从各大应用程序(application,APP)服务器上获取各种信息内容。例如,用户可以利用用户设备通过消费类APP服务器获取附近的餐厅、电影院、酒店等信息,用户还可以利用用户设备通过信息聚合类APP服务器浏览获取新闻、文学作品等资讯信息。With the rapid development of Internet technology and the widespread use of user equipment, people have gradually entered the era of electronic reading. People are increasingly using user equipment to obtain various information content from major application (application, APP) servers through the Internet. For example, the user can use the user device to obtain information about nearby restaurants, cinemas, hotels, etc. through the consumer APP server. The user can also use the user device to browse and obtain news, literary works and other information through the information aggregation APP server.
以用户利用用户设备通过消费类APP服务器获取附近的餐厅信息为例,APP服务器接收用户通过用户设备发送的查询附近餐厅信息的查询请求,APP服务器根据该查询请求获取包括附近餐厅信息的查询结果数据集,并将查询结果数据集进行缓存,以便于用户设备从APP服务器中获取查询结果数据。Take the user using the user device to obtain nearby restaurant information through the consumer APP server as an example. The APP server receives a query request for nearby restaurant information sent by the user through the user device, and the APP server obtains query result data including nearby restaurant information based on the query request. Set, and cache the query result data set so that the user device can obtain the query result data from the APP server.
但是,如果查询结果数据集的数据量较大,APP服务器则无法将查询结果数据集进行缓存或者实施缓存的成本过高,从而影响用户设备从APP服务器中获取查询结果数据。However, if the query result data set has a large amount of data, the APP server cannot cache the query result data set or the cost of caching is too high, which affects the user device's ability to obtain the query result data from the APP server.
发明内容Contents of the invention
本申请实施例提供一种数据查询方法、电子设备及系统,该方法包括服务器将用户查询得到的全部数据中的一部分数据和其余(或者剩余)数据对应的唯一标识符发送至用户设备。用户设备接收完一部分数据后,可以响应于用户的进一步加载操作向服务器发送其余(或者剩余)数据对应的唯一标识符,以便APP服务器根据其余(或者剩余)数据对应的标识符获取其余(或者剩余)数据并发送至用户设备。这样,服务器无需缓存数据,降低了服务器的缓存压力和成本,并且不会影响用户设备通过服务器获取查询的全部数据。Embodiments of the present application provide a data query method, electronic device and system. The method includes the server sending a part of the data and the unique identifier corresponding to the remaining (or remaining) data from all the data queried by the user to the user device. After the user device receives a part of the data, it can send the unique identifier corresponding to the remaining (or remaining) data to the server in response to the user's further loading operation, so that the APP server can obtain the remaining (or remaining) data based on the identifier corresponding to the remaining (or remaining) data. ) data and sent to the user device. In this way, the server does not need to cache data, which reduces the caching pressure and cost of the server, and does not affect the user device's ability to obtain all queried data through the server.
为达到上述目的,本申请的实施例采用如下技术方案:In order to achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
第一方面,提供了一种数据查询方法,应用于用户设备,该方法包括:用户设备向服务器发送查询请求。其中,查询请求包括用户的查询信息,查询请求用于获取查询信息对应的查询结果。用户设备接收服务器发送的第一返回数据和第一信息,第一返回数据为查询结果的子集,查询结果包括多条查询结果数据;第一信息用于标识多条查询结果数据中的部分或全部查询结果数据。用户设备向服务器发送加载请求,加载请求携带第二信息,第二信息是第一信息的子集;用户设备接收服务器发送的第二信息标识的查询结果数据。In the first aspect, a data query method is provided, which is applied to user equipment. The method includes: the user equipment sends a query request to a server. The query request includes the user's query information, and the query request is used to obtain query results corresponding to the query information. The user equipment receives the first return data and the first information sent by the server. The first return data is a subset of the query results. The query results include multiple pieces of query result data. The first information is used to identify a part or part of the multiple pieces of query result data. All query result data. The user equipment sends a loading request to the server, where the loading request carries second information, and the second information is a subset of the first information; the user equipment receives query result data identified by the second information sent by the server.
在第一方面的一种可实现方式中,第一信息包括标识符集合,标识符集合包括多条查询结果数据中的部分或全部查询结果数据对应的唯一标识符;或者,第一信息包括会话标识符,会话标识符与标识符集合之间存在映射关系;标识符集合包括多条查询结果数据中的部分或全部查询结果数据对应的唯一标识符。In an implementation manner of the first aspect, the first information includes a set of identifiers, and the set of identifiers includes unique identifiers corresponding to some or all of the plurality of query result data; or the first information includes a session There is a mapping relationship between identifiers, session identifiers and identifier sets; the identifier set includes unique identifiers corresponding to part or all of the query result data in multiple query result data.
该方法中,用户设备向服务器发送查询请求后,接收服务器发送的第一返回数据,即一部分查询结果数据,以及用于标识多条查询结果数据中的部分或全部查询结果数据的第一信息。用户设备根据第一信息可以确定第二信息,并通过向服务器发送携带第二信息的加载请求,以获取第二信息标识的查询结果数据,即获取更多的查询结果数据。这样,服务器将部分查询结果数据和用于标识部分或全部查询结果数据的第一信息共同发送至用户设备,服务器无需缓存查询结果数据,降低了服务器的缓存压力和成本,并且用户设备可以还通过服务器获取全部查询结果数据。In this method, after the user equipment sends a query request to the server, it receives the first return data sent by the server, that is, a part of the query result data, and the first information used to identify part or all of the query result data in the plurality of query result data. The user equipment can determine the second information based on the first information, and obtain the query result data identified by the second information by sending a load request carrying the second information to the server, that is, obtain more query result data. In this way, the server jointly sends part of the query result data and the first information used to identify part or all of the query result data to the user device. The server does not need to cache the query result data, which reduces the server's caching pressure and cost, and the user device can also pass The server obtains all query result data.
在第一方面的一种可实现方式中,查询请求还包括以下至少一种信息:用户设备的位置信息、用户设备的设备属性、用户属性。在本实现方式中,服务器根据查询请求中的用户设备的位 置信息、用户设备的设备属性、用户属性可以生成用户的个性化查询结果数据,以提高用户的使用体验。In an implementation manner of the first aspect, the query request further includes at least one of the following information: location information of the user equipment, device attributes of the user equipment, and user attributes. In this implementation, the server determines the location of the user device in the query request. The configuration information, device attributes of the user device, and user attributes can generate the user's personalized query result data to improve the user experience.
第二方面,提供了一种数据查询方法,应用于服务器,方法包括:服务器接收用户设备发送的查询请求,查询请求包括用户的查询信息,查询请求用于获取查询信息对应的查询结果。服务器根据查询请求,确定第一返回数据和第一信息,第一返回数据为查询结果的子集,查询结果包括多条查询结果数据;第一信息用于标识多条查询结果数据中的部分或全部查询结果数据。服务器向用户设备发送第一返回数据和第一信息。服务器接收用户设备发送的加载请求,加载请求携带第二信息,第二信息是第一信息的子集。服务器根据加载请求,确定第二信息标识的查询结果数据。服务器向用户设备发送第二信息标识的查询结果数据。In the second aspect, a data query method is provided, applied to a server. The method includes: the server receives a query request sent by a user device, the query request includes the user's query information, and the query request is used to obtain query results corresponding to the query information. The server determines the first returned data and the first information according to the query request. The first returned data is a subset of the query results, and the query results include multiple query result data; the first information is used to identify part or All query result data. The server sends first return data and first information to the user equipment. The server receives a loading request sent by the user device, where the loading request carries second information, and the second information is a subset of the first information. The server determines the query result data of the second information identifier according to the loading request. The server sends the query result data of the second information identifier to the user equipment.
在第二方面的一种可实现方式中,第一信息包括标识符集合,标识符集合包括多条查询结果数据中的部分或全部查询结果数据对应的唯一标识符;或者,第一信息包括会话标识符,会话标识符与标识符集合之间存在映射关系;标识符集合包括多条查询结果数据中的部分或全部查询结果数据对应的唯一标识符。In an implementation manner of the second aspect, the first information includes a set of identifiers, and the set of identifiers includes unique identifiers corresponding to some or all of the plurality of query result data; or, the first information includes a session There is a mapping relationship between identifiers, session identifiers and identifier sets; the identifier set includes unique identifiers corresponding to part or all of the query result data in multiple query result data.
该方法中,服务器将部分查询结果数据和用于标识部分或全部查询结果数据的第一信息共同发送至用户设备,服务器无需缓存查询结果数据,降低了服务器的缓存压力和成本,并且用户设备还可以通过服务器获取全部查询结果数据。In this method, the server sends part of the query result data and the first information used to identify part or all of the query result data to the user device. The server does not need to cache the query result data, which reduces the cache pressure and cost of the server, and the user device also All query result data can be obtained through the server.
在第二方面的一种可实现方式中,查询请求还包括:用户设备的位置信息、用户设备的设备属性、用户属性。服务器根据查询请求,确定第一返回数据和第一信息,包括:服务器根据设备属性和/或用户属性,确定用户画像数据,用户画像数据用于表征用户的查询特征。服务器根据用户画像数据、位置信息和设备属性,确定查询结果标识符集合,查询结果标识符集合包括每条查询结果数据对应的唯一标识符。服务器根据查询结果标识符集合确定第一返回数据和第一信息。在本实现方式中,服务器根据查询请求中的用户设备的位置信息、用户设备的设备属性、用户属性可以生成用户的个性化查询结果数据,以提高用户的使用体验。In an implementation manner of the second aspect, the query request also includes: location information of the user equipment, device attributes of the user equipment, and user attributes. The server determines the first return data and the first information according to the query request, including: the server determines user portrait data based on device attributes and/or user attributes, and the user portrait data is used to characterize the user's query characteristics. The server determines the query result identifier set based on the user portrait data, location information, and device attributes. The query result identifier set includes the unique identifier corresponding to each query result data. The server determines the first return data and the first information based on the query result identifier set. In this implementation, the server can generate the user's personalized query result data based on the location information of the user device, device attributes of the user device, and user attributes in the query request, so as to improve the user experience.
在第二方面的一种可实现方式中,设备属性包括用户设备标识符,用户属性包括用户标识符;根据设备属性和/或用户属性,确定用户画像数据包括:服务器根据用户设备标识符和/或用户标识符,通过用户画像数据库,获取用户画像数据。其中,用户画像数据库包括与用户设备标识符和/或用户标识符具有映射关系的用户画像数据。在本实现方式中,服务器可以根据通过用户画像数据库,获取用户画像数据,以表征用户的查询特征。并进一步根据画像数据生成用户的个性化查询结果数据,以提高用户的使用体验。In an implementation manner of the second aspect, the device attributes include a user device identifier, and the user attributes include a user identifier; determining the user portrait data according to the device attributes and/or user attributes includes: the server determines the user portrait data according to the user device identifier and/or Or user identifier, obtain user portrait data through the user portrait database. Wherein, the user portrait database includes user portrait data that has a mapping relationship with the user device identifier and/or the user identifier. In this implementation, the server can obtain user portrait data based on the user portrait database to characterize the user's query characteristics. And further generate the user's personalized query result data based on the portrait data to improve the user experience.
在第二方面的一种可实现方式中,根据用户画像数据、位置信息和设备属性,确定查询结果标识符集合,包括:根据用户画像数据、位置信息和设备属性,通过检索数据库,检索得到查询结果标识符集合;检索数据库包括每条查询结果数据对应的唯一标识符。In an implementable manner of the second aspect, determining the set of query result identifiers based on the user portrait data, location information, and device attributes includes: retrieving the query based on the user portrait data, location information, and device attributes in a database. A collection of result identifiers; the retrieval database includes unique identifiers corresponding to each query result data.
第三方面,提供了一种电子设备,包括:存储器、一个或多个处理器;存储器与处理器耦合;其中,存储器中存储有计算机程序代码,计算机程序代码包括计算机指令,当计算机指令被处理器执行时,使得电子设备执行上述第一方面任一项所述的方法,或者,使得电子设备执行上述第二方面任一项所述的方法。In a third aspect, an electronic device is provided, including: a memory, one or more processors; the memory is coupled to the processor; wherein, computer program code is stored in the memory, and the computer program code includes computer instructions. When the computer instructions are processed When the processor is executed, the electronic device is caused to perform the method described in any one of the first aspects, or the electronic device is caused to perform the method described in any one of the second aspects.
第四方面,提供了一种计算机可读存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述第一方面任一项所述的方法,或者,使得电子设备执行上述第二方面任一项所述的方法。In a fourth aspect, a computer-readable storage medium is provided, including computer instructions. When the computer instructions are run on an electronic device, the electronic device causes the electronic device to execute any of the methods described in the first aspect, or causes the electronic device to execute the method. The method according to any one of the above second aspects.
第五方面,提供了一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行上述第一方面任一项所述的方法,或者,使得计算机执行上述第二方面任一项所述的方法。In a fifth aspect, a computer program product is provided. When the computer program product is run on a computer, it causes the computer to perform any of the methods described in the first aspect, or causes the computer to perform any of the methods described in the second aspect. method described.
可以理解地,上述第三方面的电子设备,第四方面的计算机可读存储介质,第五方面的计算机程序产品所能达到的有益效果,可参考第一方面及其任一种可能的设计方式中的有益效果,此处不再赘述。It can be understood that the beneficial effects that can be achieved by the above-mentioned electronic device of the third aspect, the computer-readable storage medium of the fourth aspect, and the computer program product of the fifth aspect can be referred to the first aspect and any possible design method thereof. The beneficial effects will not be repeated here.
附图说明Description of the drawings
图1为本申请实施例示出的查询数据应用场景的示意图;Figure 1 is a schematic diagram of a query data application scenario illustrated in an embodiment of the present application;
图2为本申请实施例示出的一种数据查询方法的流程示意图; Figure 2 is a schematic flow chart of a data query method according to an embodiment of the present application;
图3为本申请实施例示出的用户设备发送查询请求的示意图;Figure 3 is a schematic diagram of a user equipment sending a query request according to an embodiment of the present application;
图4为本申请实施例示出的APP服务器发送查询结果数据的示意图一;Figure 4 is a schematic diagram 1 of the APP server sending query result data according to the embodiment of the present application;
图5为本申请实施例示出的用户设备发送下一页数据请求的示意图;Figure 5 is a schematic diagram of a user equipment sending a next page data request according to an embodiment of the present application;
图6为本申请实施例示出的APP服务器发送查询结果数据的示意图二;Figure 6 is a schematic diagram 2 of the APP server sending query result data according to the embodiment of the present application;
图7为本申请实施例示出的一种展示查询结果数据的示意图;Figure 7 is a schematic diagram showing query result data according to an embodiment of the present application;
图8为本申请实施例示出的一种数据查询系统架构示意图;Figure 8 is a schematic diagram of the architecture of a data query system according to an embodiment of the present application;
图9为本申请实施例示出的电子设备的硬件结构示意图;Figure 9 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application;
图10为本申请实施例示出的电子设备的软件结构框图;Figure 10 is a software structure block diagram of an electronic device according to an embodiment of the present application;
图11为本申请实施例示出的一种数据查询方法的流程示意图;Figure 11 is a schematic flow chart of a data query method according to an embodiment of the present application;
图12为本申请实施例示出的用户设备发送第一查询请求的示意图;Figure 12 is a schematic diagram of a user equipment sending a first query request according to an embodiment of the present application;
图13为本申请实施例示出的一种推荐界面的示意图;Figure 13 is a schematic diagram of a recommendation interface according to an embodiment of the present application;
图14为本申请实施例示出的APP服务器发送第一返回数据集合和第一信息的示意图;Figure 14 is a schematic diagram of the APP server sending the first return data set and the first information according to the embodiment of the present application;
图15为本申请实施例示出的用户设备发送第二查询请求的示意图;Figure 15 is a schematic diagram of a user equipment sending a second query request according to an embodiment of the present application;
图16为本申请实施例示出的APP服务器发送第二返回数据集合示意图;Figure 16 is a schematic diagram of the APP server sending the second return data set according to the embodiment of the present application;
图17为本申请实施例示出的另一种数据查询方法的流程示意图;Figure 17 is a schematic flow chart of another data query method according to an embodiment of the present application;
图18为本申请实施例示出的一种电子设备的结构示意图。FIG. 18 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请的描述中,除非另有说明,“/”表示前后关联的对象是一种“或”的关系,例如,A/B可以表示A或B;本申请中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,其中A,B可以是单数或者复数。并且,在本申请的描述中,除非另有说明,“多个”是指两个或多于两个。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a和b,a和c,b和c,或a和b和c,其中a,b,c可以是单个,也可以是多个。The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Among them, in the description of this application, unless otherwise stated, "/" means that the related objects are an "or" relationship. For example, A/B can mean A or B; "and/or" in this application "It is just an association relationship that describes related objects. It means that there can be three relationships. For example, A and/or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. Among them, A , B can be singular or plural. Furthermore, in the description of this application, unless otherwise specified, "plurality" means two or more than two. "At least one of the following" or similar expressions thereof refers to any combination of these items, including any combination of a single item (items) or a plurality of items (items). For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.
另外,为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。同时,在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念,便于理解。In addition, in order to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as “first” and “second” are used to distinguish identical or similar items with basically the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the number and execution order, and words such as "first" and "second" do not limit the number and execution order. At the same time, in the embodiments of this application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "such as" in the embodiments of the present application is not to be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete manner that is easier to understand.
随着互联网技术的快速发展和用户设备的广泛应用,人们逐渐进入了电子化阅读时代,人们更多的利用用户设备通过互联网从各大APP上获得各种信息内容。例如,用户通过信息聚合类APP浏览资讯信息,如各种新闻、文学作品等信息。用户还可以通过消费类APP浏览商家信息,如获取附近的美食、电影院、酒店等信息。With the rapid development of Internet technology and the widespread use of user equipment, people have gradually entered the era of electronic reading. People are increasingly using user equipment to obtain various information content from major APPs through the Internet. For example, users browse information through information aggregation APPs, such as various news, literary works and other information. Users can also browse business information through consumer apps, such as obtaining information about nearby restaurants, movie theaters, hotels, etc.
在用户浏览APP所展示的信息内容时,由于APP所展示的信息内容较多,用户设备的显示界面的尺寸有限,通过显示界面展示给用户的信息内容是有限的,无法通过一次展示将APP的全部信息内容展示给用户。此时,为了提高用户使用体验,使用户可以浏览更多的信息内容,终端设备可以响应于用户对某个APP上的信息内容的浏览操作,以信息流的方式向用户展示信息内容。其中信息流可以指按照一定规律排列(例如以距离由近及远排列、以发布时间由近及远排列等)的信息内容的集合,以信息流的方式向用户展示信息内容可以指响应于用户的浏览操作,按照信息内容的排列规律依次向用户展示信息内容。比如:在用户浏览APP所展示的信息内容时,用户设备可以响应于用户的滑动操作(比如向上滑动用户设备的显示界面的操作)顺序展示信息内容,此时APP的信息内容随着用户的滑动操作呈流动展示。When the user browses the information content displayed by the APP, because the APP displays a lot of information content and the size of the display interface of the user device is limited, the information content displayed to the user through the display interface is limited, and the APP's information content cannot be displayed in one display. All information content is displayed to the user. At this time, in order to improve the user experience and enable the user to browse more information content, the terminal device can respond to the user's browsing operation of the information content on an APP and display the information content to the user in the form of an information flow. Information flow can refer to a collection of information content arranged according to certain rules (for example, arranged from near to far, arranged from near to far by release time, etc.). Displaying information content to users in the form of information flow can refer to responding to users. The browsing operation displays the information content to the user in sequence according to the arrangement rules of the information content. For example: when the user browses the information content displayed by the APP, the user device can display the information content sequentially in response to the user's sliding operation (such as sliding the display interface of the user device upward). At this time, the information content of the APP follows the user's sliding operation. The operation is displayed in a flowing manner.
示例性的,信息内容的集合中包括多页信息内容时,用户设备可以响应于用户的滑动操作按页数顺序展示每一页的信息内容。其中,每一页的信息内容可以为用户设备的显示界面可展示的 最大信息内容。例如,用户设备的显示界面可展示的最大信息内容为10条数据信息,则每一页的信息内容包括10条数据信息。当用户浏览完用户设备展示的一页信息内容(10条数据信息内容),可以通过滑动操作触发用户设备展示下一页信息内容(在前一页10条数据信息后的10条数据信息内容)。For example, when the collection of information content includes multiple pages of information content, the user device can display the information content of each page in page order in response to the user's sliding operation. Among them, the information content of each page can be displayed by the display interface of the user device. Maximum information content. For example, if the maximum information content that can be displayed on the display interface of the user device is 10 pieces of data information, then the information content of each page includes 10 pieces of data information. When the user finishes browsing the page of information displayed on the user device (10 pieces of data), the user device can be triggered to display the next page of information (10 pieces of data after the 10 pieces of data on the previous page) through a sliding operation. .
图1为本申请实施例示出的查询数据应用场景的示意图,在用户使用消费类APP查询用户附近的美食信息的场景下。如图1所示,通过用户设备展示查询结果数据(美食)的信息,其中,查询结果数据可以以与用户设备的距离由近到远的顺序排序。Figure 1 is a schematic diagram of a data query application scenario illustrated in an embodiment of the present application, in a scenario where a user uses a consumer APP to query food information near the user. As shown in Figure 1, the information of the query result data (food) is displayed through the user device, where the query result data can be sorted in order of distance from the user device from closest to farthest.
具体的,用户设备响应于用户对消费类APP的查询附近餐厅的查询操作,向APP服务器发送查询请求,APP服务器基于查询请求生成查询结果数据集,并将该查询结果数据集保存到APP服务器的缓存中。通常,APP服务器可以根据用户设备发送的查询请求,基于用户设备所在的位置(以经纬度信息为例)进行数据查询。具体的,APP服务器可以以用户设备的经纬度为原点,向周边不断扩展,以到原点的距离由近到远的排序,筛选出符合用户查询请求的查询结果数据集。APP服务器可以以经纬度为主键将查询结果数据集进行缓存,并支持用户设备获取查询结果数据。Specifically, the user device responds to the user's inquiry operation of nearby restaurants on the consumer APP and sends a query request to the APP server. The APP server generates a query result data set based on the query request and saves the query result data set to the APP server. In cache. Generally, the APP server can perform data query based on the location of the user device (taking longitude and latitude information as an example) according to the query request sent by the user device. Specifically, the APP server can use the longitude and latitude of the user device as the origin, continue to expand to the surrounding area, sort the distance to the origin from near to far, and filter out the query result data set that meets the user's query request. The APP server can cache the query result data set with longitude and latitude as the primary key, and support the user device to obtain the query result data.
其中,该查询结果数据集可以以信息流的方式通过用户设备展示给用户,用户在用户设备上的滑动操作触发用户设备展示下一页的查询结果数据时,用户设备可以携带已经展示的页数(如第3页)向APP服务器获取下一页的查询结果数据。这样,可以保证用户浏览查询结果数据的连贯性和逻辑性。Among them, the query result data set can be displayed to the user through the user device in the form of information flow. When the user's sliding operation on the user device triggers the user device to display the query result data of the next page, the user device can carry the number of pages that have been displayed. (such as page 3) obtains the query result data of the next page from the APP server. In this way, the coherence and logic of user browsing query result data can be ensured.
具体的,图2为本申请实施例示出的一种数据查询方法的流程示意图。如图2所示,以用户使用消费类APP进行附近的餐厅查询,用户设备分页展示查询结果数据为例,示例性的说明在用户设备中实现数据查询方法,该方法可以通过以下步骤S101-S110实现:Specifically, FIG. 2 is a schematic flowchart of a data query method according to an embodiment of the present application. As shown in Figure 2, taking the user using a consumer APP to query nearby restaurants, and the user device displaying the query result data in pages, as an example, the data query method is implemented in the user device, and the method can be implemented through the following steps S101-S110 accomplish:
S101、用户设备响应用户的查询操作,获取标识信息。S101. The user device responds to the user's query operation and obtains identification information.
示例性的,图3为本申请实施例示出的一种用户设备发送查询请求的示意图,如图3所示,用户在APP的搜索框中输入“查询附近的餐厅”。用户设备响应查询操作获取该用户设备的标识信息。标识信息可用于识别用户设备,并且APP服务器可根据标识信息缓存对应用户设备的数据。具体的,用户设备的标识信息包括但不限于:用户设备的位置信息(经纬度)、用户设备的唯一标识符或者APP用户账号。Illustratively, Figure 3 is a schematic diagram of a user device sending a query request according to an embodiment of the present application. As shown in Figure 3, the user enters "query nearby restaurants" in the search box of the APP. The user equipment responds to the query operation to obtain the identification information of the user equipment. The identification information can be used to identify the user device, and the APP server can cache data corresponding to the user device based on the identification information. Specifically, the identification information of the user equipment includes but is not limited to: the location information (latitude and longitude) of the user equipment, the unique identifier of the user equipment, or the APP user account.
S102、用户设备向APP服务器发送查询请求。S102. The user device sends a query request to the APP server.
用户设备响应查询操作在获取标识信息后,向APP服务器发送查询请求。其中,查询请求包括:用户设备的位置信息,用户设备的标识信息以及查询条件。查询条件例如可以是:查询附近的餐厅、查询附近的电影院或者查询附近的酒店等。In response to the query operation, the user device sends a query request to the APP server after obtaining the identification information. The query request includes: location information of the user equipment, identification information of the user equipment, and query conditions. The query conditions may be, for example: querying nearby restaurants, querying nearby cinemas, or querying nearby hotels.
S103、APP服务器接收查询请求,根据查询请求生成查询结果数据集,并将查询结果数据集保存在缓存中。具体的,APP服务器根据查询请求生成查询结果数据集,并以用户设备的标识信息为主键保存在APP服务器的缓存中。S103. The APP server receives the query request, generates a query result data set according to the query request, and saves the query result data set in the cache. Specifically, the APP server generates a query result data set according to the query request, and saves it in the cache of the APP server with the identification information of the user device as the primary key.
S104、APP服务器向用户设备发送第一页的查询结果数据。S104. The APP server sends the query result data of the first page to the user device.
图4为本申请实施例示出的一种APP服务器发送查询结果数据的示意图一,如图4所示,APP服务器向用户设备发送第一页的查询结果数据,其中第一页的查询结果数据的数量为用户设备的显示界面一页可展示的数据的最大数量。当APP服务器接收到用户设备发送的获取其他页数的查询结果数据的请求时,再向用户设备发送对应页数的查询结果数据。这样,用户设备可以实现以信息流的方式展示查询结果数据。Figure 4 is a schematic diagram 1 of an APP server sending query result data according to an embodiment of the present application. As shown in Figure 4, the APP server sends the query result data of the first page to the user device, where the query result data of the first page The quantity is the maximum amount of data that can be displayed on one page of the display interface of the user device. When the APP server receives a request sent by the user device to obtain the query result data of other pages, it then sends the query result data of the corresponding page number to the user device. In this way, the user device can display the query result data in the form of information flow.
S105、用户设备接收第一页的查询结果数据,并在用户设备展示第一页的查询结果数据。S105. The user device receives the query result data of the first page, and displays the query result data of the first page on the user device.
具体的,如图4所示,用户设备可以通过显示界面展示接收的第一页的查询结果数据,具体包括:以与用户设备的距离由近及远排列的每一个餐厅的信息,以便用户直观的浏览附近餐厅的信息。Specifically, as shown in Figure 4, the user device can display the received query result data on the first page through the display interface, which specifically includes: the information of each restaurant arranged in ascending order of distance from the user device, so that the user can intuitively Browse information about nearby restaurants.
S106、用户设备接收用户的数据请求指令,请求指令用于设备端APP获取下一页的查询结果数据。S106. The user device receives the user's data request instruction, and the request instruction is used by the device-side APP to obtain the query result data of the next page.
具体的,当用户浏览完第一页的查询结果数据(用户设备当前展示的查询结果数据),需要 继续浏览下一页的查询结果数据时。如图5所示,用户可以在用户设备上通过向下滑显示界面的操作发出数据请求指令。用户设备响应数据请求指令,向APP服务器获取下一页的查询结果数据。Specifically, when the user finishes browsing the query result data on the first page (the query result data currently displayed on the user device), it is necessary to When continuing to browse the query result data on the next page. As shown in Figure 5, the user can issue a data request instruction on the user device by sliding down to display the interface. The user device responds to the data request instruction and obtains the query result data of the next page from the APP server.
S107、用户设备响应数据请求指令,向APP服务器发送下一页数据请求,下一页数据请求包括用户设备的标识信息以及页码数。S107. The user device responds to the data request instruction and sends a next page data request to the APP server. The next page data request includes the identification information of the user device and the page number.
具体的,下一页数据请求用于用户设备获取相对于步骤S105中获取页数的下一页的查询结果数据。其中,用户设备的标识信息以及页码数可以用于在APP服务器的缓存中准确地找到该用户设备对应页码数的查询结果数据。Specifically, the next page data request is used by the user equipment to obtain the query result data of the next page relative to the page number obtained in step S105. Among them, the identification information and page number of the user device can be used to accurately find the query result data corresponding to the page number of the user device in the cache of the APP server.
S108、APP服务器接收下一页数据请求,根据下一页数据请求从缓存中查找到下一页的查询结果数据。S108. The APP server receives the next page data request and searches for the query result data of the next page from the cache according to the next page data request.
具体的,APP服务器根据用户设备的标识信息从缓存中查找得到该用户设备的查询结果数据集。然后,根据页码数从该用户设备的查询结果数据集中,查找得到该页码数对应的查询结果数据,即下一页的查询结果数据。Specifically, the APP server searches the cache for the query result data set of the user device based on the identification information of the user device. Then, search the query result data corresponding to the page number from the query result data set of the user device according to the page number, that is, the query result data of the next page.
S109、APP服务器向用户设备发送下一页的查询结果数据。S109. The APP server sends the query result data of the next page to the user device.
S110、用户设备接收下一页的查询结果数据,如图6所示,用户设备通过显示界面展示下一页的查询结果数据。这样,通过上述步骤S101-S110可以在用户设备中实现以信息流的方式(分页方式)展示基于用户设备的位置信息查询结果数据。S110. The user device receives the query result data of the next page. As shown in Figure 6, the user device displays the query result data of the next page through the display interface. In this way, through the above steps S101-S110, the location information query result data based on the user equipment can be displayed in the user equipment in an information flow manner (paging manner).
但是,在上述步骤S103中,APP服务器是基于用户设备的位置信息为查询条件,生成的查询结果数据。这样,无法满足复杂的个性化查询场景,即无法结合用户的需求等特征,生成该用户的个性化查询结果,得到用户期望看到的查询结果数据。However, in the above step S103, the APP server generates query result data based on the location information of the user device as the query condition. In this way, complex personalized query scenarios cannot be satisfied, that is, it cannot combine the user's needs and other characteristics to generate the user's personalized query results and obtain the query result data that the user expects to see.
例如,在一些实际应用场景中,为提高用户的使用体验,APP服务器可以结合用户需求(或者称为用户的喜好)等特征生成该用户的查询结果数据,此时因该查询结果数据针对该用户个人的特定需求而定,可以称为该用户的个性化查询结果数据。例如,APP服务器可以基于用户设备的位置信息,结合用户画像(例如:用户性别、年龄、喜好、查询时间、查询场景等)生成该用户的个性化查询结果数据。由于不同用户的用户画像是不同的,因此每个用户在相同时间、相同位置下的查询结果数据集可能都是不相同的。以用户使用消费类APP进行附近代金券查询为例,APP服务器在同一时间、同一地点结合用户画像(用户喜好),会给部分用户(喜欢喝咖啡的用户)推送附近的咖啡券的查询结果数据,给部分用户(喜欢吃快餐的用户)推附近的快餐券的查询结果数据。这样,可以针对不同用户的需求,生成该用户的个性化查询结果数据,以提高用户的使用体验。For example, in some practical application scenarios, in order to improve the user experience, the APP server can combine user needs (or user preferences) and other characteristics to generate query result data for the user. In this case, the query result data is specific to the user. Depending on the specific needs of an individual, it can be called personalized query result data for that user. For example, the APP server can generate personalized query result data for the user based on the location information of the user's device and the user's profile (such as user gender, age, preferences, query time, query scenario, etc.). Since the user portraits of different users are different, the query result data sets of each user at the same time and in the same location may be different. Take the user using a consumer APP to query nearby coupons as an example. The APP server combines user portraits (user preferences) at the same time and place to push nearby coffee coupon query result data to some users (users who like to drink coffee). , push the query result data of nearby fast food coupons to some users (users who like to eat fast food). In this way, the user's personalized query result data can be generated according to the needs of different users to improve the user experience.
可以理解的是,个性化查询结果数据为示例性命名,不限定本申请实施例所示方案。下面本申请实施例所述方案中,以查询结果数据为用户的个性化查询结果数据为例进行描述,在此统一说明,后续不再赘述。It can be understood that the personalized query result data is an exemplary naming and does not limit the solutions shown in the embodiments of this application. In the solutions described in the embodiments of the present application below, the query result data is the user's personalized query result data as an example for description. This is explained in a unified manner and will not be described in detail later.
但是,为了生成用户的个性化查询结果数据,APP服务器使用的查询条件不仅包括用户设备的位置信息,还包括用户画像信息。这样,由于查询条件过多,得到的个性化查询结果数据的数据量较大。并且,APP服务器生成的个性化查询结果数据无法采用有效的主键进行缓存。如果采用分布式缓存的方法,则会提高APP服务器缓存的成本。However, in order to generate the user's personalized query result data, the query conditions used by the APP server include not only the location information of the user device, but also the user portrait information. In this way, due to too many query conditions, the amount of personalized query result data obtained is large. Moreover, the personalized query result data generated by the APP server cannot be cached using a valid primary key. If the distributed caching method is adopted, the cost of caching on the APP server will be increased.
并且,即使APP服务器对用户的个性化查询结果数据进行缓存,但是在用户查询条件发生变化之后,例如用户画像信息中的时间、场景等发生变化,如用户从工作场合回到家中,则APP服务器会生成新的个性化查询结果数据。因此,APP服务器缓存的原个性化查询结果数据将没有使用价值,也无法被其他用户复用。原个性化查询结果数据会占用APP服务器的大量存储资源,造成APP服务器的存储资源浪费。Moreover, even if the APP server caches the user's personalized query result data, after the user's query conditions change, for example, the time, scene, etc. in the user portrait information change, such as the user returns home from work, the APP server New personalized query result data will be generated. Therefore, the original personalized query result data cached by the APP server will have no use value and cannot be reused by other users. The original personalized query result data will occupy a large amount of storage resources of the APP server, causing a waste of storage resources of the APP server.
因此,在一些应用场景下,例如在生成个性化查询结果数据的场景下,个性化查询结果数据的数据量较大,APP服务器无法实现数据缓存或者实施数据缓存的成本过高,从而影响用户设备从APP服务器中获取查询结果数据。例如,APP服务器首次向用户设备发送一部分(第一页)个性化查询结果数据后,由于APP服务器无法缓存个性化查询结果数据,则用户设备无法获取其他部分的个性化查询结果数据。图7为本申请实施例示出的一种展示查询结果数据的示意图, 如图7所示,由于APP服务器没有缓存个性化查询结果数据,用户设备只能显示首次接收的15条个性化查询结果数据,用户设备无法得到其他部分个性化查询结果数据。Therefore, in some application scenarios, such as generating personalized query result data, the amount of personalized query result data is large, and the APP server cannot implement data caching or the cost of implementing data caching is too high, thus affecting user equipment. Obtain query result data from the APP server. For example, after the APP server sends a part (the first page) of personalized query result data to the user device for the first time, because the APP server cannot cache the personalized query result data, the user device cannot obtain other parts of the personalized query result data. Figure 7 is a schematic diagram showing query result data according to an embodiment of the present application. As shown in Figure 7, since the APP server does not cache the personalized query result data, the user device can only display the 15 personalized query result data received for the first time, and the user device cannot obtain other parts of the personalized query result data.
为了解决在数据集的数据量较大的情况下,服务器无法对数据集实现数据缓存或者实施数据缓存的成本过高,从而影响用户设备从服务器中获取查询结果数据的问题。In order to solve the problem that when the data set has a large amount of data, the server cannot implement data caching for the data set or the cost of implementing data caching is too high, thus affecting the user device to obtain the query result data from the server.
本申请实施例提供一种数据查询方法:用户设备向服务器发送查询请求。其中,查询请求包括用户的查询信息,查询请求可以用于获取查询信息对应的查询结果。服务器根据查询请求,确定第一返回数据和第一信息。其中,第一返回数据为查询结果的子集,查询结果包括多条查询结果数据;第一信息用于标识多条查询结果数据中的部分或全部查询结果数据。用户设备接收服务器发送的第一返回数据和第一信息。进一步的,用户设备响应于用户的进一步加载操作,用户设备可以向服务器发送加载请求,加载请求携带第二信息。其中,第二信息是第一信息的子集。服务器根据加载请求,确定第二信息标识的查询结果数据;服务器向用户设备发送第二信息标识的查询结果数据。这样,服务器将部分查询结果数据和用于标识部分或全部查询结果数据的第一信息共同发送至用户设备,服务器无需缓存查询结果数据,降低了服务器的缓存压力和成本,并且用户设备可以根据第一信息通过服务器获取全部查询结果数据。Embodiments of the present application provide a data query method: the user equipment sends a query request to the server. The query request includes the user's query information, and the query request can be used to obtain query results corresponding to the query information. The server determines the first returned data and the first information according to the query request. The first returned data is a subset of query results, and the query results include multiple query result data; the first information is used to identify part or all of the multiple query result data. The user equipment receives the first return data and the first information sent by the server. Further, in response to the user's further loading operation, the user equipment may send a loading request to the server, where the loading request carries the second information. Wherein, the second information is a subset of the first information. The server determines the query result data of the second information identifier according to the loading request; the server sends the query result data of the second information identifier to the user device. In this way, the server jointly sends part of the query result data and the first information used to identify part or all of the query result data to the user device. The server does not need to cache the query result data, which reduces the cache pressure and cost of the server, and the user device can use the first information to identify the query result data. One message obtains all query result data through the server.
可以理解的是,本申请对第一返回数据、服务器等命名不限定,比如第一返回数据还可以替换描述为第一返回数据集合以及其他名称,服务器还可以替换描述为APP服务器以及其他名称,下面第一返回数据集合、APP服务器为例对本申请所述方法进行描述。下面结合说明书附图对本申请实施例提供的数据查询方案进行描述。It can be understood that this application does not limit the naming of the first return data, server, etc. For example, the first return data can also be described as the first return data set and other names, and the server can also be described as the APP server and other names. The method described in this application is described below as an example of the first returned data set and APP server. The data query solution provided by the embodiment of the present application will be described below with reference to the accompanying drawings of the description.
参照图8,为本申请实施例提供的一种数据查询系统架构示意图,如图8所示,该系统包括:用户设备和APP服务器。用户设备与APP服务器之间可以建立通信连接。Referring to Figure 8, a schematic diagram of the architecture of a data query system provided by an embodiment of the present application is shown. As shown in Figure 8, the system includes: a user device and an APP server. A communication connection can be established between the user device and the APP server.
其中,用户设备中安装有至少一个可提供指定功能的APP客户端(或者简称为APP),或者用户设备可以上安装/部署有访问该指定功能的APP的入口(比如入口小卡片等)。可选的,该APP可以是具有数据查询功能的消费类APP或其他类型APP。APP服务器与用户设备中的APP对应,APP服务器可以指为用户设备中APP提供服务的服务器,可以为用户设备中的APP提供云侧服务的入口服务,该入口服务包括但不限于对APP的访问进行认证、鉴权、预处理、路由和编排等服务。Among them, the user device is installed with at least one APP client (or APP for short) that can provide specified functions, or the user device can be installed/deployed with an entrance to the APP that accesses the specified functions (such as an entrance card, etc.). Optionally, the APP can be a consumer APP or other types of APP with data query function. The APP server corresponds to the APP in the user device. The APP server can refer to the server that provides services for the APP in the user device. It can provide the entrance service of cloud-side services for the APP in the user device. The entrance service includes but is not limited to access to the APP. Perform authentication, authentication, preprocessing, routing and orchestration services.
可选的,如图8所示,在本申请实施例中,数据查询系统中还部署有用户画像服务实例,检索服务实例和元数据查询服务实例。用户画像服务实例,检索服务实例和元数据查询服务实例为提供某种指定功能的程序化服务。可选的,用户画像服务实例,检索服务实例和元数据查询服务实例可以部署在云端虚拟机。用户画像服务实例,检索服务实例和元数据查询服务实例还可以部署在物理服务器中或容器中。可选的,用户画像服务实例,检索服务实例和元数据查询服务实例可以与APP服务器部署在一起,也可以与其他服务器部署在一起,还可以分别独立的部署。Optionally, as shown in Figure 8, in this embodiment of the present application, a user portrait service instance, a retrieval service instance and a metadata query service instance are also deployed in the data query system. User portrait service instances, retrieval service instances and metadata query service instances are programmatic services that provide certain specified functions. Optionally, user portrait service instances, retrieval service instances and metadata query service instances can be deployed in cloud virtual machines. User portrait service instances, retrieval service instances and metadata query service instances can also be deployed in physical servers or containers. Optionally, user portrait service instances, retrieval service instances and metadata query service instances can be deployed together with the APP server, together with other servers, or independently.
本申请实施例对用户画像服务实例,检索服务实例和元数据查询服务实例的名称不做限定,例如替换成具备相同或相似功能的名称。以下将用户画像服务实例,检索服务实例和元数据查询服务实例分别简称为用户画像服务,检索服务和元数据查询服务。The embodiments of this application do not limit the names of user portrait service instances, retrieval service instances and metadata query service instances. For example, they can be replaced with names that have the same or similar functions. In the following, the user profiling service instance, retrieval service instance and metadata query service instance are referred to as user profiling service, retrieval service and metadata query service respectively.
其中,用户画像服务可以提供查询用户画像(用户特征、喜好等)数据的服务,例如,通过用户设备标识符或者用户账号获取用户画像数据。检索服务可以根据用户画像、位置信息等查询条件进行检索,得到满足查询条件的结果数据对应的唯一标识符。元数据查询服务可以根据检索服务提供的唯一标识符查询得到唯一标识符对应的结果数据。Among them, the user portrait service can provide services for querying user portrait (user characteristics, preferences, etc.) data, for example, obtaining user portrait data through user device identifiers or user accounts. The retrieval service can search based on query conditions such as user portraits and location information, and obtain unique identifiers corresponding to result data that meet the query conditions. The metadata query service can query based on the unique identifier provided by the retrieval service to obtain the result data corresponding to the unique identifier.
以图8所示的系统框架为例,本申请实施例提供的数据查询方法的原理为:用户设备向APP服务器发送查询请求,查询请求中包括位置信息,设备属性和用户属性。APP服务器接收查询请求,根据查询请求(例如:设备属性和用户属性中的至少一个)通过用户画像服务查询用户画像数据。APP服务器根据用户画像数据和查询请求(例如:位置信息和设备属性)通过检索服务得到查询结果集合,查询结果集合中包括每一个查询结果数据对应的唯一标识符。APP服务器根据查询结果集合中的一部分唯一标识符通过元数据查询服务获得对应的查询结果数据。APP服务器将上述一部分查询结果数据的完整数据和查询结果集合中剩余的唯一标识符共同组成返回结果集合。APP服务器将返回结果集合发送至用户设备。用户设备如果要获取剩余查询结果数据的完整 数据,可以将唯一标识符发送至APP服务器。APP服务器根据唯一标识符通过元数据查询服务获得对应的查询结果数据,并发送至用户设备。这样,APP服务器将部分查询结果数据和剩余查询结果数据的唯一标识符共同发送至用户设备,APP服务器无需缓存查询结果数据,降低了APP服务器的缓存压力和成本,并且用户设备可以通过APP服务器获取全部查询结果数据。Taking the system framework shown in Figure 8 as an example, the principle of the data query method provided by the embodiment of this application is: the user device sends a query request to the APP server, and the query request includes location information, device attributes and user attributes. The APP server receives the query request and queries the user portrait data through the user portrait service according to the query request (for example, at least one of device attributes and user attributes). The APP server obtains a query result set through the retrieval service based on the user portrait data and query request (such as location information and device attributes). The query result set includes a unique identifier corresponding to each query result data. The APP server obtains the corresponding query result data through the metadata query service based on a part of the unique identifier in the query result set. The APP server combines the complete data of the above part of the query result data and the remaining unique identifiers in the query result set to form a returned result set. The APP server sends the returned result set to the user device. If the user device wants to obtain the complete remaining query result data Data, a unique identifier can be sent to the APP server. The APP server obtains the corresponding query result data through the metadata query service based on the unique identifier, and sends it to the user device. In this way, the APP server sends the unique identifier of part of the query result data and the remaining query result data to the user device. The APP server does not need to cache the query result data, which reduces the caching pressure and cost of the APP server, and the user device can obtain it through the APP server. All query result data.
其中,安装有APP的用户设备可以包括但不限于智能手机、上网本、平板电脑、智能手表、智能手环、电话手表、智能相机、掌上电脑、个人计算机(personal computer,PC)、个人数字助理(personal digital assistant,PDA)、便携式多媒体播放器(portable multimedia player,PMP)、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、电视机、投影设备或人机交互场景中的体感游戏机等。或者,该用户设备还可以是其他类型或结构的电子设备,本申请不限定。Among them, user devices with APP installed can include but are not limited to smartphones, netbooks, tablets, smart watches, smart bracelets, phone watches, smart cameras, handheld computers, personal computers (PC), personal digital assistants ( personal digital assistant (PDA), portable multimedia player (PMP), augmented reality (AR)/virtual reality (VR) equipment, television, projection equipment or human-computer interaction scenarios Somatosensory game consoles, etc. Alternatively, the user equipment may also be electronic equipment of other types or structures, which is not limited by this application.
图9示出了电子设备100的硬件结构示意图。示例性的,图9所示的电子设备100可以是本申请实施例中的用户设备或者APP服务器。FIG. 9 shows a schematic diagram of the hardware structure of the electronic device 100. For example, the electronic device 100 shown in FIG. 9 may be a user device or an APP server in the embodiment of the present application.
如图9所示,电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。As shown in Figure 9, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, and a battery 142 , Antenna 1, Antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193 , display screen 194, and subscriber identification module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figures, or some components may be combined, some components may be separated, or some components may be arranged differently. The components illustrated may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) wait. Among them, different processing units can be independent devices or integrated in one or more processors.
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 100 . The controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, processor 110 may include one or more interfaces. Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous receiver and transmitter (universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and /or universal serial bus (USB) interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that complies with the USB standard specification, and may be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through them. This interface can also be used to connect other electronic devices, such as AR devices, etc.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。 It can be understood that the interface connection relationships between the modules illustrated in the embodiment of the present invention are only schematic illustrations and do not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be reused as a diversity antenna for a wireless LAN. In other embodiments, antennas may be used in conjunction with tuning switches.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide solutions for wireless communication including 2G/3G/4G/5G applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be disposed in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。A modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (bluetooth, BT), and global navigation satellites. System (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
在本申请实施例中,当电子设备100为前述实施例中的用户设备时,用户设备可以通过天线1,天线2,移动通信模块150,无线通信模块160等向APP服务器发送查询请求。用户设备还可以通过天线1,天线2,移动通信模块150,无线通信模块160等接收APP服务器发送的查询结果数据。In the embodiment of this application, when the electronic device 100 is the user equipment in the previous embodiment, the user equipment can send a query request to the APP server through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, etc. The user equipment can also receive the query result data sent by the APP server through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, etc.
在本申请实施例中,当电子设备100为前述实施例中的APP服务器时,APP服务器可以通过天线1,天线2,移动通信模块150,无线通信模块160等接收用户设备发送的查询请求。APP服务器还可以通过天线1,天线2,移动通信模块150,无线通信模块160等向用户设备发送查询结果数据。In the embodiment of the present application, when the electronic device 100 is the APP server in the previous embodiment, the APP server can receive the query request sent by the user equipment through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, etc. The APP server can also send query result data to the user equipment through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, etc.
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi) -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
在本申请实施例中,当电子设备100为前述实施例中的用户设备时,用户设备可以通过GPS、GLONASS、BDS、QZSS、SBAS等进行定位,获取用户设备的位置信息。In the embodiment of the present application, when the electronic device 100 is the user equipment in the previous embodiment, the user equipment can perform positioning through GPS, GLONASS, BDS, QZSS, SBAS, etc., and obtain the location information of the user equipment.
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。 The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is an image processing microprocessor and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, etc. Display 194 includes a display panel. The display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode). emitting diode (AMOLED), flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
在本申请实施例中,当电子设备100为前述实施例中的用户设备时,用户设备的显示屏194可以显示APP服务器发送的查询结果数据,以便于用户浏览查询结果数据。In this embodiment of the present application, when the electronic device 100 is the user equipment in the previous embodiment, the display screen 194 of the user equipment can display the query result data sent by the APP server to facilitate the user to browse the query result data.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 can implement the shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera sensor through the lens, the optical signal is converted into an electrical signal, and the camera sensor passes the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object passes through the lens to produce an optical image that is projected onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to convert it into a digital image signal. ISP outputs digital image signals to DSP for processing. DSP converts digital image signals into standard RGB, YUV and other format image signals. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. Such as saving music, videos, etc. files in external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。Internal memory 121 may be used to store computer executable program code, which includes instructions. The processor 110 executes instructions stored in the internal memory 121 to execute various functional applications and data processing of the electronic device 100 . The internal memory 121 may include a program storage area and a data storage area. Among them, the stored program area can store an operating system, at least one application program required for a function (such as a sound playback function, an image playback function, etc.). The storage data area may store data created during use of the electronic device 100 (such as audio data, phone book, etc.). In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
在本申请实施例中,当电子设备100是前述实施例中的用户设备时,可以将APP服务器发送的查询结果数据保存在内部存储器121。或者,保存在通过外部存储器接口120链接的外部存储卡中。In the embodiment of the present application, when the electronic device 100 is the user device in the previous embodiment, the query result data sent by the APP server can be saved in the internal memory 121 . Alternatively, saved in an external memory card linked through the external memory interface 120 .
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. This embodiment of the present invention takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 .
图10为本申请实施例示出的电子设备的软件结构框图;Figure 10 is a software structure block diagram of an electronic device according to an embodiment of the present application;
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, and each layer has clear roles and division of labor. The layers communicate through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: application layer, application framework layer, Android runtime and system libraries, and kernel layer.
应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.
如图10所示,应用程序包可以包括消费推荐类应用、生活类应用、购物类应用或功能类应用等。具体的,例如,相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in Figure 10, the application package may include consumption recommendation applications, life applications, shopping applications or functional applications, etc. Specifically, for example, camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图10所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in Figure 10, the application framework layer can include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定 屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, and lock screen, take screenshots, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make this data accessible to applications. Said data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls that display text, controls that display pictures, etc. A view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide communication functions of the electronic device 100 . For example, call status management (including connected, hung up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources to applications, such as localized strings, icons, pictures, layout files, video files, etc.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager allows applications to display notification information in the status bar, which can be used to convey notification-type messages and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be notifications that appear in the status bar at the top of the system in the form of charts or scroll bar text, such as notifications for applications running in the background, or notifications that appear on the screen in the form of conversation windows. For example, text information is prompted in the status bar, a beep sounds, the electronic device vibrates, the indicator light flashes, etc.
Android Runtime包括核心库和虚拟机。Android Runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for the scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library contains two parts: one is the functional functions that need to be called by the Java language, and the other is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and application framework layer run in virtual machines. The virtual machine executes the java files of the application layer and application framework layer into binary files. The virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection and other functions.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)、查询模块等。System libraries can include multiple functional modules. For example: surface manager (surface manager), media libraries (Media Libraries), 3D graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), query module, etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, composition, and layer processing.
2D图形引擎是2D绘图的绘图引擎。2D Graphics Engine is a drawing engine for 2D drawing.
查询模块可以用户向服务器发送查询请求,并接收服务器发送查询结果数据。The query module allows users to send query requests to the server and receive query result data sent by the server.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动等,本申请实施例对此不做任何限制。The kernel layer is the layer between hardware and software. The kernel layer at least includes a display driver, a camera driver, an audio driver, a sensor driver, etc. This embodiment of the present application does not impose any restrictions on this.
以下结合上述图8所示的数据查询系统架构,对本申请实施例提供的数据查询方法进行说明。其中下述用户设备和APP服务器可以具体参照图9所示的部件以及图10所示的应用程序框架层。图11为本申请实施例示出的一种数据查询方法的流程示意图,如图11所示,该方法可以包括如下步骤S201-S212。The data query method provided by the embodiment of the present application will be described below in conjunction with the data query system architecture shown in Figure 8 above. The following user equipment and APP server may specifically refer to the components shown in Figure 9 and the application framework layer shown in Figure 10. Figure 11 is a schematic flowchart of a data query method according to an embodiment of the present application. As shown in Figure 11, the method may include the following steps S201-S212.
S201、用户向用户设备发起查询操作。S201. The user initiates a query operation to the user device.
在本申请实施例中,用户设备可以通过APP向用户设备发起查询操作。一种示例中,该APP可以安装在用户设备上,并以APP图标的形式展示给用户。用户可以通过点击该APP图标,打开该APP,并可通过该APP发起查询操作。In this embodiment of the present application, the user equipment can initiate a query operation to the user equipment through the APP. In one example, the APP can be installed on the user's device and displayed to the user in the form of an APP icon. Users can open the APP by clicking on the APP icon, and can initiate query operations through the APP.
示例性的,如图12所示,用户可以在用户设备上点击APP图标,以打开该APP。用户通过输入用户名(或者称为该APP的用户ID)和密码,成功登录该APP。用户通过APP的查询框输入查询信息,例如,查询附近的餐厅。此后点击查询按钮,以发起查询操作。For example, as shown in Figure 12, the user can click the APP icon on the user device to open the APP. The user successfully logs in to the APP by entering the username (or user ID of the APP) and password. Users enter query information through the query box of the APP, for example, to query nearby restaurants. Then click the query button to initiate the query operation.
又一种示例中,该APP可以为服务化程序,该服务化程序例如为原子化服务,可以理解的是,原子化服务可以为无需显式安装,由系统程序框架后台安装后即可使用的服务,例如可以为特性能力(feature ability,FA)。应理解,原子化服务可以由一个或多个鸿蒙能力的部署包(harmonyos ability package,HAP)组成,一个HAP对应一个入口能力(mainAbility)。能力(ability)是应用所具备能力的抽象。每个ability均可独立运行,可完成一个特定功能。一个或多个功能可完成一个特定的便捷服务。 In another example, the APP can be a service-oriented program, and the service-oriented program is, for example, an atomized service. It is understandable that the atomized service can be used without explicit installation and can be used after being installed by the system program framework in the background. The service may be, for example, a feature ability (FA). It should be understood that the atomization service can be composed of one or more deployment packages (harmonyos ability package, HAP) of Harmony capabilities, and one HAP corresponds to one entry capability (mainAbility). Ability is an abstraction of the capabilities an application has. Each ability can run independently and complete a specific function. One or more functions can complete a specific convenience service.
例如,如图13所示,提供了一种APP的入口小卡片,通过该入口小卡片可以访问对应的APP(该APP可以为普通的APP也可以为服务)。入口小卡片可以通过定时任务自动发起查询附近美食的查询操作,也可以通过用户点击该入口小卡片发起查询附近美食的查询操作,进入查询结果显示界面,浏览查询结果,即附近的美食信息。For example, as shown in Figure 13, an APP entrance card is provided, through which the corresponding APP can be accessed (the APP can be an ordinary APP or a service). The entrance card can automatically initiate a query operation for nearby food through a scheduled task, or the user can click the entrance card to initiate a query operation for nearby food, enter the query result display interface, and browse the query results, that is, nearby food information.
可选的,该查询操作还可以包括手动输入查询信息,例如输入查询附近的餐厅、电影院或者酒店等。示例性的,用户可以在用户设备上点击入口小卡片的输入框,手动输入“查询附近美食”,点击查询以发起查询附近美食的查询操作。Optionally, the query operation may also include manually inputting query information, such as inputting to query nearby restaurants, movie theaters, or hotels. For example, the user can click on the input box of the entrance card on the user device, manually enter "query nearby food", and click Query to initiate a query operation for nearby food.
S202、用户设备响应于用户发起的查询操作,向APP服务器发送第一查询请求。S202. In response to the query operation initiated by the user, the user device sends a first query request to the APP server.
在本申请实施例中,第一查询请求可以用于请求APP服务器进行数据查询,得到满足第一查询请求的查询结果数据。例如,在一些应用场景中,第一查询请求用于请求APP服务器查询用户附近的餐厅、酒店、景点、电影院或者商品优惠信息等。In this embodiment of the present application, the first query request can be used to request the APP server to perform data query to obtain query result data that satisfies the first query request. For example, in some application scenarios, the first query request is used to request the APP server to query restaurants, hotels, attractions, movie theaters, or product discount information near the user.
在一种示例中,第一查询请求可以包括用户的标识信息(例如,APP的用户ID),以及查询信息(或者查询信息中的查询关键字)。例如,查询信息为查询的餐厅(或者查询关键字:餐厅)。In one example, the first query request may include the user's identification information (for example, the user ID of the APP), and the query information (or the query keyword in the query information). For example, the query information is the queried restaurant (or query keyword: restaurant).
在又一种示例中,第一查询请求不仅可以包括查询信息或者查询关键字,还可以包括多个查询条件。例如第一查询请求中还可以包括用户设备的位置信息、用户设备的设备属性、用户属性等查询条件中的一种或者多种。这样,可以使APP服务器基于用户设备的位置信息根据查询条件得到用户的个性化的查询结果数据,使查询结果数据更接近用户期望得到查询结果,以提高用户的使用体验。In yet another example, the first query request may not only include query information or query keywords, but may also include multiple query conditions. For example, the first query request may also include one or more query conditions such as location information of the user equipment, device attributes of the user equipment, and user attributes. In this way, the APP server can obtain the user's personalized query result data based on the query conditions based on the location information of the user device, so that the query result data is closer to the user's desired query result, thereby improving the user's experience.
示例性的,以第一查询请求中包括用户设备的位置信息、用户设备的设备属性、用户属性为例。其中,用户设备的位置信息可以用于指示用户设备当前所处位置,用户设备的位置信息可以包括如下信息中的至少一种:经纬度信息、街道信息、所处地理区域信息(如XX市XX区)、所归属的商圈信息等。用户设备的位置信息可用于APP服务器以该位置信息为原点,按照由近及远的顺序获取查询结果数据。As an example, the first query request includes location information of the user equipment, device attributes of the user equipment, and user attributes. Among them, the location information of the user equipment can be used to indicate the current location of the user equipment. The location information of the user equipment can include at least one of the following information: longitude and latitude information, street information, geographical area information (such as XX City, XX District). ), the business district information to which it belongs, etc. The location information of the user device can be used by the APP server to obtain the query result data in order from near to far using the location information as the origin.
示例的,用户设备可以为图9中的电子设备,用户设备可以通过天线1或者天线2与无线通信模块160实现全球导航卫星技术,通过全球导航卫星技术可以对用户设备进行定位,以获取用户设备的位置信息。例如,用户设备可以通过GPS、GLONASS、BDS、QZSS、SBAS等实现对用户设备的定位,获取用户设备的位置信息(例如经纬度信息等)。For example, the user equipment can be the electronic equipment in Figure 9. The user equipment can implement global navigation satellite technology through antenna 1 or antenna 2 and the wireless communication module 160. The user equipment can be positioned through the global navigation satellite technology to obtain the user equipment. location information. For example, the user equipment can locate the user equipment through GPS, GLONASS, BDS, QZSS, SBAS, etc., and obtain the location information of the user equipment (such as latitude and longitude information, etc.).
用户设备的设备属性可以用于表征用户设备的属性信息,设备属性包括如下信息中的至少一种:用户设备标识符、系统版本号、APP客户端版本号、用户设备的型号、用户设备的类型、用户设备配置信息以及用户设备带屏信息等。用户设备标识符可以用于识别该用户设备,例如国际移动设备识别码(international mobile equipment identity,IMEI)、国际移动用户识别码(international mobile subscriber identity,IMSI)等。系统版本号为用户设备操作系统的版本号,例如鸿蒙操作系统Harmony OS 2.0、Harmony OS 3.0等。APP客户端版本号为用户设备中APP的版本号。用户设备的型号,例如华为P50Pro、华为Mate 40Pro、华为P40Pro+等。用户设备的类型,例如智能手机、平板电脑、智能手表、智能手环等。用户设备配置信息包括用户设备的配置参数,例如包括用户设备首页可展示的数据量,以及APP服务器首次需返回的用于展示的数据量等。用户设备带屏信息为该用户设备是否带有显示界面。The device attributes of the user equipment can be used to characterize the attribute information of the user equipment. The device attributes include at least one of the following information: user equipment identifier, system version number, APP client version number, user equipment model, and user equipment type. , user equipment configuration information and user equipment screen information, etc. The user equipment identifier can be used to identify the user equipment, such as International Mobile Equipment Identity (IMEI), International Mobile Subscriber Identity (IMSI), etc. The system version number is the version number of the user's device operating system, such as Harmony OS 2.0, Harmony OS 3.0, etc. The APP client version number is the version number of the APP in the user device. The model of the user device, such as Huawei P50Pro, Huawei Mate 40Pro, Huawei P40Pro+, etc. The type of user device, such as smartphone, tablet, smart watch, smart bracelet, etc. The user device configuration information includes the configuration parameters of the user device, for example, the amount of data that can be displayed on the home page of the user device, and the amount of data that the APP server needs to return for the first time for display, etc. The user equipment screen information indicates whether the user equipment has a display interface.
用户属性用于表征用户的身份信息,用户属性包括:用户设备的用户身份标识号码(identity document,ID),APP的用户ID等。APP的用户ID例如可以是APP的用户登录名称、用户的手机号等。User attributes are used to characterize the user's identity information. User attributes include: user identification number (identity document, ID) of the user device, user ID of the APP, etc. The user ID of the APP may be, for example, the user login name of the APP, the user's mobile phone number, etc.
S203、APP服务器根据第一查询请求获取用户的用户画像数据。S203. The APP server obtains the user portrait data of the user according to the first query request.
可选的,用户的用户画像数据可以用于表示用户及使用场景的特征。例如,用户的用户画像数据包括如下信息中的至少一种:用户的性别、用户的年龄、用户的喜好、用户的地区、查询时间、查询场景。其中,用户的喜好例如包括:喜欢快餐、喜欢中餐等。用户的地区包括:东北地区、川渝地区、粤港澳地区等。查询时间例如包括:早上、中午和晚上等。查询场景例如包括:查询优惠券、查询餐厅菜品等。 Optionally, the user's user profile data can be used to represent the characteristics of the user and usage scenarios. For example, the user's user profile data includes at least one of the following information: the user's gender, the user's age, the user's preferences, the user's region, the query time, and the query scenario. Among them, the user's preferences include, for example: liking fast food, liking Chinese food, etc. User regions include: Northeastern region, Sichuan and Chongqing regions, Guangdong, Hong Kong and Macao regions, etc. Query times include, for example: morning, noon, and evening. Query scenarios include, for example: querying coupons, querying restaurant dishes, etc.
在一些实施例中,数据查询系统中部署有用户画像服务,通过该用户画像服务可以获取用户的用户画像数据。关于用户画像服务可以参照上文关于数据查询系统部分的描述,在此不做赘述。In some embodiments, a user profile service is deployed in the data query system, and the user profile data of the user can be obtained through the user profile service. Regarding the user profiling service, please refer to the description of the data query system above and will not go into details here.
APP服务器可以通过用户画像服务获取用户的用户画像数据。以第一查询请求包括设备属性和用户属性,设备属性中包括用户设备标识符,用户属性中包括APP的用户ID为例。APP服务器可以根据用户设备标识符和/或APP的用户ID通过用户画像服务在用户画像数据库中获取用户的用户画像数据。The APP server can obtain the user's user portrait data through the user portrait service. For example, the first query request includes device attributes and user attributes, the device attributes include the user device identifier, and the user attributes include the user ID of the APP. The APP server can obtain the user's user portrait data in the user portrait database through the user portrait service based on the user's device identifier and/or the APP's user ID.
可选的,用户画像数据库中可以包括用户设备标识符以及与用户设备标识符一一对应的用户画像数据。APP服务器将用户设备标识符发送至用户画像服务,用户画像服务接收用户设备标识符,用户画像服务根据用户设备标识符即可在用户画像数据库中查询与该用户设备标识符对应的用户画像数据。Optionally, the user portrait database may include user equipment identifiers and user portrait data corresponding to the user equipment identifiers. The APP server sends the user device identifier to the user portrait service, and the user portrait service receives the user device identifier. The user portrait service can query the user profile database for user portrait data corresponding to the user device identifier based on the user device identifier.
可选的,用户画像数据库中可以包括APP的用户ID以及与APP的用户ID一一对应的用户画像数据。APP服务器将APP的用户ID发送至用户画像服务,用户画像服务接收APP的用户ID,用户画像服务根据APP的用户ID即可在用户画像数据库中查询与该APP的用户ID对应的用户画像数据。Optionally, the user portrait database may include the user ID of the APP and user portrait data corresponding to the user ID of the APP. The APP server sends the user ID of the APP to the user portrait service. The user portrait service receives the user ID of the APP. The user portrait service can query the user portrait data corresponding to the user ID of the APP in the user portrait database based on the user ID of the APP.
可选的,用户画像数据库中可以包括用户设备标识符和APP的用户ID以及与用户设备标识符和APP的用户ID对应的用户画像数据。APP服务器将用户设备标识符和/或APP的用户ID发送至用户画像服务,用户画像服务接收用户设备标识符和/或APP的用户ID,用户画像服务根据用户设备标识符和/或APP的用户ID可以在用户画像数据库中查询与该用户设备标识符和/或APP的用户ID对应的用户画像数据。Optionally, the user portrait database may include the user device identifier and the user ID of the APP, as well as user portrait data corresponding to the user device identifier and the user ID of the APP. The APP server sends the user device identifier and/or the user ID of the APP to the user portrait service. The user portrait service receives the user device identifier and/or the user ID of the APP. The user portrait service uses the user device identifier and/or the user ID of the APP. The ID can query the user portrait database for user portrait data corresponding to the user's device identifier and/or the user ID of the APP.
在一些实施例中,用户画像数据库可以根据设备属性、用户属性以及用户的历史使用记录构建生成。例如,某20岁男性用户经常使用其用户ID登录版本号5.0的消费推荐类APP,该APP安装在鸿蒙操作系统Harmony OS 3.0的智能手机上,该用户经常在中午12点,搜索南京市雨花台区快餐店的优惠券信息。则在用户画像数据库中,该用户的用户ID对应的用户画像数据包括:{用户的性别:男,用户的年龄:年轻人(18-24岁)20岁,用户的地区:南京市雨花台区,查询时间:中午(11:00-13:00),查询场景:快餐店优惠券,用户设备类型:智能手机,用户设备系统版本:Harmony OS 3.0,APP客户端版本:5.0}。In some embodiments, the user portrait database can be constructed and generated based on device attributes, user attributes, and the user's historical usage records. For example, a 20-year-old male user often uses his user ID to log in to a consumer recommendation APP with version number 5.0. The APP is installed on a smartphone running Harmony OS 3.0. The user often searches for Yuhuatai District, Nanjing City at 12 noon. Coupon information for fast food restaurants. In the user portrait database, the user portrait data corresponding to the user's user ID includes: {user's gender: male, user's age: young people (18-24 years old) 20 years old, user's region: Yuhuatai District, Nanjing City, Query time: noon (11:00-13:00), query scenario: fast food restaurant coupons, user device type: smartphone, user device system version: Harmony OS 3.0, APP client version: 5.0}.
在一些实施例中,在执行S203之前,APP服务器还可以对第一查询请求进行认证、鉴权、预处理、路由和编排等。例如,如果用户向用户设备上的APP发起查询操作时,没有输入用户名(或者称为该APP的用户ID)和密码登录该APP,则APP服务器可以对第一查询请求中的APP的用户ID进行认证和鉴权,确认用户的身份以及该用户是否有访问APP服务器的权限。APP服务器还可以对第一查询请求进行预处理,解析得到第一查询请求中包含的信息。例如可以解析得到:查询信息、用户设备的位置信息、用户设备的设备属性和用户属性等。APP服务器根据具体请求内容将查询处理流程路由至指定服务(例如用户画像服务、检索服务、元数据查询服务)所部署的服务器。APP服务器还可以根据查询对整个查询处理流程的顺序进行编排。这样,APP服务器可以根据第一查询请求按照查询处理流程进行查询,防止查询处理流程出现错误。In some embodiments, before executing S203, the APP server may also perform authentication, authentication, preprocessing, routing, and orchestration on the first query request. For example, if the user does not enter a user name (or user ID of the APP) and password to log in to the APP when initiating a query operation to the APP on the user device, the APP server can query the user ID of the APP in the first query request. Perform authentication and authentication to confirm the user's identity and whether the user has the authority to access the APP server. The APP server can also preprocess the first query request and parse it to obtain the information contained in the first query request. For example, it can be parsed to obtain: query information, location information of the user device, device attributes and user attributes of the user device, etc. The APP server routes the query processing process to the server deployed by the designated service (such as user portrait service, retrieval service, metadata query service) according to the specific request content. The APP server can also arrange the sequence of the entire query processing process according to the query. In this way, the APP server can query according to the query processing flow according to the first query request to prevent errors in the query processing flow.
S204、APP服务器根据用户的用户画像数据和第一查询请求获取查询结果标识符集合。S204. The APP server obtains a query result identifier set according to the user's user portrait data and the first query request.
在本申请实施例中,APP服务器可以根据S203中得到的用户画像数据,结合第一查询请求中的设备属性和位置信息获取查询结果标识符集合。查询结果标识符集合包括每一个查询结果数据对应的唯一标识符,该唯一标识符与查询结果数据具有一一对应的映射关系,根据一个唯一标识符可以确定唯一一个查询结果数据。该唯一标识符可以是查询结果数据的唯一ID,或者查询结果数据关联的属性信息等。In this embodiment of the present application, the APP server can obtain a set of query result identifiers based on the user portrait data obtained in S203, combined with the device attributes and location information in the first query request. The query result identifier set includes a unique identifier corresponding to each query result data. The unique identifier has a one-to-one mapping relationship with the query result data. A unique query result data can be determined based on a unique identifier. The unique identifier may be the unique ID of the query result data, or the attribute information associated with the query result data, etc.
其中,查询结果标识符集合中的唯一标识符可以根据预设排序规则进行排序。例如,预设排序规则可以是根据位置信息由近到远的顺序进行排序。具体的,例如,每个查询结果数据中都包括有位置信息,根据每个查询结果数据中的位置信息,计算其距离用户位置的距离,按照由近到远的顺序,对每个查询结构数据对应的唯一标识符进行排序。Among them, the unique identifiers in the query result identifier set can be sorted according to the preset sorting rules. For example, the preset sorting rule may be to sort the location information from near to far. Specifically, for example, each query result data includes location information. Based on the location information in each query result data, the distance from the user's location is calculated. In order from nearest to far, each query structure data is Sort by corresponding unique identifier.
在一些实施例中,数据查询系统中部署有检索服务,通过该检索服务可以获取查询结果标识 符集合。关于检索服务可以参照上文关于数据查询系统部分的描述,在此不做赘述。In some embodiments, a retrieval service is deployed in the data query system, through which the query result identifier can be obtained symbol collection. Regarding the retrieval service, please refer to the above description of the data query system, and will not be described in detail here.
如图11所示,APP服务器可以根据用户画像数据、设备属性和位置信息通过检索服务获取查询结果标识符集合。具体的,APP服务器将用户画像数据、设备属性和位置信息发送至检索服务,检索服务根据用户画像数据、设备属性和位置信息,在检索数据库中检索得到结果标识符集合,并将结果标识符集合返回至APP服务器。As shown in Figure 11, the APP server can obtain the query result identifier set through the retrieval service based on user portrait data, device attributes and location information. Specifically, the APP server sends the user portrait data, device attributes and location information to the retrieval service. The retrieval service retrieves the result identifier set in the retrieval database based on the user portrait data, device attributes and location information, and collects the result identifier set. Return to the APP server.
其中,检索数据库中包括APP对应的展示界面上的所有显示资源(商家信息)的相关信息,商家例如包括:餐厅、酒店、电影院等,商家信息包括但不限于:商家的唯一标识符、以及商家的标签等。商家的标签是指对商家信息的概要性描述,例如,商家类型的标签:快餐店,商家是否有优惠券活动的标签:是,等等。检索服务可以在检索数据库中,基于商家的标签,筛选得到满足用户画像数据和第一查询请求的商家的信息。商家的标签可以在构建检索数据库时,由用户根据商家信息进行添加。商家的标签还可以在检索数据库使用过程中,由用户进行更新或添加。Among them, the retrieval database includes information related to all display resources (business information) on the display interface corresponding to the APP. Businesses include, for example: restaurants, hotels, movie theaters, etc. Business information includes but is not limited to: the unique identifier of the business, and the business information. labels etc. The merchant's label refers to a summary description of the merchant's information, for example, a label for the merchant's type: fast food restaurant, a label for whether the merchant has coupon activities: yes, etc. The retrieval service can filter the merchant's information in the retrieval database based on the merchant's tag to obtain the merchant's information that satisfies the user's portrait data and the first query request. The merchant's tag can be added by the user based on the merchant's information when building the retrieval database. The merchant's tag can also be updated or added by the user during the use of the retrieval database.
可选的,商家的信息中还包括;商家的位置信息。商家的位置信息可以用于对查询结果标识符集合中的唯一标识符根据其与用户设备的距离进行排序。Optionally, the merchant's information also includes the merchant's location information. The merchant's location information can be used to rank the unique identifiers in the set of query result identifiers according to their distance from the user's device.
下面,以第一查询请求为:用户附近的餐厅信息,用户画像数据为:{用户的性别:男,查询时间:中午,查询场景:餐厅优惠券,年龄:年轻人,美食偏好:麻辣火锅},设备属性为:Below, the first query request is: restaurant information near the user, and the user portrait data is: {user's gender: male, query time: noon, query scenario: restaurant coupons, age: young people, food preference: spicy hot pot} , the device properties are:
{用户设备类型:智能手机},位置信息为:北纬45°、东经123°,排序规则为距离用户设备由近到远排序为例,示例性说明检索服务在检索数据库中检索得到结果标识符集合的过程。{User device type: smartphone}, the location information is: 45° north latitude, 123° east longitude, and the sorting rule is from nearest to far from the user device. Take this example to illustrate that the retrieval service retrieves the result identifier set in the retrieval database. the process of.
首先,检索服务根据用户的位置信息:北纬45°、东经123°及商家的位置信息,将所有的商家以距离北纬45°、东经123°由近到远的顺序进行排列。然后,检索服务根据上述用户画像数据,设备属性以及商家的信息(如商家的标签)对商家进行筛选。例如,如果商家类型的标签为:麻辣火锅,则保留该商家的信息,否则,去除该商家的信息。又例如,如果商家是否有优惠券活动的标签:是,则根据用户画像数据,提高该商家的优先级,即在距离用户位置相近(例如距离小于100m)位置相同的情况下,该商家的排序高于没有优惠券活动的商家,以优先展示该商家的信息。最后,检索服务得到满足用户画像数据、设备属性和位置信息等查询条件,并以距离用户设备由近到远进行排序的商家信息,提取商家信息中每一个商家的唯一标识符,将所有的唯一标识符组成标识符集合,即得到查询结果标识符集合。First, the retrieval service arranges all businesses in order from nearest to farthest from 45° north latitude and 123° east longitude based on the user's location information: 45° north latitude, 123° east longitude and the location information of the merchants. Then, the retrieval service filters merchants based on the above user portrait data, device attributes and merchant information (such as merchant tags). For example, if the label of the merchant type is: spicy hot pot, the merchant's information will be retained; otherwise, the merchant's information will be removed. For another example, if the merchant has a label for coupon activities: Yes, the merchant's priority will be increased based on the user portrait data, that is, if the merchant is close to the user's location (for example, the distance is less than 100m) and the location is the same, the merchant's ranking will be Higher than merchants without coupon activities to give priority to display the merchant's information. Finally, the retrieval service obtains merchant information that satisfies query conditions such as user portrait data, device attributes, and location information, and is sorted from nearest to far from the user device, extracts the unique identifier of each merchant in the merchant information, and combines all unique The identifiers form an identifier set, that is, the query result identifier set is obtained.
S205、APP服务器根据查询结果标识符集合,获取第一返回数据和第一信息。S205. The APP server obtains the first returned data and the first information according to the query result identifier set.
在本申请实施例中,APP服务器根据查询结果标识符集合,获取第一返回数据和第一信息可以包括:APP服务器根据查询结果标识符集合确定查询得到的查询结果数据,根据预设的返回方式/显示方式(例如:以分页方式)确定采用批次返回方式向用户设备返回查询结果数据。基于批次返回方式,APP服务器获取待向用户设备返回的一部分批次的查询结果数据,以及用于指示剩余批次查询结果数据唯一标识符的第一信息。以使得用户设备响应用户的进一步加载操作,根据第一信息向APP服务器获取剩余批次的查询结果数据。In this embodiment of the present application, the APP server obtains the first return data and the first information according to the query result identifier set, which may include: the APP server determines the query result data obtained from the query according to the query result identifier set, and according to the preset return method /Display mode (for example: paging mode) determines the batch return mode to return query result data to the user device. Based on the batch return method, the APP server obtains a part of the batch of query result data to be returned to the user device, and the first information used to indicate the unique identifier of the remaining batch of query result data. So that the user device responds to the user's further loading operation and obtains the remaining batches of query result data from the APP server according to the first information.
在本申请实施例中,分批次返回的查询结果数据可以包括:首次(第一次)返回的查询结果数据和非首次返回的查询结果数据,比如首次(第一次)返回的查询结果数据可以称为第一返回数据集合。第一返回数据集合中包括APP服务器首次返回用户设备的查询结果数据。可选的,APP服务器可以根据查询结果标识符集合确定第一标识符集合,该第一标识符集合包括:首次返回的查询结果数据对应的唯一标识符。第一标识符集合可用于获取唯一标识符对应的查询结果数据,并返回给用户设备以直接展示。第一信息可以用于指示第二返回数据集合,即非首次返回的查询结果数据。例如,第一信息可以包括所有非首次返回的查询结果数据的唯一标识符。In this embodiment of the present application, the query result data returned in batches may include: query result data returned for the first time (first time) and query result data returned for a non-first time, such as query result data returned for the first time (first time). Can be called the first returned data set. The first returned data set includes query result data returned by the APP server to the user device for the first time. Optionally, the APP server may determine a first identifier set based on the query result identifier set, where the first identifier set includes: a unique identifier corresponding to the query result data returned for the first time. The first identifier set can be used to obtain query result data corresponding to the unique identifier, and return it to the user device for direct display. The first information may be used to indicate the second returned data set, that is, the query result data that is not returned for the first time. For example, the first information may include unique identifiers of all query result data returned other than for the first time.
在一些实施例中,APP服务器可以根据设备属性确定第一标识符集合。具体的,以用户设备以分页展示的形式展示查询结果数据为例,APP服务器可以根据用户设备的显示界面一次(一页或者首页)可以展示的数据量(如数据条数)确定第一标识符集合。第一标识符集合可以包括用户设备首页的数据量或者前几页的数据量,以增加用户可浏览的数据量。例如,用户设备的首页可以展示10条数据,则第一标识符集合可以包括查询结果标识符集合中的前10条唯一标识符,或者前10的整数倍条数的唯一标识符。 In some embodiments, the APP server may determine the first set of identifiers based on device attributes. Specifically, taking the user device to display query result data in the form of paged display as an example, the APP server can determine the first identifier based on the amount of data (such as the number of data items) that can be displayed on the display interface of the user device at one time (one page or home page) gather. The first set of identifiers may include the amount of data on the homepage of the user device or the amount of data on previous pages to increase the amount of data that the user can browse. For example, the homepage of the user device can display 10 pieces of data, and the first identifier set can include the first 10 unique identifiers in the query result identifier set, or the unique identifiers of the first 10 integer multiples.
可选的,在一些实施例中,在用户设备向APP服务器发送第一查询请求时,其中设备属性中包括用户设备配置信息,该用户设备配置信息例如包括:该用户设备首页可展示的数据量,或者APP服务器首次需返回的用于展示的数据量,当然也可以既包括该用户设备首页可展示的数据量,也包括APP服务器首次需返回的用于展示的数据量。APP服务器可基于设备属性中的用户设备配置信息确定首次返回的唯一标识符的数量,组成第一标识符集合。Optionally, in some embodiments, when the user device sends the first query request to the APP server, the device attributes include user device configuration information. The user device configuration information includes, for example: the amount of data that can be displayed on the homepage of the user device. , or the amount of data that the APP server needs to return for the first time for display. Of course, it can also include both the amount of data that can be displayed on the homepage of the user's device, and the amount of data that the APP server needs to return for the first time for display. The APP server may determine the number of unique identifiers returned for the first time based on the user device configuration information in the device properties, and form a first set of identifiers.
可选的,在一些实施例中,在用户设备向APP服务器发送第一查询请求时,其中设备属性中可以包括用户设备的类型、APP客户端版本号等属性信息。APP服务器可以根据用户设备的类型、APP客户端版本号确定该用户设备首页可展示的数据量,然后基于该用户设备首页可展示的数据量确定第一标识符集合。例如,如果设备类型为:智能手机,APP客户端版本号为:2.0版本,2.0版本的APP在智能手机中首页可展示5条数据,则APP服务器确定第一标识符集合可以包括查询结果标识符集合中的前5条唯一标识符,或者前5的整数倍条数的唯一标识符。又例如,如果设备类型为:平板电脑,APP客户端版本号为:2.0版本,2.0版本的APP在平板电脑中首页可展示20条数据,则APP服务器确定第一标识符集合可以包括查询结果标识符集合中的前20条唯一标识符,或者前20的整数倍条数的唯一标识符。Optionally, in some embodiments, when the user device sends the first query request to the APP server, the device attributes may include attribute information such as the type of user device and the version number of the APP client. The APP server may determine the amount of data that can be displayed on the home page of the user device based on the type of the user device and the version number of the APP client, and then determine the first set of identifiers based on the amount of data that can be displayed on the home page of the user device. For example, if the device type is a smartphone and the APP client version number is version 2.0, and the APP version 2.0 can display 5 pieces of data on the homepage of the smartphone, the APP server determines that the first set of identifiers can include the query result identifier. The first 5 unique identifiers in the collection, or the unique identifiers of the first 5 integer multiples. For another example, if the device type is: tablet computer, the APP client version number is: version 2.0, and the homepage of version 2.0 APP can display 20 pieces of data on the tablet computer, then the APP server determines that the first identifier set can include the query result identifier The first 20 unique identifiers in the symbol set, or the number of unique identifiers that are an integer multiple of the first 20.
可选的,在一些实施例中,在用户设备向APP服务器发送第一查询请求时,其中携带的设备属性中可以包括用户设备的缓存能力信息,APP服务器可以获取其与用户设备之间的网络状态。APP服务器根据用户设备的缓存能力信息、查询结果数据的数据量大小及网络状态等情况,确定第一标识符集合中包括唯一标识符的数量。示例性的,第一标识符集合中包括唯一标识符的数量的多少与用户设备的缓存能力的高低、网络状态的好坏呈正相关关系,用户设备的缓存能力越高,网络状态越好,第一标识符集合中包括唯一标识符的数量可以越多。第一标识符集合中包括唯一标识符的数量的多少与查询结果数据的数据量大小呈负相关关系,查询结果数据的数据量越大,第一标识符集合中包括唯一标识符的数量可以越少。可理解的是,APP服务器可以根据用户设备的缓存能力信息、查询结果数据的数据量大小及网络状态等情况中的一项或者多项确定第一标识符集合中包括唯一标识符的数量。本申请对第一标识符集合中包括唯一标识符的数量不做具体限定。Optionally, in some embodiments, when the user device sends the first query request to the APP server, the device attributes carried therein may include caching capability information of the user device, and the APP server may obtain the network connection between it and the user device. state. The APP server determines the number of unique identifiers included in the first identifier set based on the caching capability information of the user device, the data volume of the query result data, the network status, and other conditions. Exemplarily, the number of unique identifiers included in the first set of identifiers is positively correlated with the cache capability of the user equipment and the quality of the network status. The higher the cache capacity of the user equipment, the better the network status. The number of unique identifiers included in an identifier set can be larger. The number of unique identifiers included in the first identifier set is negatively correlated with the data volume of the query result data. The larger the data volume of the query result data, the greater the number of unique identifiers included in the first identifier set. few. It is understandable that the APP server may determine the number of unique identifiers included in the first identifier set based on one or more of the caching capability information of the user device, the size of the query result data, and the network status. This application does not specifically limit the number of unique identifiers included in the first identifier set.
在一些实施例中,数据查询系统中部署有元数据查询服务,通过该元数据查询服务可以根据中的唯一标识符确定对应的查询结果数据。关于元数据查询服务可以参照上文关于数据查询系统部分的描述,在此不做赘述。In some embodiments, a metadata query service is deployed in the data query system, and the corresponding query result data can be determined according to the unique identifier in the metadata query service. Regarding the metadata query service, please refer to the description of the data query system above, and will not be described in detail here.
如图11所示,APP服务器可以根据第一标识符集合通过元数据查询服务获取第一返回数据集合。具体的,APP服务器将第一标识符集合发送至元数据查询服务,元数据查询服务根据第一标识符集合中的每一个唯一标识符,在元数据库中检索得到每一个唯一标识符对应的查询结果数据,组成第一返回数据集合,并发送至APP服务器。As shown in Figure 11, the APP server can obtain the first return data set through the metadata query service according to the first identifier set. Specifically, the APP server sends the first set of identifiers to the metadata query service, and the metadata query service retrieves the query corresponding to each unique identifier in the metadata database based on each unique identifier in the first set of identifiers. The result data forms the first return data set and is sent to the APP server.
其中,元数据库中包括查询结果数据的唯一标识符以及对应的查询结果数据。根据查询结果数据的唯一标识符可以确定唯一一个查询结果数据。以查询结果数据是餐厅信息为例,唯一标识符可以为餐厅的编号,根据餐厅的编号可以确定餐厅的信息,例如可以包括:餐厅的位置、人均消费、营业时间、联系电话、菜品、评价以及优惠信息等。Among them, the metadata database includes the unique identifier of the query result data and the corresponding query result data. The unique query result data can be determined based on the unique identifier of the query result data. Taking the query result data as restaurant information as an example, the unique identifier can be the restaurant number. The restaurant information can be determined based on the restaurant number. For example, it can include: restaurant location, per capita consumption, business hours, contact number, dishes, reviews, and Discount information, etc.
可选的,在一些实施例中,上述检索服务使用的检索数据库可以为具有标签的元数据库,即可以通过对元数据库中的数据添加标签,得到检索数据库。Optionally, in some embodiments, the retrieval database used by the above retrieval service can be a metadata database with tags, that is, the retrieval database can be obtained by adding tags to the data in the metadata database.
在一些实施例中,第一信息可以用于指示第二返回数据集合。例如,第一信息可以包括第二标识符集合,第二标识符集合基于查询结果标识符集合确定,例如:第二标识符集合可以包括:查询结果标识符集合中除去第一标识符集合后其余所有的唯一标识符,或者第二标识符集合与查询结果标识符集合相同,或者第二标识符集合中所包含的唯一标识符是查询结果标识符集合所包含的唯一标识符的子集。第二标识符集合可用于APP服务器直接返回给用户设备,以便于用户设备后续根据第二标识符集合获取其他查询结果数据。In some embodiments, the first information may be used to indicate a second set of returned data. For example, the first information may include a second set of identifiers, and the second set of identifiers is determined based on a set of query result identifiers. For example, the second set of identifiers may include: the remainder of the set of query result identifiers after excluding the first set of identifiers. All unique identifiers, or the second set of identifiers is the same as the set of query result identifiers, or the unique identifiers included in the second set of identifiers are a subset of the unique identifiers included in the set of query result identifiers. The second identifier set can be used by the APP server to directly return to the user device, so that the user device can subsequently obtain other query result data based on the second identifier set.
在一些实施例中,第一信息可以包括会话标识符,该会话标识符与第二标识符集合之间存在映射关系。在第二标识符集合的数据量较大的情况下,APP服务器可以创建一个会话标识符,以用于标识第二标识符集合。具体的,会话标识符与第二标识符集合具有映射关系,根据一个会话 标识符可以确定唯一一个第二标识符集合。APP服务器可以将会话标识符以及与其具有映射关系的第二标识符集合进行缓存,例如,缓存在检索服务中。APP服务器将该会话标识符发送至用户设备,用户设备可以根据会话标识符向APP服务器请求查询结果数据。这样,可以降低APP服务器向用户设备的发送的数据量,以降低APP服务器的传输压力。In some embodiments, the first information may include a session identifier, and there is a mapping relationship between the session identifier and the second set of identifiers. When the amount of data in the second set of identifiers is large, the APP server may create a session identifier to identify the second set of identifiers. Specifically, the session identifier has a mapping relationship with the second set of identifiers. According to a session The identifier may uniquely identify a second set of identifiers. The APP server may cache the session identifier and the second identifier set having a mapping relationship with the session identifier, for example, in a retrieval service. The APP server sends the session identifier to the user device, and the user device can request query result data from the APP server based on the session identifier. In this way, the amount of data sent by the APP server to the user device can be reduced, thereby reducing the transmission pressure on the APP server.
S206、APP服务器向用户设备发送第一返回数据集合和第一信息。S206. The APP server sends the first return data set and the first information to the user device.
在本申请实施例中,如图14所示,APP服务器根据用户设备发送的第一查询请求进行数据查询后,向用户设备首次返回第一返回数据集合和第一信息。以用户设备以分页展示的形式展示查询结果数据为例,第一返回数据集合中包括一部分(首页或前几页)查询结果数据,以用于用户设备直接通过用户设备的显示界面展示。第一信息用于指示其余部分的查询结果数据的唯一标识符,例如第一信息包括第二标识符集合,或者包括与第二标识符集合有映射关系的会话标识符。用户设备根据第一信息可以向APP服务器查询其余的查询结果数据。这样,APP服务器无需对第一返回数据集合和第一信息进行缓存,用户设备也可以通过APP服务器获取全部查询结果数据。In this embodiment of the present application, as shown in Figure 14, after performing data query according to the first query request sent by the user device, the APP server returns the first return data set and the first information to the user device for the first time. Taking the user device displaying query result data in the form of paged display as an example, the first returned data set includes a part (home page or previous pages) of query result data for display by the user device directly through the display interface of the user device. The first information is used to indicate the unique identifier of the remaining part of the query result data. For example, the first information includes a second set of identifiers, or includes a session identifier that has a mapping relationship with the second set of identifiers. The user equipment can query the APP server for remaining query result data based on the first information. In this way, the APP server does not need to cache the first returned data set and the first information, and the user device can also obtain all query result data through the APP server.
S207、用户设备接收第一返回数据集合和第一信息,展示第一返回数据集合,并保存第一信息。S207. The user equipment receives the first return data set and the first information, displays the first return data set, and saves the first information.
在本申请实施例中,如图14所示,用户设备接收到第一返回数据集合和第一信息后,用户设备可以通过显示界面展示第一返回数据集合中的查询结果数据。如果第一返回数据集合中包括多页查询结果数据,则用户还可以通过下滑用户设备的显示界面,即随着用户对显示界面的拖拽操作,显示界面自下而上滚动,使用户设备加载显示下一页的查询结果数据。同时,用户设备的存储器将接收到的第一信息进行保存,以用于根据第一信息向APP服务器查询其余的查询结果数据。In this embodiment of the present application, as shown in Figure 14, after the user equipment receives the first returned data set and the first information, the user equipment can display the query result data in the first returned data set through the display interface. If the first returned data set includes multi-page query result data, the user can also slide down the display interface of the user device, that is, as the user drags and drops the display interface, the display interface scrolls from bottom to top, causing the user device to load Display query result data for the next page. At the same time, the memory of the user equipment saves the received first information for querying the APP server for remaining query result data based on the first information.
S208、用户向用户设备上的APP发起加载操作。S208. The user initiates a loading operation to the APP on the user device.
在本申请实施例中,当用户已浏览第一返回数据集合中全部的查询结果数据,需要浏览其他查询结果数据时,可以向用户设备上的APP发起加载操作。例如,以用户设备为智能手机为例,图15为本申请实施例示出的用户设备发送第二查询请求的示意图,如图15所示,用户可以通过滑动智能手机的显示屏幕浏览第一返回数据集合中的查询结果数据,当第一返回数据集合中最后一个结果数据被展示后,如果用户期望浏览更多的查询结果数据,则可以通过下滑用户设备的显示界面,即随着用户对显示界面的拖拽操作,显示界面自下而上滚动。示例性的,如图15所示,可以在电子设备的显示界面显示“加载更多…”的提示,即在APP发起了加载操作。In this embodiment of the present application, when the user has browsed all the query result data in the first returned data set and needs to browse other query result data, the user can initiate a loading operation to the APP on the user device. For example, taking the user equipment as a smartphone as an example, Figure 15 is a schematic diagram of the user equipment sending a second query request according to an embodiment of the present application. As shown in Figure 15, the user can browse the first returned data by sliding the display screen of the smartphone. Query result data in the set, after the last result data in the first returned data set is displayed, if the user wants to browse more query result data, he can slide down the display interface of the user device, that is, as the user navigates the display interface The drag operation causes the display interface to scroll from bottom to top. For example, as shown in Figure 15, the prompt "Load more..." can be displayed on the display interface of the electronic device, that is, the loading operation is initiated in the APP.
S209、用户设备响应于用户发起的加载操作,用户设备向APP服务器发送第二查询请求。S209. In response to the loading operation initiated by the user, the user equipment sends a second query request to the APP server.
在本申请实施例中,第二查询请求中可以包括第二信息。In this embodiment of the present application, the second query request may include second information.
在一种示例中,第二信息用于表示第三返回数据集合,第三数据集合为第二返回数据集合中的部分或者全部。例如,第二信息可以包括第三标识符集合。其中,第三标识符集合为第二标识符集合的子集合。In one example, the second information is used to represent a third return data set, and the third data set is part or all of the second return data set. For example, the second information may include a third set of identifiers. Wherein, the third set of identifiers is a subset of the second set of identifiers.
示例性的,以第一信息包括第二标识符集合,第二信息中包括第三标识符集合为例。第三标识符集合包括待获取的查询结果数据对应的唯一标识符,即为第二标识符集合中的部分唯一标识符。APP服务器根据第三标识符集合中的唯一标识符可以获取对应的查询结果数据,并返回给用户设备。For example, it is assumed that the first information includes the second set of identifiers, and the second information includes the third set of identifiers. The third set of identifiers includes unique identifiers corresponding to the query result data to be obtained, which are part of the unique identifiers in the second set of identifiers. The APP server can obtain the corresponding query result data according to the unique identifier in the third identifier set, and return it to the user device.
以用户设备以分页展示的形式展示查询结果数据为例,第三标识符集合中可以包括下一页或者下几页的查询结果数据对应的唯一标识符。第三标识符集合中包括唯一标识符的数量可以参照上述S205中第一标识符集合的唯一标识符数量的确定方法,在此不做赘述。第三标识符集合也可以包含第二标识符集合中的所有的唯一标识符,本申请实施例不作限制。Taking the user device displaying the query result data in a paged display as an example, the third set of identifiers may include unique identifiers corresponding to the query result data of the next page or several pages. The number of unique identifiers included in the third identifier set may refer to the method for determining the number of unique identifiers in the first identifier set in S205 above, which will not be described again here. The third identifier set may also include all unique identifiers in the second identifier set, which is not limited in this embodiment of the application.
又一种示例中,第二信息可以包括会话标识符。APP服务器可以根据会话标识符确定对应的第二标识符集合,以进一步根据第二标识符集合获取对应的查询结果数据,并返回给用户设备。In yet another example, the second information may include a session identifier. The APP server can determine the corresponding second identifier set according to the session identifier, to further obtain the corresponding query result data according to the second identifier set, and return it to the user device.
S210、APP服务器根据第二查询请求得到第三返回数据集合。S210. The APP server obtains the third returned data set according to the second query request.
在本申请实施例中,第三返回数据集合包括第二信息对应的查询结果数据。以第二信息包括第三标识符集合为例。APP服务器根据接收到的第三标识符集合,获取第三标识符集合中每个唯 一标识符对应的查询结果数据,组成第三返回数据集合。In this embodiment of the present application, the third returned data set includes query result data corresponding to the second information. Take, for example, that the second information includes the third set of identifiers. The APP server obtains each unique identifier in the third identifier set based on the received third identifier set. The query result data corresponding to an identifier constitutes the third returned data set.
在一些实施例中,如图11所示,APP服务器可以通过元数据查询服务获取第三返回数据集合。具体的,APP服务器将第三标识符集合发送至元数据查询服务,元数据查询服务根据第三标识符集合中的每一个唯一标识符,在元数据库中检索得到每一个唯一标识符对应的查询结果数据,组成第三返回数据集合,并发送至APP服务器。In some embodiments, as shown in Figure 11, the APP server can obtain the third returned data set through the metadata query service. Specifically, the APP server sends the third set of identifiers to the metadata query service. The metadata query service retrieves the query corresponding to each unique identifier in the metadata database based on each unique identifier in the third set of identifiers. The result data forms a third return data set and is sent to the APP server.
S211、APP服务器向用户设备发送第三返回数据集合。S211. The APP server sends the third return data set to the user device.
在本申请实施例中,图16为本申请实施例示出的APP服务器发送第三返回数据集合示意图,如图16所示,APP服务器将S210中得到的第三返回数据集合发送至用户设备,以向用户设备反馈第三标识符集合中每个唯一标识符对应的查询结果数据,使用户设备获取其他查询结果数据(即第三返回数据集合)。In the embodiment of the present application, Figure 16 is a schematic diagram of the APP server sending the third return data set according to the embodiment of the present application. As shown in Figure 16, the APP server sends the third return data set obtained in S210 to the user device to Query result data corresponding to each unique identifier in the third identifier set is fed back to the user equipment, so that the user equipment obtains other query result data (ie, the third returned data set).
S212、用户设备接收并展示第三返回数据集合。S212. The user equipment receives and displays the third returned data set.
在本申请实施例中,如图16所示,用户设备可以通过显示界面展示第三返回数据集合中的查询结果数据,以便于用户进行浏览。In this embodiment of the present application, as shown in Figure 16, the user equipment can display the query result data in the third returned data set through the display interface to facilitate user browsing.
在一些实施例中,上述S208及其后续步骤为可选步骤,如果用户设备不再需要获取其他查询结果数据(例如,用户已根据展示的查询结果数据做出选择,无需再浏览其他查询结果数据),或者全部查询结果数据都已经获取完毕,则不执行S208及其后续步骤。如果用户设备需要获取其他查询结果数据,则执行S208及后续步骤。In some embodiments, the above-mentioned S208 and subsequent steps are optional steps. If the user device no longer needs to obtain other query result data (for example, the user has made a selection based on the displayed query result data, there is no need to browse other query result data. ), or all query result data has been obtained, S208 and subsequent steps will not be executed. If the user device needs to obtain other query result data, S208 and subsequent steps are performed.
在一些实施例中,为了提高用户浏览查询结果数据的流畅性。在S208,用户向用户设备上的APP发起加载操作前,获取待加载查询结果数据(比如下一页或者下几页的查询结果数据)之前。用户设备可以提前获取待加载的查询结果数据(比如下一页或下几页的查询结果数据),并将获取到的查询结果数据存储到用户设备的本地(存储器)。后续,响应于用户的加载操作,从本地获取待加载的查询结果数据显示给用户。In some embodiments, in order to improve the user's fluency in browsing query result data. In S208, before the user initiates a loading operation to the APP on the user device and obtains the query result data to be loaded (such as the query result data of the next page or the next few pages). The user device can obtain the query result data to be loaded (such as the query result data of the next page or the next few pages) in advance, and store the obtained query result data in the local (memory) of the user device. Subsequently, in response to the user's loading operation, the query result data to be loaded is obtained locally and displayed to the user.
示例性的,用户设备可以采用异步线程方式提前获取待加载的查询结果数据。比如用户设备内可以设置两个线程(或者工作进程),一个线程用于执行如下加载过程:响应用户的加载操作,获取并显示查询结果数据,该线程可以称为主线程。另一个线程用于执行上述加载过程中获取查询结果数据的过程,该线程可以称为辅助线程或者子线程。这两个线程独立工作(或者称为异步工作),用户设备在主线程获取待加载的查询结果数据之前,可以启动辅助线程向APP服务器提前获取待加载的查询结果数据。For example, the user device can use an asynchronous thread to obtain the query result data to be loaded in advance. For example, two threads (or work processes) can be set up in the user device. One thread is used to perform the following loading process: respond to the user's loading operation, obtain and display the query result data, and this thread can be called the main thread. Another thread is used to perform the process of obtaining query result data during the above loading process. This thread can be called an auxiliary thread or a child thread. These two threads work independently (or work asynchronously). Before the main thread obtains the query result data to be loaded, the user device can start the auxiliary thread to obtain the query result data to be loaded from the APP server in advance.
例如,如果用户设备的显示界面一页可以展示30条查询结果数据,第一返回数据集合中包括90条查询结果数据。则当用户浏览到第61条查询结果数据,即浏览到第3页的时候,用户设备可以启动上述的异步线程方式向APP服务器发送第二查询请求,以获取第4页或者更多页的查询结果数据并保存在用户设备的本地。当用户需要浏览第4页的查询结果数据时,用户设备可以从本地获取并直接展示第4页的查询结果数据。这样,可以提高用户浏览查询结果数据的流畅性,提高用户的使用体验。For example, if the display interface of the user device can display 30 pieces of query result data on one page, the first returned data set includes 90 pieces of query result data. Then when the user browses to the 61st query result data, that is, when he browses to the 3rd page, the user device can start the above-mentioned asynchronous thread method to send a second query request to the APP server to obtain the 4th or more pages of queries. The resulting data is saved locally on the user's device. When the user needs to browse the query result data on page 4, the user device can locally obtain and directly display the query result data on page 4. In this way, the user's fluency in browsing query result data can be improved and the user's experience can be improved.
需要说明的是,用户设备启动异步线程的时间以及通过异步线程获取查询结果数据的数量,可以根据用户浏览的速度、查询结果数据的数据量大小、第一返回数据集合中包括的查询结果数据的数量、用户设备的缓存等性能以及用户设备与APP服务器通信网络的状态等因素综合确定,本申请对此不做限定。It should be noted that the time when the user device starts the asynchronous thread and the amount of query result data obtained through the asynchronous thread can be determined based on the user's browsing speed, the size of the query result data, and the number of query result data included in the first returned data set. The quantity, caching and other performance of the user equipment, and the status of the communication network between the user equipment and the APP server are comprehensively determined, and this application does not limit this.
在一些实施例中,为了降低APP服务器和用户设备的缓存压力。本申请实施例还提供一种数据查询方法,既不在APP服务器做查询结果数据的缓存,也不在用户设备做查询结果数据的缓存。每次用户设备发送查询请求后,APP服务器都是根据查询请求重新进行查询,返回满足查询请求的最新查询结果数据,该最新查询结果数据包括首页或前几页的查询结果数据。图17为本申请实施例示出的另一种数据查询方法的流程示意图,如图17所示,以基于位置信息进行数据查询为例,该方法包括以下步骤S301-S314:In some embodiments, in order to reduce the caching pressure on the APP server and user equipment. Embodiments of the present application also provide a data query method that neither caches the query result data on the APP server nor caches the query result data on the user device. Each time the user device sends a query request, the APP server re-queries according to the query request and returns the latest query result data that satisfies the query request. The latest query result data includes the query result data of the home page or previous pages. Figure 17 is a schematic flow chart of another data query method according to an embodiment of the present application. As shown in Figure 17, taking data query based on location information as an example, the method includes the following steps S301-S314:
S301、用户向用户设备上发起查询操作。S301. The user initiates a query operation on the user device.
S302、用户设备响应于用户发起的查询操作,向APP服务器发送第一查询请求。S302. In response to the query operation initiated by the user, the user device sends a first query request to the APP server.
S303、APP服务器根据第一查询请求获取用户的第一用户画像数据。 S303. The APP server obtains the first user portrait data of the user according to the first query request.
S304、APP服务器根据第一用户画像数据和第一查询请求获取第一查询结果标识符集合。S304. The APP server obtains the first query result identifier set according to the first user portrait data and the first query request.
在本申请实施例中,S301-S304的具体实现方式可以参照上文所述的S201-S204的实现方式,在此不做赘述。In this embodiment of the present application, the specific implementation of S301-S304 may refer to the implementation of S201-S204 described above, and will not be described again here.
S305、APP服务器根据第一查询结果标识符集合,获取第一返回数据集合。S305. The APP server obtains the first returned data set according to the first query result identifier set.
在一些实施例中,APP服务器可以从第一查询结果标识符集合中确定第一标识符集合,第一标识符集合中包括APP服务器首次向用户设备返回完整信息的查询结果数据的唯一标识符。APP服务器根据第一标识符集合可以获取对应的查询结果数据,组成第一返回数据集合。In some embodiments, the APP server may determine the first set of identifiers from the first set of query result identifiers, where the first set of identifiers includes the unique identifier of the query result data for which the APP server returns complete information to the user device for the first time. The APP server can obtain corresponding query result data according to the first identifier set to form a first returned data set.
在一些实施例中,APP服务器可以根据第一查询结果标识符集合,通过元数据查询服务获取第一返回数据集合。其中,APP服务器确定第一标识符集合,以及根据第一标识符集合得到第一返回数据集合实现方式可以参照S205中的方法,在此不做赘述。In some embodiments, the APP server may obtain the first returned data set through the metadata query service according to the first query result identifier set. Wherein, the APP server determines the first set of identifiers and obtains the first set of returned data based on the first set of identifiers. The implementation method may refer to the method in S205, which will not be described again here.
S306、APP服务器向用户设备发送第一返回数据集合。S306. The APP server sends the first return data set to the user device.
在本申请实施例中,APP服务器根据用户设备发送的第一查询请求进行数据查询后,向用户设备首次返回第一返回数据集合。以用户设备以分页展示的形式展示查询结果数据为例,即首次返回一部分(首页或前几页)查询结果数据,以用于用户设备直接通过用户设备的显示界面展示。这样,APP服务器和用户设备均不需要对查询结果数据进行缓存,并且可以降低APP服务器向用户设备返回查询数据的传输压力。In this embodiment of the present application, after performing data query according to the first query request sent by the user device, the APP server returns the first return data set to the user device for the first time. Taking the user device displaying the query result data in the form of paged display as an example, that is, a part of the query result data (the home page or the first few pages) is returned for the first time for display by the user device directly through the display interface of the user device. In this way, neither the APP server nor the user device needs to cache the query result data, and the transmission pressure of the APP server returning query data to the user device can be reduced.
S307、用户设备接收第一返回数据集合,展示第一返回数据集合。S307. The user equipment receives the first return data set and displays the first return data set.
在本申请实施例中,用户设备可以通过用户设备的显示界面展示第一返回数据集合中的查询结果数据。如果第一返回数据集合中包括多页查询结果数据,则用户还可以通过下滑用户设备的显示界面,即随着用户对显示界面的拖拽操作,显示界面自下而上滚动,使用户设备加载显示下一页的查询结果数据。这样,用户设备无需对其他数据进行缓存,降低了用户设备的缓存压力。In this embodiment of the present application, the user equipment can display the query result data in the first returned data set through the display interface of the user equipment. If the first returned data set includes multi-page query result data, the user can also slide down the display interface of the user device, that is, as the user drags and drops the display interface, the display interface scrolls from bottom to top, causing the user device to load Display query result data for the next page. In this way, the user device does not need to cache other data, which reduces the cache pressure on the user device.
S308、用户向用户设备上的APP发起加载操作。S308. The user initiates a loading operation to the APP on the user device.
在本申请实施例中,当用户已浏览第一返回数据集合中全部的查询结果数据,需要浏览其他查询结果数据时,可以向用户设备上的APP发起加载操作。用户向用户设备上的APP发起加载操作的具体实现方式可以参照S208中的方法,在此不做赘述。In this embodiment of the present application, when the user has browsed all the query result data in the first returned data set and needs to browse other query result data, the user can initiate a loading operation to the APP on the user device. The specific implementation method for the user to initiate a loading operation to the APP on the user device may refer to the method in S208, which will not be described in detail here.
S309、用户设备响应于用户发起的加载操作,用户设备向APP服务器发送第二查询请求,第二查询请求中包括查询结果数据偏移量。S309. In response to the loading operation initiated by the user, the user equipment sends a second query request to the APP server, and the second query request includes the query result data offset.
在本申请实施例中,用户设备响应于用户发起的加载操作,可以向APP服务器发送第二查询请求,第二查询请求用于指示APP服务器重新进行数据查询,得到满足第二查询请求的查询结果数据。In this embodiment of the present application, in response to the loading operation initiated by the user, the user device can send a second query request to the APP server. The second query request is used to instruct the APP server to re-perform data query to obtain query results that satisfy the second query request. data.
其中,查询结果数据偏移量用于表征用户已浏览的查询结果数据的数据特征,其中,用户已浏览的查询结果数据即为第一返回数据集合中的查询结果数据。数据特征为查询结果数据中同一参数的偏移量。例如,查询结果数据中位置的偏移量。The query result data offset is used to characterize the data characteristics of the query result data that the user has browsed, where the query result data that the user has browsed is the query result data in the first returned data set. The data feature is the offset of the same parameter in the query result data. For example, the offset of the position in the query result data.
在一些实施例中,在基于用户设备的位置信息进行数据查询的应用场景中,以第一查询请求中包括用户设备的位置信息、用户设备的设备属性、用户属性为例。则第二查询请求中包括用户设备的第二位置信息、用户设备的设备属性、用户属性以及查询结果数据偏移量。其中,查询结果数据偏移量即为用户已浏览的查询结果数据的位置相对于用户设备的第一位置的距离。例如,如果用户最后一个浏览的查询结果数据的位置相对于用户设备的第一位置为3千米(kilometer,Km),则该查询结果数据偏移量为3Km。In some embodiments, in the application scenario of performing data query based on the location information of the user equipment, the first query request includes the location information of the user equipment, the device attributes of the user equipment, and the user attributes as an example. Then the second query request includes the second location information of the user equipment, the device attributes of the user equipment, the user attributes, and the query result data offset. The query result data offset is the distance between the position of the query result data that the user has browsed relative to the first position of the user device. For example, if the location of the user's last browsed query result data is 3 kilometers (kilometer, Km) relative to the first location of the user device, the offset of the query result data is 3Km.
在一些实施例中,第二位置信息可能与第一位置信息相同,也可能不同。示例性的,在一些应用场景中,如果用户在浏览查询结果数据的过程中用户设备的位置没有发生变化,则第二位置信息与第一位置信息相同。如果用户在浏览查询结果数据的过程中用户设备的位置发生了变化,例如,用户拿着用户设备边走边看查询结果数据。在这种情况下,第二位置信息与第一位置信息不相同,第二位置信息应为用户最新的位置信息。因此,在S309,用户设备向APP服务器发送第二查询请求之前,还包括获取用户第二位置信息。这样,在基于用户设备的位置信息进行数据查询的应用场景中,可以提高数据查询结果的准确性。In some embodiments, the second location information may be the same as the first location information, or may be different. For example, in some application scenarios, if the location of the user device does not change while the user is browsing the query result data, the second location information is the same as the first location information. If the location of the user device changes while the user is browsing the query result data, for example, the user is holding the user device and viewing the query result data while walking. In this case, the second location information is different from the first location information, and the second location information should be the latest location information of the user. Therefore, in S309, before the user equipment sends the second query request to the APP server, it also includes obtaining the user's second location information. In this way, in the application scenario of data query based on the location information of the user device, the accuracy of the data query results can be improved.
示例性的,用户在A位置发送第一查询请求,并得到第一返回数据集合,用户一边走一边浏 览第一返回数据集合中的查询结果数据。当用户走到B位置时,已浏览完第一返回数据集合中全部的查询结果数据,其中,最后一条查询结果数据中展示的位置距离用户2Km。此时,用户需要获取其余的查询结果数据,则通过用户设备发送第二查询请求,第二查询请求中至少包括:B位置信息,查询结果数据偏移量为:2Km。APP服务器根据第二查询请求可以查询得到位置距离用户最新位置(B位置)2Km以上的查询结果数据。这样,不仅可以提高数据查询结果的准确性,而且可以保证用户浏览的查询结果数据在位置信息上保持连贯性,提高用户的使用体验。For example, the user sends the first query request at location A and obtains the first returned data set. The user browses while walking. Browse the query result data in the first returned data collection. When the user reaches position B, he has browsed all the query result data in the first returned data set. Among them, the location displayed in the last query result data is 2Km away from the user. At this time, if the user needs to obtain the remaining query result data, the second query request is sent through the user device. The second query request includes at least: B location information, and the query result data offset is: 2Km. According to the second query request, the APP server can query and obtain query result data whose location is more than 2Km away from the user's latest location (location B). In this way, it can not only improve the accuracy of the data query results, but also ensure that the query result data browsed by the user maintains consistency in location information, thereby improving the user experience.
可选的,在基于查询对象(商家)的销量进行数据查询的应用场景中,查询结果数据偏移量即为用户已浏览的查询结果数据的销量。在基于查询对象(商家)的评分进行数据查询的应用场景中,查询结果数据偏移量即为用户已浏览的查询结果数据的评分。Optionally, in the application scenario of data query based on the sales volume of the query object (merchant), the query result data offset is the sales volume of the query result data that the user has browsed. In the application scenario of data query based on the rating of the query object (merchant), the query result data offset is the rating of the query result data that the user has browsed.
在一些实施例中,为了提高用户浏览查询结果数据的流畅性,在S308,用户向用户设备上的APP发起加载操作之前,用户设备可以提前获取待加载的查询结果数据(下一页或下几页的查询结果数据),例如,用户设备可以在后台启动异步线程向APP服务器提前发送第二查询请求以获取待加载的查询结果数据。这样,可以提高用户浏览查询结果数据的流畅性,提高用户的使用体验。In some embodiments, in order to improve the user's fluency in browsing query result data, in S308, before the user initiates a loading operation to the APP on the user device, the user device can obtain the query result data to be loaded (the next page or the next few pages) in advance. Page query result data), for example, the user device can start an asynchronous thread in the background to send a second query request to the APP server in advance to obtain the query result data to be loaded. In this way, the user's fluency in browsing query result data can be improved and the user's experience can be improved.
需要说明的是,用户设备启动异步线程的时间以及通过异步线程获取查询结果数据的数量,可以根据用户浏览的速度、查询结果数据的数据量大小、第一返回数据集合中包括的查询结果数据的数量、用户设备的缓存等性能以及用户设备与APP服务器通信网络的状态等因素综合确定,本申请对此不做限定。It should be noted that the time when the user device starts the asynchronous thread and the amount of query result data obtained through the asynchronous thread can be determined based on the user's browsing speed, the size of the query result data, and the number of query result data included in the first returned data set. The quantity, caching and other performance of the user equipment, and the status of the communication network between the user equipment and the APP server are comprehensively determined, and this application does not limit this.
S310、APP服务器根据第二查询请求获取用户的第二用户画像数据。S310. The APP server obtains the second user portrait data of the user according to the second query request.
S311、APP服务器根据第二用户画像数据和第二查询请求获取第二查询结果标识符集合。S311. The APP server obtains the second query result identifier set according to the second user portrait data and the second query request.
在本申请实施例中,APP服务器根据第二查询请求重新进行查询,得到第二查询结果标识符集合。In this embodiment of the present application, the APP server re-queries according to the second query request and obtains the second query result identifier set.
在一些实施例中,APP服务器可以根据第二查询请求通过用户画像服务获取用户的第二用户画像数据。In some embodiments, the APP server may obtain the user's second user profile data through the user profile service according to the second query request.
在一些实施例中,APP服务器可以根据第二用户画像数据和第二查询请求通过检索服务得到第二查询结果标识符集合。In some embodiments, the APP server may obtain the second query result identifier set through the retrieval service according to the second user portrait data and the second query request.
具体的,以第二查询请求中包括用户设备的第二位置信息、用户设备的设备属性、用户属性以及查询结果数据偏移量为例。APP服务器可以将用户设备的位置信息、用户设备的设备属性、用户属性和查询结果数据偏移量发送至检索服务。检索服务根据上述查询条件在检索数据库中检索得到第二结果标识符集合,并将第二结果标识符集合返回至APP服务器。Specifically, take the second query request including the second location information of the user equipment, the device attributes of the user equipment, the user attributes, and the query result data offset as an example. The APP server can send the location information of the user device, device attributes of the user device, user attributes and query result data offset to the retrieval service. The retrieval service retrieves the second result identifier set in the retrieval database according to the above query conditions, and returns the second result identifier set to the APP server.
具体的,上述S310-S311的具体实现方式可参照S203-S204,在此不做赘述。Specifically, reference may be made to S203-S204 for the specific implementation of the above S310-S311, which will not be described in detail here.
S312、APP服务器根据第二查询结果标识符集合,获取第二返回数据集合。S312. The APP server obtains the second returned data set according to the second query result identifier set.
在一些实施例中,APP服务器可以从第二查询结果标识符集合中确定第二标识符集合,第二标识符集合中包括APP服务器本次向用户设备返回完整信息的查询结果数据的唯一标识符。APP服务器根据第二标识符集合可以获取对应的查询结果数据,组成第二返回数据集合。In some embodiments, the APP server can determine the second set of identifiers from the second set of query result identifiers. The second set of identifiers includes the unique identifier of the query result data for which the APP server returns complete information to the user device this time. . The APP server can obtain corresponding query result data according to the second identifier set to form a second return data set.
在一些实施例中,APP服务器确定第二标识符集合的具体方法可以参照S205中确定第一标识符集合的方法,在此不做赘述。In some embodiments, the specific method for the APP server to determine the second identifier set may refer to the method for determining the first identifier set in S205, which will not be described again.
在一些实施例中,APP服务器可以根据第二查询结果标识符集合,通过元数据查询服务获取第二返回数据集合,APP服务器根据第二标识符集合得到第二返回数据集合实现方式可以参照S205中的方法,在此不做赘述。In some embodiments, the APP server can obtain the second return data set through the metadata query service according to the second query result identifier set. The implementation method of the APP server obtaining the second return data set according to the second identifier set can refer to S205. The method will not be described in detail here.
S313、APP服务器向用户设备发送第二返回数据集合。S313. The APP server sends the second return data set to the user device.
S314、用户设备接收第二返回数据集合,展示第二返回数据集合。S314. The user equipment receives the second return data set and displays the second return data set.
在本申请实施例中,S313-S314的具体实现方式可以参照上文所述的S306-S307的实现方式,在此不做赘述。In this embodiment of the present application, the specific implementation of S313-S314 may refer to the implementation of S306-S307 described above, and will not be described again here.
在一些实施例中,上述S308及后续步骤为可选步骤,如果用户设备不再需要获取其他查询结果数据,或者全部查询结果数据都已经获取完毕,则不执行S308及后续步骤。如果用户设备需要获取其他查询结果数据,则执行S308及后续步骤。 In some embodiments, the above-mentioned S308 and subsequent steps are optional steps. If the user device no longer needs to obtain other query result data, or all query result data has been obtained, S308 and subsequent steps will not be performed. If the user device needs to obtain other query result data, S308 and subsequent steps are performed.
上述主要从各个节点之间交互的角度对本申请实施例提供的方案进行了介绍。可以理解的是,各个节点,例如用户设备、APP服务器等为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The above mainly introduces the solution provided by the embodiment of the present application from the perspective of interaction between various nodes. It can be understood that in order to implement the above functions, each node, such as user equipment, APP server, etc., includes hardware structures and/or software modules corresponding to each function. Those skilled in the art should readily appreciate that the algorithm steps of each example described in conjunction with the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving the hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each specific application, but such implementations should not be considered beyond the scope of this application.
本申请实施例可以根据上述方法示例对用户设备、APP服务器等进行功能模块的分组,例如,可以对应各个功能分组各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的分组是示意性的,仅仅为一种逻辑功能分组,实际实现时可以有另外的分组方式。Embodiments of the present application can group functional modules of user equipment, APP servers, etc. according to the above method examples. For example, each functional module can be grouped corresponding to each function, or two or more functions can be integrated into one processing module. . The above integrated modules can be implemented in the form of hardware or software function modules. It should be noted that the grouping of modules in the embodiment of the present application is schematic and is only a logical function grouping. In actual implementation, there may be other grouping methods.
图18示出了一种电子设备300的结构示意图,该电子设备300可以为APP服务器,或者APP服务器中的芯片,或者片上系统,该电子设备300可以用于执行上述实施例中涉及的第一设备的功能。Figure 18 shows a schematic structural diagram of an electronic device 300. The electronic device 300 may be an APP server, a chip in the APP server, or a system on a chip. The electronic device 300 may be used to perform the first step involved in the above embodiment. Device functionality.
作为一种可实现方式,图18所示的电子设备300包括:接收模块310、处理模块320和发送模块330。其中,接收模块310用于接收用户设备发送的查询请求,处理模块320用于根据查询请求获取查询结果数据,发送模块330用于将查询结果数据发送至接收用户设备。As an implementation manner, the electronic device 300 shown in FIG. 18 includes: a receiving module 310, a processing module 320, and a sending module 330. Among them, the receiving module 310 is used to receive the query request sent by the user equipment, the processing module 320 is used to obtain the query result data according to the query request, and the sending module 330 is used to send the query result data to the receiving user device.
可以理解的是,上述电子设备300还可以包括如图9所示部件,此时,上述电子设备300中的收发动作可以由图9中天线1,天线2,移动通信模块150,无线通信模块160等部件执行,具体处理动作可以由图9中的处理器110执行。It can be understood that the above-mentioned electronic device 300 may also include components as shown in Figure 9. At this time, the transceiver action in the above-mentioned electronic device 300 may be performed by antenna 1, antenna 2, mobile communication module 150, and wireless communication module 160 in Figure 9 and other components are executed, and specific processing actions may be executed by the processor 110 in FIG. 9 .
本申请实施例还提供一种电子设备,该电子设备可以包括一个或者多个处理器、存储器和通信接口。其中,存储器、通信接口与处理器耦合。例如,存储器、通信接口与处理器可以通过总线耦合在一起。An embodiment of the present application also provides an electronic device, which may include one or more processors, memories, and communication interfaces. Among them, the memory, communication interface and processor are coupled. For example, memory, communication interfaces, and processors may be coupled together via a bus.
其中,通信接口用于与其他设备进行数据传输。存储器中存储有计算机程序代码。计算机程序代码包括计算机指令,当计算机指令被处理器执行时,使得电子设备执行本申请实施例中的数据查询方法。Among them, the communication interface is used for data transmission with other devices. Computer program code is stored in the memory. The computer program code includes computer instructions. When the computer instructions are executed by the processor, the electronic device causes the electronic device to execute the data query method in the embodiment of the present application.
可以理解的是,上述电子设备还可以包括如图9所示部件。例如,处理器可以为图9中的处理器110,存储器可以为图9中的内部存储器121或者通过外部存储器接口120连接的外部存储器,通信接口可以为图9中的USB接口。It can be understood that the above-mentioned electronic device may also include components as shown in FIG. 9 . For example, the processor may be the processor 110 in FIG. 9 , the memory may be the internal memory 121 in FIG. 9 or an external memory connected through the external memory interface 120 , and the communication interface may be the USB interface in FIG. 9 .
本申请实施例还提供一种数据查询系统,该系统包括用户设备,APP服务器,用户画像服务,检索服务和元数据查询服务;其中,用户设备用于向APP服务器发送查询请求,APP服务器用于根据查询请求获取查询结果数据,并将查询结果数据发送至接收用户设备。Embodiments of the present application also provide a data query system, which includes a user device, an APP server, a user portrait service, a retrieval service and a metadata query service; wherein the user device is used to send a query request to the APP server, and the APP server is used to Obtain query result data according to the query request, and send the query result data to the receiving user device.
在一些实施例中,查询请求中包括位置信息、设备属性和用户属性,则上述数据加载系统还可以包括:用户画像服务,检索服务和元数据查询服务,其中,用户画像服务用于根据设备属性和/或用户属性确定用户画像数据,检索服务用户根据用户画像数据、位置信息和设备属性检索得到查询结果数据对应的唯一标识符集合,元数据查询服务用语根据唯一标识符集合确定对应的查询结果数据。In some embodiments, the query request includes location information, device attributes and user attributes, then the above-mentioned data loading system may also include: user profiling service, retrieval service and metadata query service, wherein the user profiling service is used to determine the location information according to the device attributes. and/or user attributes determine the user portrait data. The retrieval service user retrieves the unique identifier set corresponding to the query result data based on the user portrait data, location information and device attributes. The metadata query service term determines the corresponding query result based on the unique identifier set. data.
本申请实施例还提供一种计算机可读存储介质,该计算机存储介质中存储有计算机程序代码,当上述处理器执行该计算机程序代码时,电子设备执行上述方法实施例中数据查询方法的相关步骤。Embodiments of the present application also provide a computer-readable storage medium. Computer program code is stored in the computer storage medium. When the above-mentioned processor executes the computer program code, the electronic device executes the relevant steps of the data query method in the above-mentioned method embodiment. .
本申请实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述方法实施例中数据查询方法的相关步骤。Embodiments of the present application also provide a computer program product. When the computer program product is run on a computer, it causes the computer to execute the relevant steps of the data query method in the above method embodiment.
其中,本申请提供的电子设备、数据加载系统、计算机存储介质或者计算机程序产品均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Among them, the electronic devices, data loading systems, computer storage media or computer program products provided by this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the corresponding methods provided above. The beneficial effects of this method will not be repeated here.
通过以上实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁, 仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can clearly understand that for convenience and simplicity of description, Only the division of the above functional modules is used as an example. In practical applications, the above function allocation can be completed by different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all of the above descriptions or Some functions.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be The combination can either be integrated into another device, or some features can be omitted, or not implemented. On the other hand, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated. The components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed to multiple different places. . Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium. Based on this understanding, the essence of the technical solutions of the embodiments of the present application or the part that contributes or all or part of the technical solutions can be embodied in the form of a software product. The software product is stored in a storage medium and includes several Instructions are used to cause a device (which may be a microcontroller, a chip, etc.) or a processor to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage media include: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code.
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。 The above contents are only specific implementation modes of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be covered by the protection scope of the present application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (11)

  1. 一种数据查询方法,其特征在于,应用于用户设备,所述方法包括:A data query method, characterized in that it is applied to user equipment, and the method includes:
    向服务器发送查询请求,所述查询请求包括用户的查询信息,所述查询请求用于获取所述查询信息对应的查询结果;Send a query request to the server, where the query request includes the user's query information, and the query request is used to obtain the query results corresponding to the query information;
    接收所述服务器发送的第一返回数据和第一信息,所述第一返回数据为所述查询结果的子集,所述查询结果包括多条查询结果数据;所述第一信息用于标识所述多条查询结果数据中的部分或全部查询结果数据;Receive first return data and first information sent by the server, where the first return data is a subset of the query results, and the query results include multiple pieces of query result data; the first information is used to identify all Part or all of the query result data among the multiple query result data;
    向所述服务器发送加载请求,所述加载请求携带第二信息,所述第二信息是所述第一信息的子集;Send a loading request to the server, where the loading request carries second information, where the second information is a subset of the first information;
    接收所述服务器发送的所述第二信息标识的查询结果数据。Receive query result data of the second information identifier sent by the server.
  2. 根据权利要求1所述的方法,其特征在于,The method according to claim 1, characterized in that:
    所述第一信息包括标识符集合,所述标识符集合包括所述多条查询结果数据中的部分或全部查询结果数据对应的唯一标识符;The first information includes a set of identifiers, and the set of identifiers includes unique identifiers corresponding to some or all of the plurality of query result data;
    或者,所述第一信息包括会话标识符,所述会话标识符与标识符集合之间存在映射关系;所述标识符集合包括所述多条查询结果数据中的部分或全部查询结果数据对应的唯一标识符。Alternatively, the first information includes a session identifier, and there is a mapping relationship between the session identifier and a set of identifiers; the set of identifiers includes a session identifier corresponding to some or all of the plurality of query result data. Unique identifier.
  3. 根据权利要求1或2所述的方法,其特征在于,所述查询请求还包括以下至少一种信息:所述用户设备的位置信息、所述用户设备的设备属性、用户属性。The method according to claim 1 or 2, characterized in that the query request further includes at least one of the following information: location information of the user equipment, device attributes of the user equipment, and user attributes.
  4. 一种数据查询方法,其特征在于,应用于服务器,所述方法包括:A data query method, characterized in that it is applied to a server, and the method includes:
    接收用户设备发送的查询请求,所述查询请求包括用户的查询信息,所述查询请求用于获取所述查询信息对应的查询结果;Receive a query request sent by the user equipment, where the query request includes the user's query information, and the query request is used to obtain query results corresponding to the query information;
    根据所述查询请求,确定第一返回数据和第一信息,所述第一返回数据为所述查询结果的子集,所述查询结果包括多条查询结果数据;所述第一信息用于标识所述多条查询结果数据中的部分或全部查询结果数据;According to the query request, first returned data and first information are determined. The first returned data is a subset of the query results, and the query results include multiple query result data; the first information is used to identify Some or all of the plurality of query result data;
    向所述用户设备发送所述第一返回数据和所述第一信息;Send the first return data and the first information to the user equipment;
    接收所述用户设备发送的加载请求,所述加载请求携带第二信息,所述第二信息是所述第一信息的子集;Receive a loading request sent by the user equipment, where the loading request carries second information, and the second information is a subset of the first information;
    根据所述加载请求,确定所述第二信息标识的查询结果数据;According to the loading request, determine the query result data of the second information identifier;
    向所述用户设备发送所述第二信息标识的查询结果数据。Send the query result data of the second information identifier to the user equipment.
  5. 根据权利要求4所述的方法,其特征在于,The method according to claim 4, characterized in that:
    所述第一信息包括标识符集合,所述标识符集合包括所述多条查询结果数据中的部分或全部查询结果数据对应的唯一标识符;The first information includes a set of identifiers, and the set of identifiers includes unique identifiers corresponding to some or all of the plurality of query result data;
    或者,所述第一信息包括会话标识符,所述会话标识符与标识符集合之间存在映射关系;所述标识符集合包括所述多条查询结果数据中的部分或全部查询结果数据对应的唯一标识符。Alternatively, the first information includes a session identifier, and there is a mapping relationship between the session identifier and a set of identifiers; the set of identifiers includes a session identifier corresponding to some or all of the plurality of query result data. Unique identifier.
  6. 根据权利要求4或5所述的方法,其特征在于,所述查询请求还包括:所述用户设备的位置信息、所述用户设备的设备属性、用户属性;The method according to claim 4 or 5, characterized in that the query request further includes: location information of the user equipment, device attributes of the user equipment, and user attributes;
    所述根据所述查询请求,确定第一返回数据和第一信息,包括:Determining the first returned data and the first information according to the query request includes:
    根据所述设备属性和/或所述用户属性,确定用户画像数据,所述用户画像数据用于表征所述用户的查询特征;Determine user portrait data according to the device attributes and/or the user attributes, and the user portrait data is used to characterize the query characteristics of the user;
    根据所述用户画像数据、所述位置信息和所述设备属性,确定查询结果标识符集合,所述查询结果标识符集合包括每条查询结果数据对应的唯一标识符;Determine a query result identifier set according to the user portrait data, the location information and the device attributes, where the query result identifier set includes a unique identifier corresponding to each query result data;
    根据所述查询结果标识符集合确定所述第一返回数据和所述第一信息。The first returned data and the first information are determined based on the set of query result identifiers.
  7. 根据权利要求6所述的方法,其特征在于,所述设备属性包括用户设备标识符,所述用户属性包括用户标识符;所述根据所述设备属性和/或所述用户属性,确定用户画像数据包括:The method according to claim 6, wherein the device attributes include a user equipment identifier, and the user attributes include a user identifier; and determining the user portrait according to the device attributes and/or the user attributes. Data includes:
    根据所述用户设备标识符和/或所述用户标识符,通过用户画像数据库,获取所述用户画像数据;所述用户画像数据库包括与所述用户设备标识符和/或所述用户标识符具有映射关系的用户画像数据。According to the user equipment identifier and/or the user identifier, the user portrait data is obtained through a user portrait database; the user portrait database includes information that is related to the user equipment identifier and/or the user identifier. User portrait data of mapping relationship.
  8. 根据权利要求6或7所述的方法,其特征在于,所述根据所述用户画像数据、所述位置信 息和所述设备属性,确定查询结果标识符集合,包括:The method according to claim 6 or 7, characterized in that: based on the user portrait data, the location information information and the device attributes to determine the query result identifier set, including:
    根据所述用户画像数据、所述位置信息和所述设备属性,通过检索数据库,检索得到所述查询结果标识符集合;所述检索数据库包括每条查询结果数据对应的唯一标识符。According to the user portrait data, the location information and the device attributes, the query result identifier set is retrieved through a search database; the search database includes a unique identifier corresponding to each query result data.
  9. 一种电子设备,其特征在于,包括:存储器、一个或多个处理器;所述存储器与所述处理器耦合;其中,所述存储器中存储有计算机程序代码,所述计算机程序代码包括计算机指令,当所述计算机指令被所述处理器执行时,使得所述电子设备执行如权利要求1-3任一项所述的方法,或者,使得所述电子设备执行如权利要求4-8任一项所述的方法。An electronic device, characterized by comprising: a memory and one or more processors; the memory is coupled to the processor; wherein computer program code is stored in the memory, and the computer program code includes computer instructions , when the computer instructions are executed by the processor, the electronic device is caused to perform the method according to any one of claims 1-3, or the electronic device is caused to perform the method according to any one of claims 4-8. method described in the item.
  10. 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1-3任一项所述的方法,或者,使得所述电子设备执行如权利要求4-8任一项所述的方法。A computer-readable storage medium, characterized by comprising computer instructions that, when the computer instructions are run on an electronic device, cause the electronic device to perform the method according to any one of claims 1-3, or, The electronic device is caused to perform the method according to any one of claims 4-8.
  11. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1-3任一项所述的方法,或者,使得所述计算机执行如权利要求4-8任一项所述的方法。 A computer program product, characterized in that, when the computer program product is run on a computer, it causes the computer to execute the method as claimed in any one of claims 1 to 3, or causes the computer to execute the method as claimed in claim 1. The method described in any one of claims 4-8.
PCT/CN2023/115905 2022-09-09 2023-08-30 Data query method, electronic device, and system WO2024051555A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211104733.0A CN117708407A (en) 2022-09-09 2022-09-09 Data query method, electronic equipment and system
CN202211104733.0 2022-09-09

Publications (1)

Publication Number Publication Date
WO2024051555A1 true WO2024051555A1 (en) 2024-03-14

Family

ID=90161223

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/115905 WO2024051555A1 (en) 2022-09-09 2023-08-30 Data query method, electronic device, and system

Country Status (2)

Country Link
CN (1) CN117708407A (en)
WO (1) WO2024051555A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1874254A (en) * 2005-06-02 2006-12-06 华为技术有限公司 Method for browsing data based on structure of client end / server end
US20110119298A1 (en) * 2008-06-20 2011-05-19 Nokia Corporation Method and apparatus for searching information
CN107481052A (en) * 2017-08-14 2017-12-15 福建米客互联网科技有限公司 A kind of transmitting advertisement information method and terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1874254A (en) * 2005-06-02 2006-12-06 华为技术有限公司 Method for browsing data based on structure of client end / server end
US20110119298A1 (en) * 2008-06-20 2011-05-19 Nokia Corporation Method and apparatus for searching information
CN107481052A (en) * 2017-08-14 2017-12-15 福建米客互联网科技有限公司 A kind of transmitting advertisement information method and terminal

Also Published As

Publication number Publication date
CN117708407A (en) 2024-03-15

Similar Documents

Publication Publication Date Title
WO2020238356A1 (en) Interface display method and apparatus, terminal, and storage medium
US9477378B2 (en) Method and apparatus for providing a user interface
US20200285357A1 (en) Icon display method, device, and system
US8645554B2 (en) Method and apparatus for identifying network functions based on user data
WO2020233556A1 (en) Call content processing method and electronic device
CN111221845A (en) Cross-device information searching method and terminal device
WO2020211705A1 (en) Contact person recommendation method and electronic device
WO2022100221A1 (en) Retrieval processing method and apparatus, and storage medium
CN114356258A (en) Electronic device, screen projection method thereof and medium
WO2018227495A1 (en) Electronic device and processing method therefor
US20140297672A1 (en) Content service method and system
WO2022121445A1 (en) Widget adding method, apparatus, and computer-readable storage medium
CN111176766A (en) Communication terminal and component display method
CN112163033B (en) Mobile terminal and travel list display method thereof
WO2024051555A1 (en) Data query method, electronic device, and system
CN113810857B (en) Beacon message processing method and system
WO2023125832A1 (en) Image sharing method and electronic device
WO2023179454A1 (en) Service calling method and electronic device
WO2023165225A9 (en) Suspended ball processing method in multi-tasking scenario, and electronic device
CN116339562B (en) Shortcut input method and electronic device
WO2023160512A1 (en) App promotion method, related device and communication system
WO2024060925A1 (en) Notification message processing system, method and apparatus
WO2024037346A1 (en) Page management method and electronic device
CN116016418B (en) Information interaction method and electronic equipment
WO2024007816A1 (en) Communication method and apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23862250

Country of ref document: EP

Kind code of ref document: A1