Content recommendation method, device, equipment and storage medium based on state machine
Through the state machine-based content recommendation method and the use of edge node pre-download resources, the problems of cumbersome network resource acquisition process and storage space waste in the existing technology are solved, and more efficient resource acquisition and storage management are achieved.
Patent Information
- Application Number
- CN201811183179.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-10-11
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2038-10-11
AI Technical Summary
The existing technology has cumbersome procedures for obtaining network resources, and caching resource content occupies a large amount of storage space, resulting in resource waste and low efficiency.
A state machine-based content recommendation method is adopted to simplify client processing and reduce storage requirements by obtaining user access history, calculating recommendation index, marking recommendable content, and pre-downloading resource files at edge nodes.
It improves the efficiency of network resource acquisition, reduces the client's occupation of server resources, saves storage space, simplifies the process, and improves service efficiency.
Smart Images

Figure CN109241444B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent recommendation, and in particular to a state machine-based content recommendation method, device, equipment and storage medium. Background Art
[0002] With the development of the Internet from PC to mobile, people's way of obtaining information has shifted from traditional WEB pages to clients, self-media and other platforms. At this time, the content form has also shifted from purely text-based to text-based. This new way of expressing content has spawned a variety of self-media platforms and platforms with text as the main content display form. However, with the progress of the times, people are no longer satisfied with the content display method dominated by text and pictures. The new content display method dominated by video has begun to be more popular with people due to its advantages such as intuitiveness and vividness. As a result, videos have begun to attract more and more attention from users and gradually evolved into a new way of expression. The content form has changed from text to text and pictures to videos. In addition to the growing demand of users, the deeper reason lies in the continuous evolution and development of Internet technology. The continuously optimized signal transmission technology and network technology have enabled people to accept this content form conveniently and quickly, and bring users a completely different experience.
[0003] Currently, on various network platforms, the user's video browsing history over a certain period of time is generally analyzed to understand the customer's viewing habits, and then relevant content is recommended based on the user's viewing habits. If the user wants to download related resources, the user is also required to initiate a pre-download of the corresponding content from the client. This will cause the client to frequently call the API, occupy a large amount of server resources and waste the user's time. The whole process is relatively cumbersome, and when caching related resource content, a large amount of storage space is required, wasting storage resources. Summary of the invention
[0004] Based on this, it is necessary to provide a content recommendation method, device, equipment and storage medium based on a state machine to address the problem that the existing technology has a complicated process for obtaining network resources and requires a large amount of storage space when caching related resource content.
[0005] A content recommendation method based on a state machine, the content recommendation method based on a state machine comprising the following steps:
[0006] Get the user's history of accessing web content;
[0007] Calculating the recommendation index of the accessed web content according to the historical records;
[0008] Comparing the recommendation index with a threshold value, and marking the recommendable content according to the comparison result;
[0009] Recommending the recommendable content to the user, downloading resource files of the recommendable content from a core node containing various network resources, and storing the resource files in an edge node, where the user can obtain network resources nearby;
[0010] The actual request of the user to access the network content is obtained, and the corresponding edge node is located according to the actual request, the resource file stored in the corresponding edge node is retrieved from the corresponding edge node, and the resource file corresponding to the actual request is obtained.
[0011] In one embodiment, calculating the recommendation index of the accessed web content according to the historical records includes:
[0012] Obtain keywords of the user's historically visited web content, and classify the keywords according to different web content;
[0013] Calculate the recommendation index of the keyword, the calculation formula is shown in formula (1),
[0014]
[0015] In formula (1), is the recommendation index, whose value is between 0 and 1, λ is the recommendation coefficient of different keywords, which can use empirical values, and whose coefficient value is between 0 and 1, N i is the number of identical keywords, t now is the current time, t first The time when the first keyword of the same keyword is accessed.
[0016] In one embodiment, comparing the recommendation index with a threshold, and marking the recommendable content according to the comparison result, includes:
[0017] Obtaining the calculated recommendation index of the keyword;
[0018] The recommendation index is compared with a threshold value, and when the recommendation index is higher than the threshold value, the network content corresponding to the keyword is marked as recommendable content; when the recommendation index is lower than the threshold value, no marking is performed.
[0019] In one embodiment, the recommendable content is recommended to the user, and resource files of the recommendable content are downloaded from a core node containing various network resources, and the resource files are stored in an edge node, which refers to a network node where the user can obtain network resources nearby, including:
[0020] Get the access request entered by the user on the client;
[0021] Acquire the recommendable content corresponding to the access request, and send the recommendable content to the client through a recommendation engine, wherein the recommendation engine is arranged in an edge node;
[0022] According to the recommendable content, resource files corresponding to the recommendable content are pre-downloaded from the core node, and the resource files are cached in the edge node.
[0023] In one embodiment, obtaining an actual request of a user to access network content, locating a corresponding edge node according to the actual request, retrieving the resource file stored in the corresponding edge node, and obtaining the resource file corresponding to the actual request includes:
[0024] Obtaining the actual request of the user to access the network content, and judging whether the actual request belongs to the recommendable content;
[0025] If the actual request belongs to the recommendable content, obtaining a resource file corresponding to the actual request from the edge node;
[0026] If the actual request does not belong to the recommendable content, a resource file corresponding to the actual request is obtained from a core node.
[0027] In one embodiment, according to the recommendable content, pre-downloading a resource file corresponding to the recommendable content from a core node, and caching the resource file in the edge node includes:
[0028] Obtain keywords for recommendable content, and call a recommendation engine in an edge node to send the keywords to a core node;
[0029] According to the keyword, searching for a corresponding resource file from the core node;
[0030] The resource file is sent to the edge node for storage.
[0031] In one embodiment, after obtaining the actual request of the user to access the network content, locating the corresponding edge node according to the actual request, retrieving the resource file stored in the corresponding edge node, and obtaining the resource file corresponding to the actual request, it also includes arranging the resource files in the edge node according to the actual request of the user, specifically including:
[0032] If the actual request needs to obtain network resources from the edge node, retaining the corresponding resource file in the edge node;
[0033] If the actual request needs to obtain the corresponding network resources from the core node, the corresponding resource file in the edge node is cleared.
[0034] Based on the same concept, the present application also provides a content recommendation device based on a state machine, and the content recommendation device based on a state machine includes:
[0035] An acquisition module is configured to acquire a user's history of accessing network content;
[0036] A calculation module, configured to calculate a recommendation index of the accessed web content according to the historical records;
[0037] a marking module, configured to compare the recommendation index with a threshold value and mark the recommendable content according to the comparison result;
[0038] A recommendation module, configured to recommend the recommendable content to the user, download resource files of the recommendable content from the core node, and store the resource files in the edge node;
[0039] The output module is configured to obtain an actual request of a user to access network content, locate a corresponding edge node according to the actual request, retrieve the resource file stored in the corresponding edge node, and obtain the resource file corresponding to the actual request.
[0040] Based on the same technical concept, an embodiment of the present application also provides a computer device, which includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by one or more of the processors, the one or more processors perform the steps of the above-mentioned state machine-based content recommendation method.
[0041] Based on the same technical concept, an embodiment of the present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, one or more of the processors execute the steps of the content recommendation method based on the state machine as described above.
[0042] The above-mentioned state machine-based content recommendation method, device, equipment and storage medium obtain the user's historical records of accessing network content; calculate the recommendation index of the accessed network content based on the historical records; compare the recommendation index with the threshold, and mark the recommendable content according to the comparison result; recommend the recommendable content to the user, and download the resource file of the recommendable content from the core node containing various types of network resources, and store the resource file in the edge node, which refers to the network node where the user can obtain network resources nearby; obtain the user's actual request to access the network content, and locate the corresponding edge node according to the actual request, retrieve the resource file stored in the corresponding edge node from the corresponding edge node, and obtain the resource file corresponding to the actual request. Therefore, pre-downloading network resources through edge nodes simplifies the client's processing flow, eliminates the need to cache a large number of resource files, saves resource space, and improves service efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A flowchart of content recommendation based on a state machine in one embodiment of the present application;
[0044] Figure 2 A flowchart for performing content recommendation in one embodiment of the present application;
[0045] Figure 3 A flowchart for obtaining network resources in one embodiment of the present application;
[0046] Figure 4 This is a structural block diagram of a content recommendation device based on a state machine in one embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0048] Figure 1 The flowchart of content recommendation based on a state machine provided in one embodiment of the present application, as shown in the figure, includes:
[0049] S1. Obtain the user's history of accessing network content;
[0050] This step obtains the HTTP request of the user to access the network content, and calls the network resource corresponding to the HTTP request according to the keywords in the HTTP request.
[0051] S2. Calculating the recommendation index of the accessed web content according to the historical records;
[0052] In this step, the network contents visited by the user in history are obtained, the network contents are classified according to keywords, and the recommendation index of the keyword is calculated to display the recommendation index of the network contents of a certain category.
[0053] S3, comparing the recommendation index with a threshold, and marking the recommendable content according to the comparison result;
[0054] In this step, the calculated recommendation index of the network content is compared with a threshold value. When the recommendation index is higher than the threshold value, the network content is worthy of recommendation and is marked; when the recommendation index is lower than the threshold value, the network content is not worthy of recommendation.
[0055] S4, recommending the recommendable content to the user, downloading resource files of the recommendable content from a core node containing various network resources, and storing the resource files in an edge node, where the edge node refers to a network node where the user can obtain network resources nearby;
[0056] In this step, by comparing the access request input by the user on the client, the recommendable content corresponding to the access request is recommended to the client interface, and the resource files contained in the recommendable content are pre-downloaded from the core node; the core node refers to a source station of an area containing various types of network resources, which includes multiple edge nodes; for example, the core node of the East China region divided by region, including the Shanghai edge node, Hangzhou edge node, and Nanjing edge node; if the user accessing the network resource is located within the Hangzhou edge node, the corresponding resource file is pre-downloaded from the core node of the East China region and saved in the Hangzhou edge node according to the recommendation index of each network resource of the user; when the user needs to access the resource file, the resource file can be directly obtained from the Hangzhou edge node without calling the API to obtain it from the core node of the East China region, which makes the resource acquisition process simple and the resource acquisition speed fast, greatly improving the working efficiency of the network node.
[0057] S5. Obtaining an actual request of a user to access network content, locating a corresponding edge node according to the actual request, retrieving the resource file stored in the corresponding edge node, and obtaining the resource file corresponding to the actual request;
[0058] In this step, by comparing the actual request input by the user on the client, it is determined whether the actual request is within the range of recommendable content. If the actual request is within the recommendable content, the resource file of the actual request is obtained from the corresponding edge node; if the actual request is not within the recommendable content, the resource file of the actual request is obtained from the core node.
[0059] Through the above steps and methods, the present application realizes the function of recommending content based on the user's historical record of accessing network content, and through the pre-download of recommended content by the edge node, simplifies the processing flow of the user client, shortens the time for the user to obtain resource files, and improves the service efficiency of the network node.
[0060] In one embodiment, S2, calculating the recommendation index of the accessed network content according to the historical records may include:
[0061] S201, obtaining keywords of the network contents visited by the user in history, and classifying the keywords according to different network contents;
[0062] In this step, the keywords of the user's historical online content are obtained, and the online content is classified according to the keywords and the categories to which it belongs; for example, if a funny short video is obtained, its keyword is funny, and it belongs to the video category, it is classified into the funny category of the video category.
[0063] S202: Calculate the recommendation index of the keyword, the calculation formula is as shown in formula (1):
[0064]
[0065] In formula (1), is the recommendation index, whose value is between 0 and 1, λ is the recommendation coefficient of different keywords, which can use empirical values, and whose coefficient value is between 0 and 1, N i is the number of identical keywords, t now is the current time, t first The time when the first keyword of the same keyword is accessed;
[0066] In this step, the recommendation index of the keyword of the network content is calculated according to formula (1), and the recommendation index of the keyword is used to represent the recommendation index of the network content of the corresponding category.
[0067] In this embodiment, by obtaining keywords of network content and calculating the recommendation index of the keyword, a basis is provided for subsequent judging whether the network content is worthy of recommendation.
[0068] In one embodiment, S3, comparing the recommendation index with a threshold, and marking the recommendable content according to the comparison result may include:
[0069] S301, obtaining the calculated recommendation index of the keyword;
[0070] S302, comparing the recommendation index with a threshold value, and when the recommendation index is higher than the threshold value, marking the network content corresponding to the keyword as a recommendable content; when the recommendation index is lower than the threshold value, no marking is performed;
[0071] In this step, the recommendation index of the calculated keywords of the network content is compared with the threshold to judge whether the network content is worthy of recommendation; for example, if the threshold is set to 0.5, if the recommendation index of a funny short video is 0.6, then the funny short video is worthy of recommendation and is marked; if the recommendation index of a funny short video is 0.3, then the funny short video is not worthy of recommendation and is not marked.
[0072] In this embodiment, the recommendation index of the keyword is compared with a threshold value, and the network content with a recommendation index higher than the threshold value is marked, so as to provide a basis for subsequently recommending the network content to the user.
[0073] Figure 2 The flowchart of content recommendation provided in one embodiment of the present application, as shown in the figure, includes:
[0074] S401, obtaining an access request input by a user on a client;
[0075] In this step, an access request input by a user is obtained through a client, and the client includes a computer client, a TV client, a tablet client, and a mobile phone client.
[0076] S402, obtaining the recommendable content corresponding to the access request, and sending the recommendable content to the client through a recommendation engine, wherein the recommendation engine is set in an edge node;
[0077] In this step, the content corresponding to the access request is searched from the recommendable content through the obtained user access request, and the recommendable content is displayed in the client interface through the recommendation engine in the edge node.
[0078] S403: Pre-download resource files corresponding to the recommendable content from the core node according to the recommendable content, and cache the resource files in the edge node;
[0079] In this step, according to the recommendable content displayed in the client interface, the resource files corresponding to the recommendable content are pre-downloaded from the core node, and the resource files are transmitted to the edge node for storage.
[0080] This embodiment recommends relevant content to users by comparing their access requests, pre-downloads resource files of the recommended content from the core nodes, and caches them in the edge nodes, thereby providing a basis for subsequent users to directly obtain resource files from the edge nodes and shortening the time it takes for users to obtain network resources.
[0081] Figure 3 The flowchart of obtaining network resources provided in one embodiment of the present application, as shown in the figure, includes:
[0082] S501, obtaining an actual request of a user to access network content, and determining whether the actual request belongs to recommendable content;
[0083] In this step, the network content actually requested by the user is obtained through the client to determine whether the actual request falls within the scope of recommended content; for example, the user's initial access request is "funny short videos", and the client recommends a domestic funny short video series to the user, but the user's actual request is "foreign prank short videos", then the actual request is not within the scope of recommended content.
[0084] S502: If the actual request belongs to the recommendable content, obtain the resource file corresponding to the actual request from the edge node; if the actual request does not belong to the recommendable content, obtain the resource file corresponding to the actual request from the core node;
[0085] In this step, it is determined whether the actual request falls within the scope of the recommended content, and the resource file is obtained from the corresponding node based on the determination result; for example, if the user's actual request is "foreign prank short videos" and the foreign funny video series recommended to the user before is a foreign funny video series, the resource file is obtained directly from the edge node; if the domestic funny video series recommended to the user before is a domestic funny video series, the resource file needs to be obtained from the core node.
[0086] In this embodiment, by comparing the actual user request with the recommended content, if the actual request is within the recommended range, the resource file can be directly obtained from the edge node, which shortens the time for the user to obtain the resource file and improves the service efficiency of the node.
[0087] In one embodiment, S403, pre-downloading resource files corresponding to the recommendable content from the core node according to the recommendable content, and caching the resource files in the edge node further includes:
[0088] S40301, obtaining keywords of recommended content, calling a recommendation engine in an edge node to send the keywords to a core node;
[0089] In this step, keywords of the recommended content are obtained. For example, if the obtained keyword is "couple prank short video", the recommendation engine in the edge node is called to send the keyword "couple prank short video" to the core node.
[0090] S40302. Searching for corresponding resource files from the core nodes according to the keywords;
[0091] In this step, according to the keyword "couple prank short video", the resource file of "domestic and foreign couple prank short video" corresponding to the keyword "couple prank short video" is searched and obtained from the core node.
[0092] S40303, sending the resource file to the edge node for storage;
[0093] In this step, the obtained resource file of "domestic and foreign couples prank short videos" is sent to the edge node for caching.
[0094] This embodiment pre-downloads resource files of recommended content to edge nodes, thereby providing a basis for subsequent users to quickly obtain resource files of network content and improving the service efficiency of the nodes.
[0095] In one embodiment, after obtaining the actual request of the user to access the network content, locating the corresponding edge node according to the actual request, retrieving the resource file stored in the corresponding edge node from the corresponding edge node, and obtaining the resource file corresponding to the actual request, it also includes arranging the resource files in the edge node according to the actual request of the user, specifically including:
[0096] If the actual request needs to obtain network resources from the edge node, the corresponding resource file in the edge node is retained; if the actual request needs to obtain the corresponding network resources from the core node, the corresponding resource file in the edge node is cleared;
[0097] In this step, the resource files in the edge node are cleaned up regularly according to whether it is necessary to obtain the resource files actually requested from the edge node. If the resource files are obtained from the edge node, the resource files are retained. If the resource files are obtained from the core node, the resource files of the corresponding recommended content cached in the edge node are cleared.
[0098] In this embodiment, cache files in edge nodes are cleaned up regularly according to actual requests of users, so that more space is reserved for storing required resource files, thereby improving the service efficiency of edge nodes.
[0099] Based on the same concept, the present application also proposes a content recommendation device based on a state machine, such as Figure 4As shown, the state machine-based content recommendation device includes an acquisition module, a calculation module, a marking module, a recommendation module and an output module, wherein: the acquisition module is configured to acquire the historical records of users accessing network content; the calculation module is configured to calculate the recommendation index of the accessed network content based on the historical records; the marking module is configured to compare the recommendation index with a threshold value, and mark the recommendable content according to the comparison result; the recommendation module is configured to recommend the recommendable content to the user, download the resource file of the recommendable content from the core node, and store the resource file in the edge node; the output module is configured to acquire the actual request of the user to access the network content, locate the corresponding edge node according to the actual request, retrieve the resource file stored in the corresponding edge node from the corresponding edge node, and acquire the resource file corresponding to the actual request.
[0100] In one embodiment, the computing module includes:
[0101] An acquisition unit, configured to acquire keywords of network contents visited by a user in history, and classify the keywords according to different network contents;
[0102] The calculation unit is configured to calculate the recommendation index of the keyword, and the calculation formula is as shown in formula (1):
[0103]
[0104] In formula (1), is the recommendation index, whose value is between 0 and 1, λ is the recommendation coefficient of different keywords, which can use empirical values, and whose coefficient value is between 0 and 1, N i is the number of identical keywords, t now is the current time, t first The time when the first keyword of the same keyword is accessed.
[0105] In one embodiment, the marking module includes:
[0106] A marking unit is used to obtain the calculated recommendation index of the keyword; compare the recommendation index with a threshold value, and when the recommendation index is higher than the threshold value, mark the network content corresponding to the keyword as recommendable content; when the recommendation index is lower than the threshold value, no marking is performed.
[0107] In one embodiment, the recommendation module includes:
[0108] A request obtaining unit, configured to obtain an access request input by a user on a client;
[0109] a sending unit, configured to obtain the recommendable content corresponding to the access request, and send the recommendable content to the client through a recommendation engine, wherein the recommendation engine is set in an edge node;
[0110] The cache unit is configured to pre-download resource files corresponding to the recommendable content from the core node according to the recommendable content, and cache the resource files in the edge node.
[0111] In one embodiment, the output module includes:
[0112] A judging unit, configured to obtain an actual request from a user to access network content, and to judge whether the actual request belongs to a recommendable content;
[0113] The file extraction unit is configured to obtain the resource file corresponding to the actual request from the edge node if the actual request belongs to the recommendable content; and obtain the resource file corresponding to the actual request from the core node if the actual request does not belong to the recommendable content.
[0114] In one embodiment, the cache unit in the recommendation module includes:
[0115] A keyword sending unit, configured to obtain keywords for recommendable content, and call a recommendation engine in an edge node to send the keywords to a core node;
[0116] A search unit, configured to search for corresponding resource files from the core node according to the keyword;
[0117] The file sending unit is configured to send the resource file to the edge node for storage.
[0118] In one embodiment, the state machine-based content recommendation device further includes a checking module, which is configured to sort resource files in the edge node according to the actual request of the user; the checking module further includes:
[0119] A file reservation unit, configured to reserve the corresponding resource file in the edge node if the actual request needs to obtain network resources from the edge node;
[0120] The file clearing unit is configured to clear the corresponding resource file in the edge node if the actual request needs to obtain the corresponding network resource from the core node.
[0121] Based on the same technical concept, an embodiment of the present application also provides a computer device, which includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, one or more of the processors implement the steps of the state machine-based content recommendation method in the above-mentioned embodiments when executing the computer-readable instructions.
[0122] Based on the same technical concept, an embodiment of the present application further provides a storage medium storing computer-readable instructions, wherein when the computer-readable instructions are executed by one or more processors, one or more processors implement the steps of the state machine-based content recommendation method in the above-mentioned embodiments when executing the computer-readable instructions. The storage medium may be a non-volatile storage medium.
[0123] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0124] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0125] The above-mentioned embodiments only express some exemplary embodiments of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.
Claims
1. A content recommendation method based on state machine, It is characterized in that The state machine-based content recommendation method includes: Get the user's history of accessing web content; Calculating the recommendation index of the accessed web content according to the historical records; Comparing the recommendation index with a threshold value, and marking the recommendable content according to the comparison result; The recommendable content is recommended to the user, and resource files of the recommendable content are downloaded from a core node containing various network resources, and the resource files are stored in an edge node, where the edge node refers to a network node where the user can obtain network resources nearby; the resource files of the recommendable content include: resource files corresponding to keywords of the recommendable content in the core node; Obtaining an actual request of a user to access network content, locating a corresponding edge node according to the actual request, retrieving the resource file stored in the corresponding edge node, and obtaining the resource file corresponding to the actual request; The step of calculating the recommendation index of the accessed web content according to the historical records includes: Obtain keywords of the user's historical access to network content, and classify the keywords according to different network content; wherein the classification method includes: classifying the network content according to the keywords and the categories to which they belong; Calculate the recommendation index of the keyword, the calculation formula is shown in formula (1), In formula (1), is the recommendation index, whose value is between 0 and 1, λ is the recommendation coefficient of different keywords, which can use empirical values, and whose coefficient value is between 0 and 1, ∑N i is the number of network contents visited by users with the same keyword, i is the sequence number of the keyword, t now is the current time, t first The time when the first keyword of the same keyword is accessed.
2. A content recommendation method based on a state machine as claimed in claim 1, It is characterized in that The comparing the recommendation index with a threshold value and marking the recommendable content according to the comparison result includes: Obtaining the calculated recommendation index of the keyword; The recommendation index is compared with a threshold value, and when the recommendation index is higher than the threshold value, the network content corresponding to the keyword is marked as recommendable content; when the recommendation index is lower than the threshold value, no marking is performed.
3. A content recommendation method based on a state machine as claimed in claim 1, It is characterized in that The recommendable content is recommended to the user, and the resource file of the recommendable content is downloaded from the core node containing various network resources, and the resource file is stored in the edge node, which refers to the network node where the user can obtain the network resource nearby, including: Get the access request entered by the user on the client; Acquire the recommendable content corresponding to the access request, and send the recommendable content to the client through a recommendation engine, wherein the recommendation engine is arranged in an edge node; According to the recommendable content, resource files corresponding to the recommendable content are pre-downloaded from the core node, and the resource files are cached in the edge node.
4. A content recommendation method based on a state machine as claimed in claim 1, It is characterized in that The obtaining of the actual request of the user to access the network content, locating the corresponding edge node according to the actual request, retrieving the resource file stored in the corresponding edge node, and obtaining the resource file corresponding to the actual request, includes: Obtaining the actual request of the user to access the network content, and judging whether the actual request belongs to the recommendable content; If the actual request belongs to the recommendable content, obtaining a resource file corresponding to the actual request from the edge node; If the actual request does not belong to the recommendable content, a resource file corresponding to the actual request is obtained from a core node.
5. A content recommendation method based on a state machine as claimed in claim 3, It is characterized in that The pre-downloading, according to the recommendable content, resource files corresponding to the recommendable content from the core node, and caching the resource files in the edge node, includes: Obtain keywords for recommendable content, and call a recommendation engine in an edge node to send the keywords to a core node; According to the keyword, searching for a corresponding resource file from the core node; The resource file is sent to the edge node for storage.
6. A content recommendation method based on a state machine as claimed in claim 1, It is characterized in that After obtaining the actual request of the user to access the network content, locating the corresponding edge node according to the actual request, retrieving the resource file stored in the corresponding edge node from the corresponding edge node, and obtaining the resource file corresponding to the actual request, the method further includes arranging the resource files in the edge node according to the actual request of the user, specifically including: If the actual request needs to obtain network resources from the edge node, retaining the corresponding resource file in the edge node; If the actual request needs to obtain the corresponding network resources from the core node, the corresponding resource file in the edge node is cleared.
7. A content recommendation device based on a state machine, It is characterized in that The content recommendation device based on the state machine includes: An acquisition module, configured to acquire a user's history of accessing network content; A calculation module, configured to calculate a recommendation index of the accessed web content according to the historical records; a marking module, configured to compare the recommendation index with a threshold value and mark the recommendable content according to the comparison result; A recommendation module, configured to recommend the recommendable content to the user, and download resource files of the recommendable content from the core node, and store the resource files in the edge node; the resource files of the recommendable content include: resource files corresponding to keywords of the recommendable content in the core node; An output module, configured to obtain an actual request of a user to access network content, locate a corresponding edge node according to the actual request, retrieve the resource file stored in the corresponding edge node from the corresponding edge node, and obtain the resource file corresponding to the actual request; The calculation module is further configured to obtain keywords of the user's historical access to network content, and classify the keywords according to different network content; wherein the classification method includes: classifying the network content according to the keywords and the categories to which they belong; Calculate the recommendation index of the keyword, the calculation formula is shown in formula (1), In formula (1), is the recommendation index, whose value is between 0 and 1, λ is the recommendation coefficient of different keywords, which can use empirical values, and whose coefficient value is between 0 and 1, ∑N i is the number of network contents visited by users with the same keyword, i is the sequence number of the keyword, t now is the current time, t first The time when the first keyword of the same keyword is accessed.
8. A computer device comprising a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by one or more of the processors, the one or more processors perform the steps of the state machine-based internal recommendation method as described in any one of claims 1 to 6.
9. A storage medium storing computer-readable instructions, wherein when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the state machine-based content recommendation method as described in any one of claims 1 to 6.
