Service providing method, device, electronic device and storage medium
By setting an identifier for each service scenario and independently encapsulating the operation link components, the problem of code adaptation of the artificial intelligence system when facing different user needs is solved, and the service provision efficiency and the clarity and reusability of the operation process are improved.
Patent Information
- Application Number
- CN202010846466.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-20
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2040-08-20
AI Technical Summary
Artificial intelligence systems need to undergo a lot of code adaptation when facing the service needs of different users, resulting in low service efficiency.
By setting a service scenario identifier for each service scenario, independently encapsulating the operation links in the operation process as link components, using a graphical interface to orchestrate and generate the operation process, and selecting the appropriate operation process from the pre-established process library through the service scenario identifier, and obtaining the target material data from the material library.
It improves the efficiency of service provision, reduces the need for code adaptation, and enhances the logical clarity of the operation process and the reusability of the algorithm.
Smart Images

Figure CN112000326B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a service providing method, device, electronic device and storage medium. Background Art
[0002] To find the information users need from massive amounts of data and provide services accordingly, AI systems must perform complex calculations tailored to specific service requests. This often requires adapting these calculations to meet the diverse service needs of different users, resulting in extensive code rewrites and significantly reducing service efficiency. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a service providing method, apparatus, electronic device, and storage medium, which can effectively improve service providing efficiency.
[0004] In a first aspect, an embodiment of the present invention provides a service providing method, including:
[0005] Obtain the service scenario identifier corresponding to the service to be provided;
[0006] According to the service scenario identifier, selecting an operation process corresponding to the service scenario identifier from a pre-established process library, wherein the operation process includes at least two operation links, and each operation link is independently encapsulated as a corresponding link component;
[0007] Execute the calculation process to obtain target material data from the material library corresponding to the service scenario identifier;
[0008] The target material data is provided.
[0009] Optionally, the service to be provided includes a recommendation service or a search service;
[0010] The obtaining of a service scenario identifier corresponding to the service to be provided includes:
[0011] Receiving a service request sent by a terminal, wherein the service request carries a service scenario identifier;
[0012] Providing the target material data includes:
[0013] The target material data is sent to the terminal.
[0014] Optionally, the service to be provided includes a push service;
[0015] The obtaining of a service scenario identifier corresponding to the service to be provided includes:
[0016] Determine the target push user corresponding to the push service according to the pre-set user screening rules;
[0017] Obtain the service scenario identifier corresponding to the target push user;
[0018] Providing the target material data includes:
[0019] The target material data is sent to a user terminal corresponding to the target push user.
[0020] Optionally, before selecting, according to the service scenario identifier, a computing process corresponding to the service scenario identifier from a pre-established process library, the method further includes:
[0021] Providing developers with a graphical interface that includes pre-built components.
[0022] According to the arrangement operation of the developer in the graphical interface, the corresponding operation process is generated by arranging the link components, and different operation processes form the process library.
[0023] Optionally, before providing a graphical interface to developers, wherein the graphical interface is provided with a plurality of pre-built link components, the method further includes:
[0024] Build link components based on the developer's component building instructions.
[0025] Optionally, the operation steps include at least one of the following: recall, rough sorting, fine sorting, and re-sorting; and each of the operation steps includes at least one algorithm.
[0026] Optionally, after generating the corresponding operation process by arranging the link components, the method further includes:
[0027] An online or offline adjustment operation is performed on the operation process, and the adjustment operation includes at least one of the following: adding a link component, deleting a link component, adjusting the connection sequence between link components, and adjusting the algorithm inside the link component.
[0028] Optionally, the method further includes: obtaining a user identifier corresponding to the service to be provided;
[0029] The step of selecting, according to the service scenario identifier, a computation process corresponding to the service scenario identifier from a pre-established process library includes:
[0030] According to the service scenario identifier and the user identifier, a calculation process corresponding to the service scenario identifier and the user identifier is selected from a pre-established process library.
[0031] Optionally, the method further includes: obtaining a user identifier corresponding to the service to be provided;
[0032] After executing the calculation process and obtaining target material data from the material library corresponding to the service scenario identifier, and before providing the target material data, the method further includes:
[0033] The marked data corresponding to the user identifier is filtered out from the target material data.
[0034] Optionally, before obtaining the service scenario identifier corresponding to the service to be provided, the method further includes:
[0035] Acquire characteristic fields of the candidate material library, wherein the characteristic fields include preset fields and / or custom fields;
[0036] Constructing the candidate material library according to the characteristic fields;
[0037] The acquiring target material data from the material library corresponding to the service scenario identifier includes:
[0038] According to the service scenario identifier, selecting a target material library corresponding to the service scenario identifier from the candidate material library;
[0039] The target material data is acquired from the target material library.
[0040] Optionally, the characteristic fields for obtaining the candidate material library include:
[0041] Creating a default material library according to a preset template, wherein the preset template is provided with the preset fields;
[0042] Receive a request to add a custom field, and assign the custom field carried in the request to a preset variable;
[0043] The constructing the candidate material library according to the characteristic field includes:
[0044] Passing the custom field to a preset function through the preset variable, wherein the preset function includes the preset variable;
[0045] The custom field is added to the default material library through the preset function to form the alternative material library.
[0046] In a second aspect, an embodiment of the present invention further provides a service providing device, including:
[0047] An identification acquisition unit, used to acquire a service scenario identification corresponding to the service to be provided;
[0048] A selection unit is configured to select, based on the service scenario identifier, an operation process corresponding to the service scenario identifier from a pre-established process library, wherein the operation process includes at least two operation links, and each operation link is independently encapsulated as a corresponding link component;
[0049] An execution unit, configured to execute the operation process and obtain target material data from a material library corresponding to the service scenario identifier;
[0050] A data providing unit is used to provide the target material data.
[0051] Optionally, the service to be provided includes a recommendation service or a search service;
[0052] The identification acquisition unit is specifically configured to receive a service request sent by a terminal, wherein the service request carries a service scenario identification;
[0053] The data providing unit is specifically configured to send the target material data to the terminal.
[0054] Optionally, the service to be provided includes a push service;
[0055] The identification acquisition unit is specifically used to:
[0056] Determine the target push user corresponding to the push service according to the pre-set user screening rules;
[0057] Obtain the service scenario identifier corresponding to the target push user;
[0058] The data providing unit is specifically configured to send the target material data to a user terminal corresponding to the target push user.
[0059] Optionally, the device further includes:
[0060] An interface providing unit, configured to provide a graphical interface to a developer before selecting a computational process corresponding to the service scenario identifier from a pre-established process library based on the service scenario identifier, wherein the graphical interface is provided with a plurality of pre-built link components;
[0061] The arrangement unit is used to generate corresponding operation processes by using the link components according to the arrangement operations of the developer in the graphical interface, and different operation processes form the process library.
[0062] Optionally, the device further includes:
[0063] The component building unit is used to build link components based on the developer's component building instructions before providing a graphical interface to the developer.
[0064] Optionally, the operation steps include at least one of the following: recall, rough sorting, fine sorting, and re-sorting; and each of the operation steps includes at least one algorithm.
[0065] Optionally, the orchestration unit is also used to perform online or offline adjustment operations on the operation process after the corresponding operation process is generated by orchestrating the link components. The adjustment operation includes at least one of the following: adding link components, deleting link components, adjusting the connection order between link components, and adjusting the algorithm within the link components.
[0066] Optionally, the identification acquisition unit is further configured to:
[0067] Obtaining a user identifier corresponding to the service to be provided;
[0068] The selection unit is specifically configured to select, according to the service scenario identifier and the user identifier, an operation process corresponding to the service scenario identifier and the user identifier from a pre-established process library.
[0069] Optionally, the identification acquisition unit is further configured to: acquire a user identification corresponding to the service to be provided;
[0070] The device also includes a filtering unit for filtering out the marked data corresponding to the user identifier from the target material data after executing the operation process and obtaining the target material data from the material library corresponding to the service scenario identifier and before providing the target material data.
[0071] Optionally, the device further includes:
[0072] A field acquisition unit, configured to acquire characteristic fields of the candidate material library before acquiring a service scenario identifier corresponding to the service to be provided, wherein the characteristic fields include preset fields and / or user-defined fields;
[0073] A material library construction unit, configured to construct the candidate material library according to the characteristic fields;
[0074] The execution unit includes:
[0075] A selection module, configured to select a target material library corresponding to the service scenario identifier from the candidate material library according to the service scenario identifier;
[0076] The acquisition module is used to acquire the target material data from the target material library.
[0077] Optionally, the field acquisition unit includes:
[0078] A creation module, configured to create a default material library according to a preset template, wherein the preset template is provided with the preset fields;
[0079] An assignment module, configured to receive a request for adding a custom field and assign the custom field carried in the addition request to a preset variable;
[0080] The material library construction unit includes:
[0081] A transfer module, configured to transfer the custom field to a preset function via the preset variable, wherein the preset function includes the preset variable;
[0082] An adding module is used to add the custom field to the default material library through the preset function to form the alternative material library.
[0083] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising: a housing, a processor, a memory, a circuit board, and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the housing, and the processor and the memory are arranged on the circuit board; a power supply circuit for supplying power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute any one of the service providing methods provided by the embodiments of the present invention.
[0084] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement any service provision method provided by an embodiment of the present invention.
[0085] The service provision method, device, electronic device and storage medium provided by the embodiments of the present invention can obtain the service scenario identifier corresponding to the service to be provided, select the operation process corresponding to the service scenario identifier from a pre-established process library based on the service scenario identifier, execute the operation process, obtain the target material data from the material library corresponding to the service scenario identifier, and provide the target material data. In this way, since each operation link in the operation process corresponding to the service scenario identifier is independently encapsulated as a corresponding link component, the logical structure of the operation process is clearer, and it is also more conducive to the reuse of various algorithms in the same operation process or between different operation processes. If the operation process needs to be adjusted, it is only necessary to arrange and adjust the operation process based on the link component without a large amount of repeated code adaptation, thereby effectively improving the efficiency of service provision. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0087] Figure 1 A flow chart of a service providing method provided by an embodiment of the present invention;
[0088] Figure 2 A schematic structural diagram of a service providing device according to an embodiment of the present invention;
[0089] Figure 3 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0090] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0091] It should be understood that the embodiments described are only a portion of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative work are within the scope of protection of the present invention.
[0092] In a first aspect, an embodiment of the present invention provides a service providing method, which can effectively improve the efficiency of service provision.
[0093] It should be noted that, in the embodiments of the present invention, the services mentioned include but are not limited to recommendation services, push services and search services. With the rapid development of mobile Internet, the amount of information in the network has grown exponentially, and a large number of commodities, information, knowledge, videos, music and other materials are available for users to choose from. Recommendation services / search services / push services can all be based on big data and artificial intelligence technologies to provide users with material content mined from a large amount of material content, so that the provided material content can accurately match the needs of users, or the provided material content can accurately hit the user's points of interest. Specifically, recommendation services are usually based on the user's material needs, and target materials are selected from a large number of alternative materials and recommended to users. Search services are usually based on the user's search target, and search results are selected from a large number of materials related to the search target and returned to the user. Push services refer to proactively providing specific material content to users.
[0094] like Figure 1 As shown, the service providing method provided by the embodiment of the present invention may include:
[0095] S11, obtaining a service scenario identifier corresponding to the service to be provided;
[0096] Services to be provided are services that need to be provided. In embodiments of the present invention, services may include services provided in response to a service request sent by a terminal to a server, such as a user searching for nearby restaurants and the server returning search results for relevant restaurants, or a user requesting recommendations for the latest news related to the World Cup and the server returning relevant news, etc. They may also include services that are proactively sent by the server to the terminal without a user request, such as proactively pushing product advertisements to the user without a user request.
[0097] In order to provide different services for different service scenarios, that is, to execute different operation processes to match the user needs of different service scenarios, in an embodiment of the present invention, the operation process is associated with the service scenario, and a service scenario identifier is set for the service scenario. Specifically, the service scenario can be distinguished according to the customer of the service and the business scenario / functional module of the customer's product, and can be specifically defined according to the data platform involved in the service and the category, label, etc. of this service in the data platform. For example, in one embodiment of the present invention, a service scenario can be recommending products to users on Taobao.com, and in another embodiment of the present invention, a service scenario can be placing advertisements in WeChat, etc. The service scenario can be detailed and specific, and each time such a service is provided, it corresponds to a corresponding service scenario. Different service scenarios can be distinguished by service scenario identifiers. For example, the service scenario identifier of service A is a61, and the service scenario identifier of service B is 57, etc.
[0098] S12, selecting, based on the service scenario identifier, a computation process corresponding to the service scenario identifier from a pre-established process library, wherein the computation process includes at least two computation links, each computation link being independently encapsulated as a corresponding link component;
[0099] In this step, the corresponding computational flow can be selected based on the service scenario identifier. Because service scenarios have different attributes and characteristics, their corresponding computational flows are also different. Specifically, a computational flow refers to the process by which input data is computed to produce output data. Different computational flows correspond to different specific operations.
[0100] In embodiments of the present invention, a computational flow can be organically composed of various computational steps, where a computational step can refer to any code segment with relatively independent functionality that can be encapsulated. Because each computational step is independently encapsulated into a step component, the computational flow has a clearer logical structure. Adjustments to the computational flow can be made simply by reorganizing the computational flow based on the step components. This also facilitates the reuse of various algorithms within the same computational flow or across different computational flows.
[0101] S13, executing the calculation process to obtain target material data from the material library corresponding to the service scenario identifier;
[0102] After selecting the calculation process corresponding to the service scenario identifier, the target material data required for the service to be provided can be obtained from the material library corresponding to the service scenario identifier according to the calculation of the process.
[0103] S14, providing the target material data.
[0104] In this step, the acquired target material data can be provided in various ways, for example, it can be sent to the target server that calls the service, it can be sent to the terminal that requests the service, it can be actively pushed to the terminal without a request, or the target material data can be directly output.
[0105] The service provision method provided by an embodiment of the present invention can obtain a service scenario identifier corresponding to the service to be provided, select an operation process corresponding to the service scenario identifier from a pre-established process library based on the service scenario identifier, execute the operation process, obtain target material data from the material library corresponding to the service scenario identifier, and provide the target material data. In this way, since each operation link in the operation process corresponding to the service scenario identifier is independently encapsulated as a corresponding link component, the logical structure of the operation process is clearer, and it is also more conducive to the reuse of various algorithms in the same operation process or between different operation processes. If the operation process needs to be adjusted, it is only necessary to arrange and adjust the operation process based on the link components, without the need for a large amount of repeated code adaptation, thereby effectively improving the efficiency of service provision.
[0106] Optionally, in step S11, the services to be provided may include different service types depending on the service model. For example, in one embodiment of the present invention, the services to be provided may specifically include recommendation services or search services. Based on this, obtaining a service scenario identifier corresponding to the service to be provided in step S11 may include: receiving a service request from a terminal, wherein the service request carries the service scenario identifier. Accordingly, providing the target material data in step S14 may specifically include: sending the target material data to the terminal.
[0107] For example, in one embodiment of the present invention, assuming that a user searches for a nearby food restaurant on the terminal, the server can obtain the corresponding service scenario identifier based on the search service request sent by the terminal, select a suitable operation process based on the service scenario identifier, obtain relevant food restaurant search results (i.e., target material data) and return the search results to the terminal.
[0108] Of course, in this embodiment, if the terminal requests the service from the server through another service platform, the search results can also be returned to the service platform. For example, if the user logs into the Taobao platform and the Taobao platform requests the service from the server, the server can also return the target material data to the Taobao platform, which then returns it to the terminal.
[0109] In the above embodiments, recommendations and searches are triggered by users actively. For example, a user pulls down to refresh the recommended channel of a news client, or a user searches for a keyword in the search box. When the user performs these actions, the recommendation or search service is called, and the server can return the corresponding recommendation or search result to the user through the above operations. For example, on a shopping website, if a user uses the search box to search for a product, the search service is triggered, and the user terminal sends a search service request to the server. The request usually includes a service scenario identifier and a search keyword. For example, if the service scenario is a mobile phone search scenario, the material library corresponding to the search scenario is a mobile phone material library, and the operation process corresponding to the mobile phone search scenario is a search operation process, then in the subsequent steps, the search operation process will be run. The search operation process will be based on the search keyword, the user's characteristic data (for example, age, gender, historical browsing history, etc.), artificial intelligence algorithms, etc., to mine the search results of mobile phones (i.e., target material data) from the mobile phone material library and return it to the user. Similarly, on a shopping website, products are displayed by category. When the user selects mobile phones as the product category, the recommendation service is triggered and the user terminal sends a recommendation service request to the server. The request usually includes a service scenario identifier. The service scenario is a mobile phone recommendation scenario, the material library corresponding to the recommendation scenario is a mobile phone material library, and the operation process corresponding to the recommendation scenario is a recommendation operation process. In the subsequent steps, the recommendation operation process will be run. The recommendation operation process will be based on the user's characteristic data (for example, age, gender, historical browsing history, etc.), the sales ranking of mobile phones, price and other information, and based on artificial intelligence algorithms, etc., to mine the recommendation results of mobile phones (that is, target material data) from the mobile phone material library and display them to the user.
[0110] Unlike the search or recommendation services described above, in another embodiment of the present invention, the service to be provided in step S11 may also be a push service, i.e., a service that proactively provides materials to a terminal without requiring a service request. Based on this, obtaining the service scenario identifier corresponding to the service to be provided in step S11 may specifically include: determining the target push user corresponding to the push service according to pre-set user screening rules; and obtaining the service scenario identifier corresponding to the target push user. Accordingly, providing the target material data in step S14 may specifically include: sending the target material data to the user terminal corresponding to the target push user.
[0111] Specifically, the push service (Push) is actively pushed by the server without manual triggering, and the corresponding service scenario identifier can be obtained based on some historical data of the user. For example, in one embodiment of the present invention, the group of people to be pushed can be screened from the user list of a certain data platform according to configurable rules, and then the preferences of each user can be obtained based on the historical behavior data of these users, so as to determine the corresponding service scenario for each user and obtain the corresponding service scenario identifier. After obtaining the service scenario identifier, the corresponding operation process can be selected and the material set that meets the user's interests can be calculated, and the respective material content can be pushed to the group at a regular time according to the configurable time point.
[0112] Optionally, in another embodiment of the present invention, for the screened group of people to be pushed, the preference of each user may no longer be calculated, and the same service may be pushed to all users.
[0113] From the above analysis, it can be seen that the methods of obtaining service scenario identifiers are different for different types of services. After obtaining the service scenario identifier, a similar method can be used to select the operation process corresponding to the service scenario identifier from the pre-established process library in step S12 based on the service scenario identifier.
[0114] In order to use a suitable operation process for calculation, in one embodiment of the present invention, before selecting the operation process corresponding to the service scenario identifier from a pre-established process library based on the service scenario identifier, the service providing method provided by the embodiment of the present invention may further include:
[0115] Providing developers with a graphical interface that includes pre-built components.
[0116] According to the arrangement operation of the developer in the graphical interface, the corresponding operation process is generated by arranging the link components, and different operation processes form the process library.
[0117] Furthermore, before providing developers with a graphical interface containing a variety of pre-built link components, link components can be constructed based on the developer's component construction instructions. Developers can build link components based on experience and reusable functions for use in orchestrating computing processes.
[0118] Orchestration is the automated configuration, management, and coordination of computer systems, applications, and services. Developers can use a graphical interface to define various components and visually define the orchestration process, operational parameters, operational strategies, and lifecycle of these components. Through interactive visual interfaces, developers can visually construct the orchestration relationships between components by dragging and dropping, making operations and presentation more intuitive.
[0119] Different algorithms may be involved in different component steps. Optionally, in one embodiment of the present invention, the computational steps may include one or more of the following: recall, rough sorting, fine sorting, and reordering. Each computational step may include one or more algorithms. The number of executions and the order of execution of each computational step in the computational flow can be programmed.
[0120] In practice, the computational process of online services can be implemented as a FaaS (Platform as a Service) service. Different recall strategies, coarse-scale ranking strategies, fine-scale ranking strategies, and reordering strategies are all encapsulated as component processes. These components can be orchestrated into a computational process and scheduled by the system. Externally, online services can be presented as an API (Application Programming Interface) gateway, which can be called by other services.
[0121] For example, in one embodiment of the present invention, recall can adopt algorithms such as popularity priority, time priority, collaborative filtering, etc. Rough sorting, fine sorting, and re-ranking can be performed based on a machine learning model.
[0122] In order to facilitate continuous optimization of the services provided, in one embodiment of the present invention, after the corresponding operation process is generated by arranging the link components, the operation process can also be adjusted online or offline, and the adjustment operation includes at least one of the following: adding link components, deleting link components, adjusting the connection order between link components, and adjusting the algorithm within the link components.
[0123] Since the operation process is orchestrated through a visual interface using independently encapsulated link components, each link component can be reused in the same operation process or between different operation processes. When adjusting the operation process, it can be done by adjusting the link components without the need for a large amount of repeated code adaptation, thereby effectively improving the efficiency of service provision.
[0124] In the above embodiment, the operation process corresponding to the service scenario identifier is selected from a pre-established process library based on the service scenario identifier, but the embodiments of the present invention are not limited thereto. In other embodiments of the present invention, the corresponding operation process may also be selected in other ways.
[0125] For example, in one embodiment of the present invention, the service provision method provided by the embodiment of the present invention may further include: obtaining a user identifier corresponding to the service to be provided; then, in step S12, selecting an operation process corresponding to the service scenario identifier from a pre-established process library according to the service scenario identifier may specifically include: selecting an operation process corresponding to the service scenario identifier and the user identifier from a pre-established process library according to the service scenario identifier and the user identifier.
[0126] In specific implementations, when a terminal sends a service request to a server for a recommendation or search service, it can carry the user ID and service scenario ID. In push services, when filtering user historical data, the user ID and service scenario ID can be determined, or the user ID can be determined from user information in a pre-stored user list.
[0127] Which operation process to choose in the process library can be determined by both the user ID and the service scenario ID. That is, the operation process corresponds to both the user and the service scenario. Therefore, more customized services can be provided to users. It can also allow some users to adopt one operation process and other users to adopt another operation process. Due to the different operation processes, the target material data provided to the two parts of users are different, thereby achieving the diversion of the material data provided to users. For example, for a service request to recommend educational news, there are two operation processes in the process library that are more suitable. Then, based on the operation load balancing or other needs of the process, the user's service request can be diverted, thereby further improving the efficiency of service provision. For example, service requests with different last characters in the user ID can be diverted to different operation processes.
[0128] Furthermore, obtaining the user ID corresponding to the service to be provided can also facilitate personalized services for different users. For example, the user's historical behavior data can be obtained based on the user ID; when executing the operation process, the operation process can use this historical behavior data to obtain target material data from the material library corresponding to the service scenario ID. For example, based on the user ID user1, if it is known that the user has recently frequently searched and browsed for women's hats, relevant services can be provided to the user based on the brand, price, style, etc. of the hats viewed by the user.
[0129] To improve the user experience, in one embodiment of the present invention, the content in the material library can also be tagged based on the user ID, for example, by tagging items that have been recommended or pushed to the user, or by tagging items that the user has deleted from the shopping cart. Thus, after executing the computational process and obtaining the target material data from the material library corresponding to the service scenario ID, the tagged data corresponding to the user ID can be filtered out from the target material data before providing the target material data.
[0130] The service provision method provided by the embodiment of the present invention can provide services to users based on the data of various data platforms. To this end, the service provision method provided by the present invention can perform data docking with various data platforms. The inventors found in their research that since the data structures, feature fields and other attributes in different data platforms have their own characteristics, there is also a lot of code adaptation work in the process of data docking with these data platforms, which seriously reduces the efficiency of service provision. In order to solve this problem, the service provision method provided by the embodiment of the present invention can also include, before step S11 obtains the service scenario identifier corresponding to the service to be provided:
[0131] Acquire characteristic fields of the candidate material library, wherein the characteristic fields include preset fields and / or custom fields;
[0132] Constructing the candidate material library according to the characteristic fields;
[0133] Based on this, in step S13, obtaining target material data from the material library corresponding to the service scenario identifier may specifically include:
[0134] According to the service scenario identifier, selecting a target material library corresponding to the service scenario identifier from the candidate material library;
[0135] The target material data is acquired from the target material library.
[0136] In other words, before providing a service, the service provision method provided by embodiments of the present invention can define and construct a material library suitable for the data platform as a candidate material library based on the characteristic fields of the data platform. Because these characteristic fields can include both pre-defined preset fields and unique fields customized by the data platform, the service provision method can be widely adapted to various data platforms without the need for manual code adaptation.
[0137] Specifically, in one embodiment of the present invention, obtaining characteristic fields of the candidate material library may include:
[0138] Creating a default material library according to a preset template, wherein the preset template is provided with the preset fields;
[0139] Receive a request to add a custom field, and assign the custom field carried in the request to a preset variable;
[0140] The constructing the candidate material library according to the characteristic field includes:
[0141] Passing the custom field to a preset function through the preset variable, wherein the preset function includes the preset variable;
[0142] The custom field is added to the default material library through the preset function to form the alternative material library.
[0143] Preset templates can be predefined based on different data platform types, such as providing default templates for e-commerce, information, or short videos. Optionally, custom fields can be added to these default templates. These custom fields can be passed as parameters via predefined variables, and the specific format of these predefined variables is not restricted. This allows for flexible expansion of the material library to meet the needs of different data platforms.
[0144] Correspondingly, in a second aspect, an embodiment of the present invention provides a service providing device that can effectively improve the efficiency of service provision.
[0145] like Figure 2 As shown, the service providing device provided by the embodiment of the present invention may include:
[0146] An identification acquisition unit 31 is used to acquire a service scenario identification corresponding to the service to be provided;
[0147] A selection unit 32 is configured to select, based on the service scenario identifier, a computation process corresponding to the service scenario identifier from a pre-established process library, wherein the computation process includes at least two computation links, each of which is independently encapsulated as a corresponding link component;
[0148] An execution unit 33 is configured to execute the operation process and obtain target material data from a material library corresponding to the service scenario identifier;
[0149] The data providing unit 34 is configured to provide the target material data.
[0150] The service provision device provided by an embodiment of the present invention is capable of obtaining a service scenario identifier corresponding to the service to be provided, selecting an operation process corresponding to the service scenario identifier from a pre-established process library based on the service scenario identifier, executing the operation process, obtaining target material data from the material library corresponding to the service scenario identifier, and providing the target material data. In this way, since each operation link in the operation process corresponding to the service scenario identifier is independently encapsulated as a corresponding link component, the logical structure of the operation process is clearer, and it is also more conducive to the reuse of various algorithms in the same operation process or between different operation processes. If the operation process needs to be adjusted, it is only necessary to arrange and adjust the operation process based on the link components, without the need for a large amount of repeated code adaptation, thereby effectively improving the efficiency of service provision.
[0151] Optionally, the service to be provided includes a recommendation service or a search service;
[0152] The identification acquisition unit 31 is specifically configured to receive a service request sent by a terminal, wherein the service request carries a service scenario identification;
[0153] The data providing unit 34 is specifically configured to send the target material data to the terminal.
[0154] Optionally, the service to be provided includes a push service;
[0155] The identification acquisition unit 31 is specifically used to:
[0156] Determine the target push user corresponding to the push service according to the pre-set user screening rules;
[0157] Obtain the service scenario identifier corresponding to the target push user;
[0158] The data providing unit 34 is specifically configured to send the target material data to the user terminal corresponding to the target push user.
[0159] Optionally, the service providing device may further include:
[0160] An interface providing unit, configured to provide a graphical interface to a developer before selecting a computational process corresponding to the service scenario identifier from a pre-established process library based on the service scenario identifier, wherein the graphical interface is provided with a plurality of pre-built link components;
[0161] The arrangement unit is used to generate corresponding operation processes by using the link components according to the arrangement operations of the developer in the graphical interface, and different operation processes form the process library.
[0162] Optionally, the service providing device may further include: a component construction unit, configured to construct a link component based on a component construction instruction of a developer before providing a graphical interface to the developer.
[0163] Optionally, the operation steps may include at least one of the following: recall, rough sorting, fine sorting, and re-sorting; and each of the operation steps includes at least one algorithm.
[0164] Optionally, the orchestration unit is also used to perform online or offline adjustment operations on the operation process after the corresponding operation process is generated by orchestrating the link components. The adjustment operation includes at least one of the following: adding link components, deleting link components, adjusting the connection order between link components, and adjusting the algorithm within the link components.
[0165] Optionally, the identification acquisition unit 31 is further configured to: acquire a user identification corresponding to the service to be provided;
[0166] The selection unit 32 is specifically configured to select, according to the service scenario identifier and the user identifier, an operation process corresponding to the service scenario identifier and the user identifier from a pre-established process library.
[0167] Optionally, the identification acquisition unit 31 is further configured to: acquire a user identification corresponding to the service to be provided;
[0168] The service providing device may further include a filtering unit for filtering out the marked data corresponding to the user identifier from the target material data after executing the operation process and obtaining the target material data from the material library corresponding to the service scenario identifier and before providing the target material data.
[0169] Optionally, the service providing device may further include:
[0170] A field acquisition unit, configured to acquire characteristic fields of the candidate material library before acquiring a service scenario identifier corresponding to the service to be provided, wherein the characteristic fields include preset fields and / or user-defined fields;
[0171] A material library construction unit, configured to construct the candidate material library according to the characteristic fields;
[0172] The execution unit 33 may include:
[0173] A selection module, configured to select a target material library corresponding to the service scenario identifier from the candidate material library according to the service scenario identifier;
[0174] The acquisition module is used to acquire the target material data from the target material library.
[0175] Optionally, the field acquisition unit includes:
[0176] A creation module, configured to create a default material library according to a preset template, wherein the preset template is provided with the preset fields;
[0177] An assignment module, configured to receive a request for adding a custom field and assign the custom field carried in the addition request to a preset variable;
[0178] The material library construction unit includes:
[0179] A transfer module, configured to transfer the custom field to a preset function via the preset variable, wherein the preset function includes the preset variable;
[0180] An adding module is used to add the custom field to the default material library through the preset function to form the alternative material library.
[0181] above Figure 1The specific operations shown can be performed by Figure 2 The operation is performed by each unit in the service providing device, and the specific operation details will not be described here.
[0182] In a third aspect, accordingly, an embodiment of the present invention provides an electronic device that can effectively improve service provision efficiency.
[0183] like Figure 3 As shown, an electronic device provided by an embodiment of the present invention may include: a shell 41, a processor 42, a memory 43, a circuit board 44 and a power supply circuit 45, wherein the circuit board 44 is placed inside the space enclosed by the shell 41, and the processor 42 and the memory 43 are set on the circuit board 44; the power supply circuit 45 is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory 43 is used to store executable program code; the processor 42 runs the program corresponding to the executable program code by reading the executable program code stored in the memory 43, so as to execute the service providing method described in any of the aforementioned embodiments.
[0184] The specific execution process of the above steps by the processor 42 and the steps further executed by the processor 42 by running the executable program code can be found in the description of the above embodiment and will not be repeated here.
[0185] The electronic device exists in various forms and may have a stand-alone or distributed computing structure, which is not limited in the present invention.
[0186] In the fourth aspect, an embodiment of the present invention also provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement any service provision method provided by the aforementioned embodiments, thereby also achieving the corresponding technical effects. This has been described in detail above and will not be repeated here.
[0187] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0188] Each embodiment in this specification is described in a related manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
[0189] In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0190] For the convenience of description, the above device is described as being divided into various units / modules based on their functions. Of course, when implementing the present invention, the functions of each unit / module can be implemented in the same or multiple software and / or hardware.
[0191] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0192] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A service providing method, characterized in that: include: Obtain a service scenario identifier corresponding to the service to be provided, wherein the service scenario identifier indicates the service scenario corresponding to the service to be provided, and the service scenario is defined according to the target data platform involved in the service to be provided and the category and label of the service to be provided in the target data platform; Obtaining a user identifier corresponding to the service to be provided; Based on the service scenario identifier and the user identifier, selecting an operation process corresponding to the service scenario identifier and the user identifier from a pre-established process library, wherein the operation process includes at least two operation links, each operation link is independently encapsulated as a corresponding link component; the process library is provided with different operation processes set for different service scenarios, and the operation process corresponding to each service scenario is composed of link components selected based on the attributes and characteristics of the service scenario; Executing the selected operation process, selecting a target material library corresponding to the service scenario identifier from the candidate material library of the target data platform, and obtaining target material data from the target material library, wherein the candidate material library of the target data platform is pre-constructed based on characteristic fields of the target data platform, and the characteristic fields include preset fields and / or custom fields set for the target data platform; Providing the target material data; Wherein, the acquiring target material data from the target material library includes: Acquiring historical behavior data of the user according to the user identifier; Acquiring the target material data from the target material library according to the historical behavior data; The characteristic fields are obtained by the following steps: Creating a default material library according to a preset template predefined for the target data platform, wherein the preset template is provided with the preset fields; Receive a request to add a custom field, and assign the custom field carried in the request to a preset variable; The target data platform's candidate material library is constructed by the following steps: Passing the custom field to a preset function through the preset variable, wherein the preset function includes the preset variable; The custom field is added to the default material library through the preset function to form the alternative material library.
2. The method according to claim 1, characterized in that The services to be provided include recommendation services or search services; The obtaining of a service scenario identifier corresponding to the service to be provided includes: Receiving a service request sent by a terminal, wherein the service request carries a service scenario identifier; Providing the target material data includes: The target material data is sent to the terminal.
3. The method according to claim 1, characterized in that The service to be provided includes a push service; The obtaining of a service scenario identifier corresponding to the service to be provided includes: Determine the target push user corresponding to the push service according to the pre-set user screening rules; Obtain the service scenario identifier corresponding to the target push user; Providing the target material data includes: The target material data is sent to a user terminal corresponding to the target push user.
4. The method according to any one of claims 1 to 3, characterized in that Before selecting, based on the service scenario identifier and the user identifier, a calculation process corresponding to the service scenario identifier and the user identifier from a pre-established process library, the method further includes: Providing developers with a graphical interface that includes pre-built components. According to the arrangement operation of the developer in the graphical interface, the corresponding operation process is generated by arranging the link components, and different operation processes form the process library.
5. The method according to claim 4, characterized in that Before providing a graphical interface to developers, wherein the graphical interface is provided with a plurality of pre-built link components, the method further includes: Build link components based on the developer's component building instructions.
6. The method according to claim 4, characterized in that The operation steps include at least one of the following: recall, rough sorting, fine sorting, and re-sorting; each of the operation steps includes at least one algorithm.
7. The method according to claim 4, characterized in that After generating the corresponding operation process by arranging the link components, the method further includes: An online or offline adjustment operation is performed on the operation process, and the adjustment operation includes at least one of the following: adding a link component, deleting a link component, adjusting the connection sequence between link components, and adjusting the algorithm inside the link component.
8. The method according to claim 1, characterized in that After executing the selected operation process, selecting a target material library corresponding to the service scenario identifier from the candidate material library of the target data platform, and obtaining target material data from the target material library, and before providing the target material data, the method further includes: The marked data corresponding to the user identifier is filtered out from the target material data.
9. A service providing device, characterized in that: include: an identification acquisition unit, configured to acquire a service scenario identification corresponding to the service to be provided, wherein the service scenario identification indicates the service scenario corresponding to the service to be provided, and the service scenario is defined according to the target data platform involved in the service to be provided and the category and label of the service to be provided in the target data platform; The identification acquisition unit is further used to: acquire the user identification corresponding to the service to be provided; A selection unit is configured to select, based on the service scenario identifier and the user identifier, an operation process corresponding to the service scenario identifier and the user identifier from a pre-established process library, wherein the operation process includes at least two operation links, each operation link being independently encapsulated as a corresponding link component; the process library is provided with different operation processes set for different service scenarios, and the operation process corresponding to each service scenario is composed of link components selected based on the attributes and characteristics of the service scenario; an execution unit, configured to execute the operation process selected by the selection unit, select a target material library corresponding to the service scenario identifier from the candidate material library of the target data platform, and obtain target material data from the target material library, wherein the candidate material library of the target data platform is pre-constructed based on characteristic fields of the target data platform, and the characteristic fields include preset fields and / or custom fields set for the target data platform; A data providing unit, configured to provide the target material data; The execution unit is further configured to, for the step of obtaining target material data from the target material library, execute: Acquiring historical behavior data of the user according to the user identifier; Acquiring the target material data from the target material library according to the historical behavior data; The characteristic fields are obtained by the following steps: Creating a default material library according to a preset template predefined for the target data platform, wherein the preset template is provided with the preset fields; Receive a request to add a custom field, and assign the custom field carried in the request to a preset variable; The target data platform's candidate material library is constructed by the following steps: Passing the custom field to a preset function through the preset variable, wherein the preset function includes the preset variable; The custom field is added to the default material library through the preset function to form the alternative material library.
10. The device according to claim 9, characterized in that The services to be provided include recommendation services or search services; The identification acquisition unit is specifically configured to receive a service request sent by a terminal, wherein the service request carries a service scenario identification; The data providing unit is specifically configured to send the target material data to the terminal.
11. The device according to claim 9, characterized in that The service to be provided includes a push service; The identification acquisition unit is specifically used to: Determine the target push user corresponding to the push service according to the pre-set user screening rules; Obtain the service scenario identifier corresponding to the target push user; The data providing unit is specifically configured to send the target material data to a user terminal corresponding to the target push user.
12. The device according to any one of claims 9 to 11, characterized in that Also includes: An interface providing unit, configured to provide a graphical interface to a developer before selecting, based on the service scenario identifier and the user identifier, a computational process corresponding to the service scenario identifier and the user identifier from a pre-established process library, wherein the graphical interface is provided with a plurality of pre-built link components; The arrangement unit is used to generate corresponding operation processes by using the link components according to the arrangement operations of the developer in the graphical interface, and different operation processes form the process library.
13. The device according to claim 12, characterized in that Also includes: The component building unit is used to build link components based on the developer's component building instructions before providing a graphical interface to the developer.
14. The device according to claim 12, characterized in that The operation steps include at least one of the following: recall, rough sorting, fine sorting, and re-sorting; each of the operation steps includes at least one algorithm.
15. The device according to claim 12, characterized in that The orchestration unit is further configured to perform online or offline adjustment operations on the operation process after generating the corresponding operation process by orchestrating the link components. The adjustment operations include at least one of the following: adding link components, deleting link components, adjusting the connection sequence between link components, and adjusting the algorithms within link components.
16. The device according to claim 9, characterized in that The device also includes a filtering unit for filtering out the marked data corresponding to the user identifier from the target material data after executing the operation process selected by the selection unit, selecting the target material library corresponding to the service scenario identifier from the alternative material library of the target data platform, and obtaining the target material data from the target material library before providing the target material data.
17. An electronic device, characterized in that: The electronic device includes: a shell, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the shell, and the processor and the memory are arranged on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program code; the processor runs the program corresponding to the executable program code by reading the executable program code stored in the memory, and is used to execute the service providing method described in any one of the preceding claims 1 to 8.
18. A computer-readable storage medium, characterized in that The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the service providing method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Service processing method and device based on primitive operation
CN109445774A
Service data processing method and device, apparatus and computer readable storage medium
CN110197331A
Business processing method, device and equipment
CN111435495A
High-level database management system
US20060242189A1