Address association centralized service method and its device, equipment, medium and product
Through a centralized address association service method, utilizing gateway queue services and caching mechanisms, the high maintenance cost problem in high-frequency ordering scenarios of independent sites on cross-border e-commerce platforms is solved, achieving efficient resource utilization and a robust user experience.
Patent Information
- Application Number
- CN202210836795.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-15
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2042-07-15
AI Technical Summary
The address-associative service deployment of independent sites on cross-border e-commerce platforms leads to high maintenance costs in high-frequency ordering scenarios, and it is difficult to balance service capabilities and cost control, affecting user experience.
A centralized address association service method is adopted, and queue services and cache mechanisms are provided through the gateway. Flow control is implemented according to the number of requests per unit time. The recommended address list is predicted by matching the zoning dictionary, and the mapping relationship is stored in the cache area to reduce the address query requests of independent stations.
It achieves efficient and robust resource utilization in high-frequency ordering scenarios, reduces maintenance costs, ensures user experience, and is suitable for independent station deployment on cross-border e-commerce platforms.
Smart Images

Figure CN115129803B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of e-commerce information technology, and in particular to an address association centralized service method and its corresponding device, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] The address association service is a basic service provided by the e-commerce platform. When a user enters a query statement, the e-commerce platform's server can call the address association service. The address association service predicts the address text based on the text in the query statement, making it convenient for the user to call and improve the user's input efficiency.
[0003] Traditional e-commerce platforms, because all online stores and users operate under the same platform mechanism, facilitate centralized processing of massive address query requests through a single service. Unlike traditional e-commerce platforms, cross-border e-commerce platforms typically utilize independent websites to operate each online store. These numerous independent websites are distributed across a wide range of regions, often globally. For example, the same merchant may have independent websites in China, the United States, and Europe. Even within the same region, independent websites for different merchants may be widely distributed.
[0004] Given this reality, if each independent site independently deploys address association services, implementation and maintenance costs for cross-border e-commerce platforms will naturally be high. This is especially true in specific application scenarios, such as high-frequency ordering during flash sales and Friday sales, where each independent site must effectively respond to address query services. If address association services are deployed separately on independent sites, the architecture and maintenance costs of each site will be high. If address association services are centrally deployed, high traffic control capabilities will be required across a distributed architecture over long distances.
[0005] Theoretically, high-frequency ordering scenarios have already taken into account the problem of high instantaneous traffic, but the address association service itself is not a scenario with particularly high requirements for timeliness. Therefore, in the subsequent process after placing an order in high-frequency ordering scenarios, how to balance the service capabilities and cost control of the address association service, maintain the robustness of the address association service, and ensure a good user experience are the directions that cross-border e-commerce platforms need to work on. Summary of the Invention
[0006] The purpose of this application is to solve the above problems and provide an address association centralized service method and its corresponding device, computer equipment, computer readable storage medium, computer program product,
[0007] To meet the various objectives of this application, the following technical solutions are adopted:
[0008] In one aspect, a method for providing an address association centralized service is provided to meet one of the purposes of the present application, including:
[0009] Responding to an address query request submitted by a user visiting an online store on any independent website, obtaining a query message body corresponding to the address query request, the query message body including region information, language information, and a query statement;
[0010] Querying the request volume per unit time of the gateway responsible for forwarding the address query request, and when the request volume per unit time exceeds a preset threshold, starting the queue service corresponding to the gateway to implement peak shaving processing of the query message body of the gateway;
[0011] Invoking an association execution module based on a query message body dequeued from a queue service, wherein the association execution module matches a word order feature corresponding to the language information in the query message body with a regional dictionary corresponding to the regional information to predict a list of recommended addresses corresponding to the query statement;
[0012] The recommended address list is pushed to the user via the gateway and the independent website, and the mapping relationship data between the query statement and the recommended address list is stored in a cache area corresponding to the gateway.
[0013] Optionally, the association execution module predicts a list of recommended addresses corresponding to the query statement by matching word order features corresponding to the language information in the query message body with a regional dictionary corresponding to the region information, including:
[0014] Segmenting the query using a word segmentation model corresponding to the word order feature to obtain a corresponding word segmentation set;
[0015] Calculate semantic similarity between each segmentation in the segmentation set and each district name in the district dictionary;
[0016] Determining a district name that is similar to each segmentation, wherein a district name whose semantic similarity with a segmentation reaches a preset threshold is determined as a district name similar to the segmentation;
[0017] According to the hierarchical nesting relationship of administrative divisions, the division names similar to each segmentation are concatenated according to the connection rules constrained by the word order features to obtain multiple recommended addresses and form a recommended address list.
[0018] Optionally, multiple recommended addresses are obtained to form a recommended address list, including:
[0019] Obtaining historical address data of the user, including one or more historical addresses;
[0020] Calculate the semantic similarity between each historical address and each recommended address, and normalize the semantic similarities corresponding to the same recommended address into a ranking score;
[0021] All recommended addresses are constructed into a recommended address list, wherein each recommended address is sorted in reverse order according to the sorting score.
[0022] Optionally, before calling the association execution module based on the query message body dequeued from the queue service, include:
[0023] A query is made from the cache area corresponding to the gateway to determine whether a recommended address list corresponding to the query statement is included. If so, the invocation of the association execution module based on the query message body dequeued from the queue service is skipped.
[0024] Optionally, before querying the request amount per unit time of the gateway responsible for forwarding the address query request, the following steps may be performed:
[0025] Detect whether the word length of the query statement in the query message body exceeds a preset threshold, and when it exceeds the preset threshold, directly respond to the address query request with a null value.
[0026] Optionally, before querying the request amount per unit time of the gateway responsible for forwarding the address query request, the following steps may be performed:
[0027] Monitoring the request volume per unit time of the plurality of distributedly deployed gateways, and setting the change rate of the request volume per unit time of each gateway as the resource usage weight of the corresponding gateway;
[0028] The length of the message queue used by each gateway in the queue service peak shaving process is set using its corresponding resource usage weight.
[0029] Optionally, starting a queue service corresponding to the gateway to implement peak shaving processing of query message bodies of the gateway includes:
[0030] Starting a queue service corresponding to the gateway, and having the queue service detect whether the time overhead of the associative execution module in processing a single query message body indicates that a blocking state has been reached;
[0031] When the blocking state is not reached, the query message body is transmitted to the queue service to be added to the message queue corresponding to the gateway, otherwise the association execution module is waited for to clear the blocking state, and the user who submitted the address query request returns the queue notification information.
[0032] On the other hand, an address association centralized service device is provided to meet one of the purposes of the present application, including a request response module, a queue activation module, a query execution module, and a result processing module, wherein the request response module is used to respond to an address query request submitted by a user visiting an online store of any independent station, and obtain a query message body corresponding to the address query request, wherein the query message body includes region information, language information and a query statement; the queue activation module is used to query the unit time request volume of the gateway responsible for forwarding the address query request, and when its unit time request volume exceeds a preset threshold, start the queue service corresponding to the gateway to implement peak shaving processing of the query message body of the gateway; the query execution module is used to call the association execution module based on the query message body dequeued from the queue service, and the association execution module predicts a recommended address list corresponding to the query statement based on the word order features corresponding to the language information in the query message body and the district dictionary corresponding to the region information; the result processing module is used to push the recommended address list to the user via the gateway and the independent station, and store the mapping relationship data between the query statement and the recommended address list in the cache area corresponding to the gateway.
[0033] Optionally, the query execution module includes: a word segmentation processing unit, used to segment the query statement using a word segmentation model corresponding to the word order feature to obtain a corresponding word segmentation set; a similarity calculation unit, used to calculate the semantic similarity between each word segmentation in the word segmentation set and each district name in the district dictionary; a district determination unit, used to determine the district name that is similar to each word segmentation, wherein the district name whose semantic similarity with the word segmentation reaches a preset threshold is determined as the district name similar to the word segmentation; an address construction unit, used to concatenate the district names similar to each word segmentation according to the hierarchical nesting relationship of the administrative divisions according to the connection rules constrained by the word order feature, to obtain multiple recommended addresses and form a recommended address list.
[0034] Optionally, the address construction unit includes: a history call subunit, used to obtain the user's historical address data, including one or more historical addresses; a score calculation subunit, used to calculate the semantic similarity between each historical address and each recommended address, and normalize the semantic similarities corresponding to the same recommended address into a ranking score; a list construction subunit, used to construct all recommended addresses into a recommended address list, wherein each recommended address is sorted in reverse order according to the ranking score.
[0035] Optionally, prior to the query execution module, it includes: a cache query module, which is used to query whether the recommended address list corresponding to the query statement is included in the cache area corresponding to the gateway. When it exists, it skips calling the associative execution module based on the query message body dequeued from the queue service.
[0036] Optionally, prior to the queue activation module, it includes: a pre-filtering module for detecting whether the word length of the query statement in the query message body exceeds a preset threshold, and when it exceeds the preset threshold, directly responding to the address query request with a null value.
[0037] Optionally, prior to the queue activation module, it includes: a weight statistics module, which is used to monitor the unit time request volume of multiple gateways deployed in a distributed manner, and set the change rate of the unit time request volume of each gateway as the resource usage weight of the corresponding gateway; a weight matching module, which is used to set the length of the message queue used by each gateway in the queue service peak shaving process using its corresponding resource usage weight.
[0038] Optionally, the queue activation module includes: a status determination unit, used to start the queue service corresponding to the gateway, and the queue service detects whether the time overhead of the associative execution module in processing a single query message body indicates that a blocking state has been reached; a queuing processing unit, used to transmit the query message body to the queue service to add it to the message queue corresponding to the gateway when the blocking state has not been reached, otherwise wait for the associative execution module to clear the blocking state, and at the same time, the user who submitted the address query request returns the queuing notification information.
[0039] On the other hand, a computer device provided to meet one of the purposes of the present application includes a central processing unit and a memory, wherein the central processing unit is used to call and run a computer program stored in the memory to execute the steps of the address association centralized service method described in the present application.
[0040] On the other hand, a computer-readable storage medium is provided to meet another purpose of the present application, which stores a computer program implemented according to the address association centralized service method in the form of computer-readable instructions. When the computer program is called and run by a computer, it executes the steps included in the method.
[0041] On the other hand, a computer program product provided to meet another purpose of the present application includes a computer program / instruction, which, when executed by a processor, implements the steps of the address association centralized service method described in any embodiment of the present application.
[0042] Compared with the existing technology, this application has many advantages, including but not limited to:
[0043] This application takes into account the actual situation that the address association service in the high-frequency order scenario has obvious changes in traffic, but the timeliness requirements are not too high. It changes the idea and deploys the address association service based on independent stations as a centralized service, centrally responds to the address query requests submitted by each independent station, provides queue services based on gateways, implements flow control according to the gateway's request volume per unit time, and establishes a data caching mechanism for the recommended address list. It can use limited system resources to adaptively adjust the service of address query requests triggered in independent stations in various regions according to the dynamic changes in the request volume of gateways in widely distributed regions. It can not only moderately expand the traffic capacity of individual gateways, but also maintain a low cost, and always maintain the overall robustness of the centralized service, so as to achieve economies of scale in terms of economic benefits and resource expenditure. It is suitable for the deployment of cross-border e-commerce platforms based on independent stations. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0045] Figure 1 This is a flowchart of a typical embodiment of the address association centralized service method of the present application.
[0046] Figure 2 This is a flow chart of the association execution module determining a recommended address list according to a query statement in an embodiment of the present application.
[0047] Figure 3 This is a flow chart of determining the sorting relationship of a recommended address list based on a user's historical address data in an embodiment of the present application.
[0048] Figure 4 This is a functional block diagram of the address association centralized service device of this application.
[0049] Figure 5 This is a schematic diagram of the structure of a computer device used in this application. DETAILED DESCRIPTION
[0050] The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and are not to be construed as limiting the present application.
[0051] It will be understood by those skilled in the art that, unless expressly stated otherwise, the singular forms "a", "an", "said" and "the" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, "connected" or "coupled" as used herein may include wireless connections or wireless couplings. The term "and / or" used herein includes all or any units and all combinations of one or more associated listed items.
[0052] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0053] It will be understood by those skilled in the art that the terms "client," "terminal," and "terminal device" as used herein include both devices that are wireless signal receivers, i.e., devices that only have wireless signal receivers without transmission capabilities, and devices that have receiving and transmitting hardware capable of two-way communication over a two-way communication link. Such devices may include: cellular or other communication devices such as personal computers and tablet computers, which have single-line displays, multi-line displays, or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service), which may combine voice, data processing, fax, and / or data communication capabilities; PDA (Personal Digital Assistant), which may include a radio frequency receiver, a pager, Internet / Intranet access, a web browser, a notepad, a calendar, and / or a GPS (Global Positioning System) receiver; and conventional laptop and / or palmtop computers or other devices, which have and / or include a radio frequency receiver. As used herein, the terms "client," "terminal," or "terminal device" may be portable, transportable, or installed in a vehicle (air, sea, and / or land), or may be adapted and / or configured to operate locally and / or in a distributed manner at any other location on Earth and / or in space. As used herein, the terms "client," "terminal," or "terminal device" may also refer to a communication terminal, an Internet terminal, or a music / video playback terminal, such as a PDA, an MID (Mobile Internet Device), and / or a mobile phone with music / video playback capabilities, or may include a smart TV, a set-top box, or other device.
[0054] The hardware referred to by names such as "server", "client", and "service node" in this application is essentially an electronic device with capabilities equivalent to those of a personal computer. It is a hardware device that has the necessary components revealed by the von Neumann principle, such as a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device. Computer programs are stored in its memory, and the central processing unit loads the program stored in the external memory into the internal memory for execution, executes the instructions in the program, and interacts with the input and output devices to complete specific functions.
[0055] It should be noted that the concept of "server" referred to in this application can also be extended to server clusters. Based on the network deployment principles understood by those skilled in the art, the servers described should be logically divided. In physical space, these servers can be independent of each other but callable through interfaces, or integrated into a single physical computer or a computer cluster. Those skilled in the art should understand this flexibility and should not use it to constrain the implementation of the network deployment method of this application.
[0056] Unless expressly specified, one or more technical features of the present application can be deployed on a server for implementation and accessed by a client through a remote call to obtain an online service interface provided by the server, or can be directly deployed and run on a client for implementation.
[0057] Unless expressly specified otherwise, the neural network models referenced or may be referenced in this application may be deployed on a remote server and remotely called on the client, or may be deployed and directly called on a client with sufficient device capabilities. In some embodiments, when it runs on the client, its corresponding intelligence may be obtained through transfer learning to reduce the requirements for the client's hardware operating resources and avoid excessive occupation of the client's hardware operating resources.
[0058] Unless explicitly specified, the various data involved in this application can be stored remotely on a server or on a local terminal device, as long as they are suitable for being called by the technical solution of this application.
[0059] Those skilled in the art should be aware that although the various methods of this application are described based on the same concept and thus exhibit commonality, unless otherwise specified, these methods can be independently executed. Similarly, the various embodiments disclosed in this application are all based on the same inventive concept. Therefore, concepts with the same expression, as well as concepts that are appropriately transformed for convenience despite different expression, should be understood as equivalent.
[0060] Unless expressly stated to be mutually exclusive, the various embodiments disclosed in this application may be cross-combined with the relevant technical features of the various embodiments to flexibly construct new embodiments, as long as such combination does not deviate from the creative spirit of this application and can meet the needs of the prior art or resolve certain deficiencies in the prior art. Those skilled in the art should be aware of such flexibility.
[0061] An address association centralized service method of the present application can be programmed as a computer program product and deployed in a client or server for execution. For example, in the exemplary application scenario of the present application, it can be deployed and implemented in the server of an e-commerce platform. The method can be executed by accessing the interface opened after the computer program product is run and performing human-computer interaction with the process of the computer program product through a graphical user interface.
[0062] See also Figure 1 In a typical embodiment, the address association centralized service method of the present application includes the following steps:
[0063] Step S2200: responding to an address query request submitted by a user accessing an online store on any independent website, obtaining a query message body corresponding to the address query request, the query message body including region information, language information, and a query statement;
[0064] In the exemplary cross-border e-commerce platform application scenario of the present application, an exemplary network architecture corresponding to the address association service is deployed, and a computer program product implemented according to the technical solution of the application is installed on a single server (or service cluster), and the various steps of the present application are executed when the computer program product is running, thereby realizing the centralized provision of address association services for a large number of independent stations widely distributed in a region or even the world. One or more gateways can be set up in each region, and each gateway can be responsible for forwarding address query requests between the independent station and the server. Users can access the web page of the online store provided by any independent station through any terminal device, and trigger the address query request on demand according to the business logic preset by the web page. The address query request triggered by the user is submitted to the corresponding independent station, and the independent station submits the request to its corresponding gateway, which is forwarded by the gateway to the server for centralized processing. Correspondingly, after the service obtains the corresponding recommended address list based on the address query request, it can also return to the original path and deliver the recommended address list to the corresponding terminal device, which is parsed and displayed by the terminal device.
[0065] The page in an online store that can trigger an address query request is typically the checkout and logistics page for listed products or the user's communication address information editing page. The checkout and logistics page is a page where the user needs to provide logistics information corresponding to the shipping address after placing an order for a listed product; the address information editing page is a page specifically provided for users to edit their own contact addresses. In any case, the page can be pre-configured with the business logic that triggers the address query request. When the user's operation meets the corresponding preset conditions, such as entering partial address information and operating the confirmation submit control, the corresponding address query request is triggered and submitted to the independent website.
[0066] When the server of the present application receives an address query request submitted by any user from any store, it can parse the address query request. The address query request usually includes the local address information entered by the user on the corresponding page. The local address information is used as a query statement, and is further superimposed with regional information for distinguishing countries or regions, as well as language information corresponding to the language used by the user. In one embodiment, the regional information can also be added by an independent station. In any case, a query message body can be parsed from the address query request arriving at the server, and the query message body at least includes the regional information, language information and query statement.
[0067] It's easy to understand that languages are diverse worldwide. Multiple languages may exist in the same region, each with its own script. Languages are distinguished internationally by their respective scripts, such as Chinese, English, Spanish, and Arabic. If multiple scripts exist in the same region, such as Simplified Chinese and Traditional Chinese, these can technically be treated as two separate languages. In such cases, including both region and language information in the query message body refines the information granularity and helps provide a more comprehensive address association service.
[0068] Step S2400: querying the request volume per unit time of the gateway responsible for forwarding the address query request. When the request volume per unit time exceeds a preset threshold, starting the queue service corresponding to the gateway to implement peak shaving processing of the query message body of the gateway;
[0069] Each gateway in each region is responsible for forwarding address query requests from independent sites in its corresponding region. Therefore, we can obtain the corresponding request volume per unit time for each gateway in real time, that is, the number of requests forwarded to the server via the gateway per unit time. This is usually expressed in QPS (Queries Per Second), which is the number of query requests per second.
[0070] It's easy to understand that when a gateway's request volume per unit time is too high, it will affect the load on the gateway and even the server. However, in practice, for a large number of gateways distributed across the globe, it's common for some gateways to have higher request volumes per unit time, while others have lower volumes. For example, Western countries experience higher shopping demand on Fridays, leading to a sharp increase in order traffic on independent websites every Friday, while this doesn't happen in some other countries. Another example is that in China, during various shopping festivals defined by merchants, the number of orders on that day surges, while independent websites in other countries don't experience this phenomenon. To address this situation, a mechanism can be set up to flexibly handle changes in the gateway's request volume per unit time.
[0071] In one embodiment, when each address query request arrives, the server queries the request volume per unit time of the gateway providing the address query request, and then compares the query volume with a preset threshold to determine whether the gateway's request volume per unit time is too high. The preset threshold can be an empirical threshold preset based on prior knowledge, or a preset value slightly higher than the average request volume per unit time of all gateways. In another embodiment, the 80 / 20 theorem can be implemented to proportionally adjust the preset threshold so that 20% of the gateways are classified as gateways with excessive request volume per unit time, while the remaining 80% of the gateways are classified as gateways with normal request volume per unit time. This ensures that more efficient services are provided to the 20% of gateways, thereby achieving efficient utilization of system resources corresponding to address association services.
[0072] When the number of requests per unit time of a gateway does not exceed the preset threshold, it indicates that the gateway is in a normal state. At this time, the association execution module can be directly called to perform address association, and the corresponding recommended address can be associated according to the query message body. The recommended address list is constructed and returned to the user who submitted the address query request.
[0073] When the number of requests per unit time for a gateway exceeds the preset threshold, which is the upper threshold, the gateway is in an overflow state as determined by the server of this application. Therefore, a queue service is required for the gateway to achieve peak shaving of the large number of address query requests to the gateway through the queue service. When there are multiple gateways in an overflow state, queue services can be provided for each gateway. Each gateway can obtain a corresponding message queue, and the query message bodies corresponding to its address query requests can be serially queued through the message queue according to the message queue's first-in-first-out access rules. When the message queue is blocked, the query message bodies to be queued can remain in a waiting state until the message queue clears its blockage, at which point they can be queued again, thereby achieving moderate peak shaving of the large number of query message bodies triggered instantaneously by the corresponding gateway. Each gateway in an overflow state can maintain the robustness of the address association service in this manner. Since the address association service does not affect the success of the user's flash sale operation, but the address query requests corresponding to the address association service in the flash sale scenario are relatively high, this approach can effectively regulate the smoothness of address query request processing for each gateway, ensuring that users can successfully place orders, while its implementation cost is relatively low.
[0074] In one embodiment, a lower threshold can be preset. When a gateway's request volume per unit time falls below the lower threshold, it can be considered that the gateway's request volume per unit time is low. The queue service for this gateway can be shut down, the corresponding message queue for this gateway can be recycled, and its query message body can be directly forwarded to the association execution module for processing. In this way, gateways with lower traffic can receive priority service because they are less likely to have a significant impact on the overall address association service.
[0075] Step S2600: Invoke an association execution module based on the query message body dequeued from the queue service, and the association execution module predicts a list of recommended addresses corresponding to the query statement by matching word order features corresponding to the language information in the query message body with a regional dictionary corresponding to the region information;
[0076] Each gateway's corresponding queue service dequeues its message queue based on its inherent business logic and the first-in-first-out (FIFO) access rules of the message queue. It dequeues one query message at a time. Query messages dequeued from any message queue are consumed by the corresponding consumer thread.
[0077] The consumer thread takes the query message body dequeued from the message queue of each gateway as an input parameter, calls the corresponding interface of the association execution module, passes the query message body through the interface, and drives the association execution module to determine the corresponding recommended address list based on the query message body.
[0078] It can be seen that in this application, corresponding consumption mechanisms are set for the message queues of each gateway, and the associative execution module is called in parallel to ensure that the address query requests corresponding to different gateways can be consumed in parallel. As long as the corresponding query message body can be dequeued through its corresponding message queue, it can obtain the service of the associative execution module and obtain its corresponding recommended address list.
[0079] In one embodiment, the association execution module is implemented to first determine the word order features corresponding to the language information specified in the query message body. For example, for Chinese, since the administrative divisions of Chinese addresses are arranged from largest to smallest, the word order features are sorted from left to right; for English, since the administrative divisions of English addresses are arranged from smallest to largest, the word order features are sorted from right to left. As can be seen, word order features will determine how the recommended addresses are constructed. Therefore, for the global service provided by this application, determining word order features based on language information is a key item.
[0080] After the associative execution module determines the word order features, it further determines the corresponding division dictionary based on the regional information in the query message body. The division dictionary is used to store the administrative division information officially announced by the country or address specified by the regional information. In one embodiment, the division dictionary can use a tree structure to store the division names of each level in the administrative division information, store each division name as a node in the tree, and establish a nested connection relationship between the upper node and the lower node based on the nested relationship of the administrative divisions. The division dictionary corresponding to each country or region is constructed in this way, thereby obtaining the division dictionaries corresponding to countries and regions around the world, and each division dictionary can be associated with its corresponding regional information and stored for future reference. Accordingly, when regional information is provided in the query message body, the corresponding division dictionary can be determined based on the regional information query to serve the operation of the associative execution module.
[0081] After the associative execution module determines the zoning dictionary corresponding to the query message body, it matches multiple candidate addresses in the zoning dictionary according to the query statement in the query message body. The query statement is usually the partial address information in a complete address information input by the user. For example, for an address such as "Nancun Town, Panyu District, Guangzhou City, Guangdong Province...", the user may enter a query statement such as "Panyu Nancun". For the query statement provided by the user, the associative execution module can first segment it to determine its segmentation sequence, and finally obtain words such as "Panyu" and "Nancun". Then, in the zoning dictionary, all possible paths to the two nodes "Panyu" and "Nancun" are queried, where "Nancun" is the lower node of "Panyu". Thus, all adjacent or identical nodes corresponding to "Nancun" can be found, and candidate addresses are constructed according to the word order features. For example, the following addresses are determined:
[0082] “Nancun Town, Panyu District, Guangzhou City, Guangdong Province, China”
[0083] “Guantang Village, Nancun Town, Panyu District, Guangzhou City, Guangdong Province, China”
[0084] “Dashi Town, Panyu District, Guangzhou City, Guangdong Province, China”
[0085] “Hualong Town, Panyu District, Guangzhou City, Guangdong Province, China”
[0086] …
[0087] In one embodiment, for the determined candidate addresses, the association execution module can also use the user's historical address data to perform semantic similarity matching with each candidate address, retaining candidate addresses with higher semantic similarity and deleting candidate addresses with lower semantic similarity to make the matching results more accurate.
[0088] All candidate addresses that are finally retained can be directly encapsulated into a recommended address list. The number of address entries included in the recommended address list can also be preset, for example, set to a smaller number in order to save the bandwidth of the entire network architecture.
[0089] In other embodiments, the association execution module may also adopt other methods to predict the corresponding recommended address list based on the query message body. The implementation method is very flexible and does not affect the embodiment of the creative spirit of this application.
[0090] Step S2800: Push the recommended address list to the user via the gateway and the independent website, and store the mapping relationship data between the query statement and the recommended address list in a cache area corresponding to the gateway.
[0091] After each query message body is processed by the Lenovo execution module and its corresponding recommended address list is obtained, the corresponding consumer thread can return the recommended address list through the corresponding gateway and the corresponding independent station, and push it to the terminal device where the corresponding user is located. The terminal device will parse and display it, usually as a drop-down list of the address input box on the page where the user enters the query statement. The user can then choose one from the list and enter it into the address input box to achieve quick input.
[0092] For the address association service of the present application, in order to facilitate the subsequent provision of fast access services to the gateway, the recommended address list obtained can be associated with the corresponding query statement to construct mapping relationship data, and the mapping relationship data can be stored in the cache area corresponding to the gateway, so that for subsequent similar or identical query statements provided by the gateway, the recommended address list can be matched directly from the cache area, skipping the corresponding steps of the queue service, thereby improving the response rate in high concurrency scenarios.
[0093] The cache areas are set up in a one-to-one correspondence with the gateways, mainly considering that the areas served by each gateway are targeted. Therefore, the areas covered by different gateways generally do not overlap. In this way, each cache area can be very small and can be quickly created and destroyed on demand. Scheduling is very convenient, and the overall efficiency of the address association service of this application is guaranteed.
[0094] It can be seen from the above embodiments that the present application has many advantages, including but not limited to:
[0095] This application takes into account the actual situation that the address association service in the high-frequency order scenario has obvious changes in traffic, but the timeliness requirements are not too high. It changes the idea and deploys the address association service based on independent stations as a centralized service, centrally responds to the address query requests submitted by each independent station, provides queue services based on gateways, implements flow control according to the gateway's request volume per unit time, and establishes a data caching mechanism for the recommended address list. It can use limited system resources to adaptively adjust the service of address query requests triggered in independent stations in various regions according to the dynamic changes in the request volume of gateways in widely distributed regions. It can not only moderately expand the traffic capacity of individual gateways, but also maintain a low cost, and always maintain the overall robustness of the centralized service, so as to achieve economies of scale in terms of economic benefits and resource expenditure. It is suitable for the deployment of cross-border e-commerce platforms based on independent stations.
[0096] Optionally, the association execution module predicts a list of recommended addresses corresponding to the query statement based on the word order features corresponding to the language information in the query message body and the regional dictionary corresponding to the region information. Figure 2 ,include:
[0097] Step S2610: Segment the query using a segmentation model corresponding to the word order feature to obtain a corresponding segmentation set;
[0098] In this embodiment, after the associative execution module determines the corresponding word order features based on the language information in the query message body, it calls the word segmentation model corresponding to the specific language information and word order features to query the query statement. The word segmentation model can be specially trained corresponding to the language information and word order features so that its individual word segmentation functions can be stronger and more accurate.
[0099] In one embodiment, the word segmentation model may be implemented using a statistics-based algorithm, such as the N-Gram algorithm. Different word lengths may be set, and word segmentation corresponding to different word lengths may be performed on the query statement to finally obtain a word segmentation set.
[0100] In another embodiment, a deep learning-based model may be used to construct the word segmentation model. The word segmentation model acquires corresponding word segmentation capabilities under training with training samples of corresponding languages and corresponding word orders, and can quickly determine the word segmentation set of a given query statement.
[0101] Step S2620: Calculate semantic similarity between each segmentation in the segmentation set and each district name in the district dictionary;
[0102] Each word in the word set can be embedded to obtain its corresponding embedding vector. Similarly, each district name in the district dictionary is also pre-embedded to obtain its own embedding vector. Based on this, the data distance between each word and the district dictionary can be calculated based on the embedding vector, and the data distance can be normalized to the semantic similarity between the corresponding word and the corresponding district name. In this way, each word can determine the district name with a high semantic similarity.
[0103] In one embodiment, based on each of the embedding vectors, its deep semantic information can be extracted with the help of a text feature extraction model to determine its deep semantic vector, and then the semantic similarity between each word segmentation and each district name can be calculated based on the respective deep semantic vectors.
[0104] When calculating the data distance, any feasible algorithm such as cosine similarity algorithm, Euclidean distance algorithm, Pearson correlation coefficient algorithm, etc. can be used for implementation.
[0105] Step S2630: Determine the district names that are similar to each segmentation, wherein the district names whose semantic similarity with the segmentation reaches a preset threshold are determined as district names similar to the segmentation;
[0106] After determining the semantic similarity between each segmented word and each district name, the district names similar to each segmented word can be screened. For each segmented word, a predetermined number, such as five, of district names with high semantic similarity can be screened. Thus, each segmented word corresponds to a predetermined number of district names, which are similar to the corresponding segmented word. The determined district names can be associated with hierarchical information in the administrative division system to which they belong.
[0107] Step S2640: Based on the hierarchical nesting relationship of administrative divisions, the division names similar to each segmentation are concatenated according to the connection rules constrained by the word order features to obtain multiple recommended addresses and form a recommended address list.
[0108] The district dictionary has already established a tree structure of administrative divisions at each level according to the hierarchical nesting relationship of the corresponding countries or regions. Therefore, for similar district names corresponding to each word segment, the similar district names of the upper and lower levels can be spliced in order according to the hierarchical nesting relationship and combined with the word order features in the query message body to obtain multiple character strings as recommended addresses, and then these recommended addresses can be constructed into a recommended address list.
[0109] According to this embodiment, it can be understood that when semantic matching is performed between the word segmentation based on the query statement and the district names in the district dictionary, a deeper semantic understanding can be achieved with the help of semantics, and more similar district names can be recalled as comprehensively and accurately as possible to determine a more effective recommended address list.
[0110] Optionally, get multiple recommended addresses to form a recommended address list, see Figure 3 ,include:
[0111] Step S2641: Acquire the user's historical address data, which includes one or more historical addresses;
[0112] Before constructing the recommended address list, this embodiment can optimize the recommended addresses based on the user's historical data. To this end, the user's historical address data is obtained. The historical address data is the valid historical addresses entered by the user during historical shopping processes, and the number of historical address data depends on the user's actual activities. Since each user's life scene usually does not change much, their address information usually does not change much. For example, after someone moves from one city to another in the same province, the subsequent changes in their address information may be limited to the latter city. Taking advantage of this feature, calling the user's historical address data to perform a rough verification of the recommended address can improve the quality of the recommended address.
[0113] Step S2642: Calculate the semantic similarity between each historical address and each recommended address, and normalize the semantic similarities corresponding to the same recommended address into a ranking score;
[0114] Furthermore, a text feature extraction model that has been pre-trained to a convergence level is used to extract the deep semantic vectors of the historical addresses and recommended addresses respectively, and then the semantic similarity of the deep semantic vector of each historical address and the deep semantic vector of each recommended address is calculated, and finally the semantic similarity corresponding to each recommended address and each historical address is obtained. For this, the multiple semantic similarities corresponding to each recommended address can be normalized, and the normalized value corresponding to each recommended address can be determined as its ranking score, thereby realizing the scoring operation for each recommended address.
[0115] In one embodiment, the normalization method for each semantic similarity is to use the two highest semantic similarities and calculate the average of the two as the normalized value. This normalization method is used to filter out significantly different historical address pair ranking scores and improve the reliability of the ranking score.
[0116] The method of calculating the semantic similarity can be implemented by using any data distance algorithm mentioned above.
[0117] Step S2643: construct all recommended addresses into a recommended address list, wherein each recommended address is sorted in reverse order according to the ranking score.
[0118] After determining the ranking score of each recommended address, the recommended addresses may be sorted according to the ranking score, thereby forming a recommended address list.
[0119] It is not difficult to understand based on the above embodiments that after the associative execution module optimizes the recommended addresses with reference to the historical address data of the same user, it can effectively sort out the order of the recommended addresses, so that the obtained recommended address list can more efficiently represent the recommended addresses that are similar to the query statement entered by the user, thereby facilitating the improvement of the efficiency of users calling recommended addresses.
[0120] Optionally, before calling the association execution module based on the query message body dequeued from the queue service, include:
[0121] Step S2500: query the cache area corresponding to the gateway to see whether it contains a recommended address list corresponding to the query statement. If it exists, skip calling the association execution module based on the query message body dequeued from the queue service.
[0122] In this embodiment, since the address association service of the present application can create a corresponding cache area for each gateway, after each gateway already has a corresponding cache area, for subsequent address query requests forwarded by the gateway, before executing step S2600, the corresponding cache area of the gateway can be checked to see whether it contains a recommended address list corresponding to the query statement carried by the address query request. If a corresponding recommended address list exists, step S2600 is skipped and step S2800 is executed, that is, the recommended address list is returned to the user's terminal device. Only if the cache area does not exist, execution continues from step S2600.
[0123] It should be pointed out that when querying whether there is a recommended address list corresponding to the query statement in the cache area, it can be based on either an exact matching query method or a fuzzy matching query method to find out whether there is mapping relationship data containing the query statement, and then call the recommended address list in the mapping relationship data.
[0124] Alternatively, the semantic similarity calculation method described above can be used to calculate the semantic similarity between the query statement corresponding to the address query request and the query statement of the mapping relationship data in the cache area, and then the recommended address list in the mapping relationship data with the highest similarity is selected as the matched recommended address list for return to the user.
[0125] This embodiment can further improve the response efficiency of the address association service of this application by reusing the historical data in the cache area corresponding to each gateway. In particular, when the number of requests per unit time of the gateway in a region increases dramatically, a part of the recommended address list can be quickly reused from its corresponding cache area, reducing the call to the association execution module, and improving the overall service efficiency.
[0126] Optionally, before querying the request amount per unit time of the gateway responsible for forwarding the address query request, the following steps may be performed:
[0127] Step S2300: Detect whether the word length of the query statement in the query message body exceeds a preset threshold. When it exceeds the preset threshold, directly respond to the address query request with a null value.
[0128] When the address association service of the present application is in a busy state, or in other words, when some gateways are processing a surge in traffic, it is economical and even necessary to filter some address query requests corresponding to the non-rigid address association service. Therefore, one way is to detect the word length of the query statement in the query message body of the address query request after the gateway sends the address query request to the server of the present application. A preset threshold can be provided, and the word length is compared with the preset threshold. If the word length of the query statement entered by the user is higher than the preset threshold, it is deemed unnecessary to provide the address association service to the user, and there is no need to execute the business logic after step S2400. Instead, the address query request is directly responded to with a null value, thereby effectively reducing the load of the server of the present application and ensuring that the server reserves more system resources for implementing global services.
[0129] Optionally, before querying the request amount per unit time of the gateway responsible for forwarding the address query request, the following steps may be performed:
[0130] Step S1100: monitoring the request volume per unit time of the plurality of distributedly deployed gateways, and setting the change rate of the request volume per unit time of each gateway as the resource usage weight of the corresponding gateway;
[0131] The server of the present application can implement a monitoring process for monitoring the unit time request volume of a part or all of the gateways of the distributed deployment of the present application, and is responsible for counting the rate of change of the unit time request volume of each gateway. It is not difficult to understand that the gateway with a larger rate of change indicates that the increase in the address query request passing through it is larger or smaller, and the gateway with a smaller rate of change indicates that the flow of address query request passing through it is more moderate. In any case, the corresponding rate of change of each gateway can be quantified and set as the resource usage weight of the corresponding gateway, providing information characterizing the resource demand amplitude of the corresponding gateway.
[0132] Step S1200: For each gateway, use its corresponding resource usage weight to set the length of the message queue used in the queue service peak shaving process.
[0133] As a clever application of this embodiment, the message queue used in this application no longer uses a fixed length, but instead uses the resource usage weight of each gateway to adjust the queue length of the message queue of the corresponding gateway, that is, the message queue is implemented as a variable-length message queue. As a result, the greater the resource usage weight, the longer the length of its message queue, and the longer the queuing time of the query message body; conversely, the shorter the message queue, the shorter the queuing time of the query message body. When the address query request of a gateway increases sharply, the address association service of this application can correspondingly expand the length of its message queue, so that the queuing time of the address query request becomes longer, and the speed at which the query message body is dequeued from the message queue becomes slower, thereby effectively controlling the load of the association operation module as a downstream task. When the address query request of a gateway decreases sharply, the address association service of this application correspondingly reduces the length of its message queue, so that the response time of the address query request becomes shorter, and the speed at which the query message body is dequeued from the message queue becomes faster. It can be seen that although it is necessary to serve a large number of address query requests forwarded by a large number of gateways, since the message queue length of each gateway can be dynamically adjusted according to the resource usage weight corresponding to each gateway, the server of this application can use limited system resources to complete centralized services for a large number of gateways, forming an adaptive adjustment mechanism, and ensuring the overall robustness of providing centralized services.
[0134] It can be seen from this that dynamically adjusting the system resources used by the address association service of this application to adapt to various changes in order traffic can give play to the institutional advantages and adapt to gateways with increased or decreased request volume per unit time. On the one hand, it can perform appropriate peak-shaving processing on them, and on the other hand, it can open a caching mechanism for these gateways. On this basis, combined with the adjustment of the message queue, it can achieve overall balanced utilization of system resources and ensure the robustness of providing address association services. It is particularly suitable for deployment in cross-border e-commerce platforms based on independent stations.
[0135] Optionally, starting a queue service corresponding to the gateway to implement peak shaving processing of query message bodies of the gateway includes:
[0136] Step S2410: Start the queue service corresponding to the gateway, and let the queue service detect whether the time overhead of the associative execution module in processing a single query message body indicates that a blocking state has been reached;
[0137] In this embodiment, the associative execution module calculates the time overhead for processing each query message body and returning the corresponding recommended address list. Then, the associative execution module also provides the time overhead when returning the recommended address list.
[0138] Therefore, for the query message body corresponding to the next address query request, after starting the queue service corresponding to the gateway, the queue service of this application will first detect whether the time overhead returned by the Lenovo execution module indicates that a blocking state has been reached, so as to distinguish different situations and make corresponding processing.
[0139] In one embodiment, an average time cost can be calculated by obtaining multiple time costs continuously returned by the associative execution module, and then the average time cost is compared with a preset duration. When the average time cost is higher than the preset duration, it is determined that the associative execution module has reached a blocking state, otherwise it has not reached a blocking state.
[0140] In another embodiment, the proportion of time overheads exceeding a preset duration can be counted by obtaining multiple time overheads continuously returned by the associative execution module. When the proportion reaches a preset proportion, for example 60%, it can be determined that the associative execution module has reached a blocking state, otherwise it has not reached a blocking state.
[0141] Of course, in one embodiment, a single time overhead may be compared with a preset duration to determine whether the blocking state is reached.
[0142] Step S2420: When the blocking state is not reached, the query message body is transmitted to the queue service to be added to the message queue corresponding to the gateway. Otherwise, the blocking state is cleared by the association execution module, and the user who submitted the address query request returns the queue notification information.
[0143] When the association execution module has not reached a blocking state as determined in the previous step, it indicates that the current query message body can be transmitted to the queue service in accordance with the default business logic and the embodiments described in the previous text of this application, so that the queue service can add the query message body to the message queue corresponding to the gateway for corresponding processing.
[0144] When the associative execution module has reached the blocking state, it indicates that the downstream task is overloaded. Therefore, at this time, a timer can be started to queue the corresponding query message body for a countdown. After the countdown ends, return to the step to continue to determine whether the associative execution module has reached the blocking state. This cycle is repeated multiple times until the current query message body successfully enters the message queue, or until the query message body is discarded after a preset number of cycles and the notification information corresponding to the call failure is returned.
[0145] During the execution of the queuing service logic of this embodiment, a queuing notification message may be first returned to the user to improve the user experience.
[0146] Based on the above embodiments, it is not difficult to understand that the present application can further take into account the response capabilities of downstream tasks, namely the association execution module, and control the front-end enqueue process, so that the operation of the entire address association service is more robust, ensuring that the centralized service capabilities of the address association service can be effectively guaranteed.
[0147] See also Figure 4 , an address association centralized service device is provided to meet one of the purposes of the present application, which is a functional embodiment of the address association centralized service method of the present application. The device includes a request response module 2200, a queue activation module 2400, a query execution module 2600, and a result processing module 2800, wherein the request response module 2200 is used to respond to the address query request submitted by the user visiting the online store of any independent station, and obtain the query message body corresponding to the address query request, and the query message body includes regional information, language information and query statement; the queue activation module 2400 is used to query the request volume per unit time of the gateway responsible for forwarding the address query request, when its single When the bit time request amount exceeds a preset threshold, the queue service corresponding to the gateway is started to implement peak shaving processing of the query message body of the gateway; the query execution module 2600 is used to call the association execution module based on the query message body dequeued from the queue service, and the association execution module matches the regional dictionary corresponding to the regional information according to the word order features corresponding to the language information in the query message body to predict the recommended address list corresponding to the query statement; the result processing module 2800 is used to push the recommended address list to the user via the gateway and the independent station, and store the mapping relationship data between the query statement and the recommended address list in the cache area corresponding to the gateway.
[0148] Optionally, the query execution module 2600 includes: a word segmentation processing unit, used to use a word segmentation model corresponding to the word order feature to segment the query statement and obtain a corresponding word segmentation set; a similarity calculation unit, used to calculate the semantic similarity of each word segmentation in the word segmentation set and each district name in the district dictionary; a district determination unit, used to determine the district name that is similar to each word segmentation, wherein the district name whose semantic similarity with the word segmentation reaches a preset threshold is determined as the district name similar to the word segmentation; an address construction unit, used to concatenate the district names similar to each word segmentation according to the connection rules constrained by the word order feature based on the hierarchical nesting relationship of the administrative divisions, to obtain multiple recommended addresses and form a recommended address list.
[0149] Optionally, the address construction unit includes: a history call subunit, used to obtain the user's historical address data, including one or more historical addresses; a score calculation subunit, used to calculate the semantic similarity between each historical address and each recommended address, and normalize the semantic similarities corresponding to the same recommended address into a ranking score; a list construction subunit, used to construct all recommended addresses into a recommended address list, wherein each recommended address is sorted in reverse order according to the ranking score.
[0150] Optionally, prior to the query execution module 2600, it includes: a cache query module, used to query from the cache area corresponding to the gateway whether it contains a recommended address list corresponding to the query statement, and when it exists, skip calling the associative execution module based on the query message body dequeued from the queue service.
[0151] Optionally, prior to the queue activation module 2400, it includes: a pre-filtering module for detecting whether the word length of the query statement in the query message body exceeds a preset threshold, and when it exceeds the preset threshold, directly responding to the address query request with a null value.
[0152] Optionally, prior to the queue activation module 2400, it includes: a weight statistics module, which is used to monitor the unit time request volume of multiple gateways deployed in a distributed manner, and set the change rate of the unit time request volume of each gateway as the resource usage weight of the corresponding gateway; a weight matching module, which is used to set the length of the message queue used by each gateway in the queue service peak shaving processing process using its corresponding resource usage weight.
[0153] Optionally, the queue activation module 2400 includes: a status determination unit, used to start the queue service corresponding to the gateway, and the queue service detects whether the time overhead of the associative execution module in processing a single query message body indicates that a blocking state has been reached; a queue processing unit, used to transmit the query message body to the queue service to add it to the message queue corresponding to the gateway when the blocking state has not been reached, otherwise wait for the associative execution module to clear the blocking state, and at the same time, the user who submitted the address query request returns the queue notification information.
[0154] In order to solve the above technical problems, the embodiment of the present application also provides a computer device. Figure 5As shown, a schematic diagram of the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. Among them, the computer-readable storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor may implement a commodity search category identification method. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor may execute the address association centralized service method of the present application. The network interface of the computer device is used to connect and communicate with the terminal. Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0155] In this embodiment, the processor is used to execute Figure 4 The memory stores the program code and various data required to execute the modules and submodules in the address association centralized service device. The memory stores the program code and data required to execute the modules and submodules in the address association centralized service device. The server can call the server's program code and data to execute the functions of all submodules.
[0156] The present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the address association centralized service method of any embodiment of the present application.
[0157] The present application also provides a computer program product, comprising a computer program / instruction, which implements the steps of the method described in any embodiment of the present application when executed by one or more processors.
[0158] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments of the present application can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments of the method. The aforementioned storage medium can be a computer-readable storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0159] To sum up, the present application can provide a centralized address association service for widely distributed independent stations. It can adaptively perform flow control in response to irregular changes in the address query requests triggered by the independent stations in different regions in response to the gateways in the region. It can thereby centrally and compatibly process address query requests in high-frequency ordering scenarios triggered by independent stations. It is particularly suitable for deployment in cross-border e-commerce platforms based on independent stations to achieve economies of scale.
[0160] Those skilled in the art will appreciate that the steps, measures, and schemes in the various operations, methods, and processes discussed in this application may be interchanged, modified, combined, or deleted. Furthermore, other steps, measures, and schemes in the various operations, methods, and processes discussed in this application may also be interchanged, modified, rearranged, decomposed, combined, or deleted. Furthermore, steps, measures, and schemes in the prior art that are similar to those disclosed in this application may also be interchanged, modified, rearranged, decomposed, combined, or deleted.
[0161] The above description is only part of the implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. An address association centralized service method, characterized in that: include: Deploy the address association service based on the independent station as a centralized service, submit the address query request triggered by the user to the corresponding independent station, so that the independent station submits the address query request to its corresponding gateway, and the gateway forwards it to the server for centralized processing; The server centrally responds to address query requests submitted by users visiting online stores on any independent website, and obtains a query message body corresponding to the address query request, wherein the query message body includes region information, language information, and query statements; Providing queue services on a gateway basis, monitoring the request volume per unit time of multiple distributedly deployed gateways, setting the rate of change of the request volume per unit time of each gateway as the resource usage weight of the corresponding gateway; and setting the length of the message queue used by each gateway in the queue service peak shaving process using its corresponding resource usage weight; Querying the request volume per unit time of the gateway responsible for forwarding the address query request, and when the request volume per unit time exceeds a preset threshold, starting the queue service corresponding to the gateway to implement peak shaving processing of the query message body of the gateway; Invoking an association execution module based on a query message body dequeued from a queue service, wherein the association execution module matches a word order feature corresponding to the language information in the query message body with a regional dictionary corresponding to the regional information to predict a list of recommended addresses corresponding to the query statement; The recommended address list is pushed to the user via the gateway and the independent website, and the mapping relationship data between the query statement and the recommended address list is stored in a cache area corresponding to the gateway.
2. The address association centralized service method according to claim 1, characterized in that: The association execution module predicts a list of recommended addresses corresponding to the query statement based on word order features corresponding to the language information in the query message body and a regional dictionary corresponding to the region information, including: Segmenting the query using a word segmentation model corresponding to the word order feature to obtain a corresponding word segmentation set; Calculate semantic similarity between each segmentation in the segmentation set and each district name in the district dictionary; Determining a district name that is similar to each segmentation, wherein a district name whose semantic similarity with a segmentation reaches a preset threshold is determined as a district name similar to the segmentation; According to the hierarchical nesting relationship of administrative divisions, the division names similar to each segmentation are concatenated according to the connection rules constrained by the word order features to obtain multiple recommended addresses and form a recommended address list.
3. The address association centralized service method according to claim 2, characterized in that: Obtain multiple recommended addresses to form a recommended address list, including: Obtaining historical address data of the user, including one or more historical addresses; Calculate the semantic similarity between each historical address and each recommended address, and normalize the semantic similarities corresponding to the same recommended address into a ranking score; All recommended addresses are constructed into a recommended address list, wherein each recommended address is sorted in reverse order according to the sorting score.
4. The address association centralized service method according to claim 1, characterized in that: Before calling the association execution module based on the query message body dequeued from the queue service, it includes: A query is made from the cache area corresponding to the gateway to determine whether a recommended address list corresponding to the query statement is included. If so, the invocation of the association execution module based on the query message body dequeued from the queue service is skipped.
5. The address association centralized service method according to claim 1, characterized in that: Before querying the request volume per unit time of the gateway responsible for forwarding the address query request, including: Detect whether the word length of the query statement in the query message body exceeds a preset threshold, and when it exceeds the preset threshold, directly respond to the address query request with a null value.
6. The address association centralized service method according to claim 1, characterized in that: Starting the queue service corresponding to the gateway to implement peak shaving processing of the query message body of the gateway, including: Starting a queue service corresponding to the gateway, and having the queue service detect whether the time overhead of the associative execution module in processing a single query message body indicates that a blocking state has been reached; When the blocking state is not reached, the query message body is transmitted to the queue service to be added to the message queue corresponding to the gateway, otherwise the association execution module is waited for to clear the blocking state, and the user who submitted the address query request returns the queue notification information.
7. An address association centralized service device, characterized in that: include: A request response module is used to deploy the address association service based on the independent station as a centralized service, submitting the address query request triggered by the user to the corresponding independent station, so that the independent station submits the address query request to its corresponding gateway, which forwards it to the server for centralized processing; The server centrally responds to address query requests submitted by users visiting online stores on any independent website, and obtains a query message body corresponding to the address query request, wherein the query message body includes region information, language information, and query statements; The queue activation module is used to provide queue services on a gateway basis, monitor the unit time request volume of multiple distributedly deployed gateways, set the rate of change of the unit time request volume of each gateway as the resource usage weight of the corresponding gateway; set the length of the message queue used by each gateway in the queue service peak shaving process using its corresponding resource usage weight; query the unit time request volume of the gateway responsible for forwarding the address query request, and when its unit time request volume exceeds a preset threshold, start the queue service corresponding to the gateway to implement peak shaving processing of the query message body of the gateway; A query execution module, configured to call an association execution module based on a query message body dequeued from a queue service, wherein the association execution module matches a word order feature corresponding to the language information in the query message body with a regional dictionary corresponding to the regional information to predict a list of recommended addresses corresponding to the query statement; The result processing module is used to push the recommended address list to the user via the gateway and the independent website, and store the mapping relationship data between the query statement and the recommended address list in the cache area corresponding to the gateway.
8. The address association centralized service device according to claim 7, characterized in that: The query execution module includes: A word segmentation processing unit, configured to segment the query sentence using a word segmentation model corresponding to the word order feature to obtain a corresponding word segmentation set; A similarity calculation unit, configured to calculate semantic similarity between each segmentation in the segmentation set and each district name in the district dictionary; A district determination unit is used to determine district names that are similar to each segmentation, wherein a district name whose semantic similarity with a segmentation reaches a preset threshold is determined as a district name similar to the segmentation; The address construction unit is used to concatenate the district names similar to each segmentation according to the hierarchical nesting relationship of the administrative divisions in accordance with the connection rules constrained by the word order features, obtain multiple recommended addresses, and form a recommended address list.
9. A computer device comprising a central processing unit and a memory, characterized in that: The central processing unit is configured to call and run a computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that It stores a computer program implemented according to the method described in any one of claims 1 to 6 in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the corresponding method are executed.
Citation Information
Patent Citations
Flow control method between wireless mesh network-based distributed network control systems
CN102170661A
High-concurrency solution under back-end micro-service architecture
CN111078426A
Address information detection method and device, equipment, medium and product
CN114528364A