Nothing Special   »   [go: up one dir, main page]

TWI578173B - Statistical e-commerce transaction data, e-commerce transaction data statistics system and application server - Google Patents

Statistical e-commerce transaction data, e-commerce transaction data statistics system and application server Download PDF

Info

Publication number
TWI578173B
TWI578173B TW099117425A TW99117425A TWI578173B TW I578173 B TWI578173 B TW I578173B TW 099117425 A TW099117425 A TW 099117425A TW 99117425 A TW99117425 A TW 99117425A TW I578173 B TWI578173 B TW I578173B
Authority
TW
Taiwan
Prior art keywords
transaction data
application server
transaction
data
commerce
Prior art date
Application number
TW099117425A
Other languages
Chinese (zh)
Other versions
TW201142619A (en
Inventor
zhan-tao You
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to TW099117425A priority Critical patent/TWI578173B/en
Publication of TW201142619A publication Critical patent/TW201142619A/en
Application granted granted Critical
Publication of TWI578173B publication Critical patent/TWI578173B/en

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Description

統計電子商務交易資料的方法、電子商務交易資料統計系統和應用伺服器Method for counting e-commerce transaction data, e-commerce transaction data statistics system and application server

本申請涉及網路技術,尤其涉及統計電子商務交易資料的方法、應用伺服器和電子商務交易資料統計系統。The present application relates to network technologies, and in particular, to a method for counting e-commerce transaction data, an application server, and an e-commerce transaction data statistics system.

伴隨著互聯網技術的快速發展,電子商務逐漸成為人們日常生活的必需品,各類電子商務網站迅速崛起。對於一個大型的電子商務網站,即時統計交易資料,並根據交易資料進行業務分析顯得尤為重要。With the rapid development of Internet technology, e-commerce has gradually become a necessity for people's daily life, and various e-commerce websites have risen rapidly. For a large e-commerce website, it is especially important to analyze transaction data in real time and conduct business analysis based on transaction data.

在對現有技術的硏究和實踐過程中,發明人發現現有技術中存在以下問題:對於大型的電子商務網站,電子商務交易系統一般會將交易資料保存到電子商務交易系統的資料庫中,並且每天都會存在上千萬次的資料庫操作。由於即時資料統計及更新,必須不停的對獲得的資料進行處理,如果直接在電子商務交易系統的資料庫即時統計交易資料,那麼就會極大的增加電子商務交易系統的資料庫的負擔,影響正常的業務交易,嚴重時可能會導致電子商務交易系統的資料庫當機,進而導致整個電子商務網站都不可用。In the research and practice of the prior art, the inventors found that the following problems exist in the prior art: for a large e-commerce website, the e-commerce transaction system generally saves the transaction data to the database of the e-commerce transaction system, and There are tens of millions of database operations every day. Due to the real-time data statistics and updates, the acquired data must be processed continuously. If the transaction data is directly counted in the database of the e-commerce transaction system, the burden of the database of the e-commerce transaction system will be greatly increased, and the impact will be greatly affected. A normal business transaction may cause the database of the e-commerce transaction system to crash, which may result in the entire e-commerce website being unavailable.

本申請實施例的目的是提供統計電子商務交易資料的方法、應用伺服器和電子商務交易資料統計系統,以實現即時的統計電子商務交易資料,並且不會增加電子商務交易系統的資料庫的負擔,從而不影響正常的業務交易。The purpose of the embodiment of the present application is to provide a method for statistical e-commerce transaction data, an application server, and an e-commerce transaction data statistics system, so as to realize real-time statistical e-commerce transaction data, and does not increase the burden of the e-commerce transaction system database. Therefore, it does not affect normal business transactions.

為解決上述技術問題,本申請實施例提供了一種統計電子商務交易資料的方法,適用於包括電子商務交易系統、資料倉庫系統及電子商務交易資料統計系統的電子商務系統,該電子商務交易系統包括第一應用伺服器和第一資料庫,該電子商務交易資料統計系統用於統計從該電子商務交易系統獲得的交易資料,該電子商務交易資料統計系統包括第二應用伺服器和第二資料庫,該方法包括:該第二應用伺服器即時獲得該第一應用伺服器發出的交易資料;在每次獲得交易資料後,該第二應用伺服器分析該交易資料,獲取該交易資料所屬類別的資訊;該第二應用伺服器根據該交易資料所屬類別的資訊,從該第二資料庫中獲得該類別的歷史交易資料,其中,該第二資料庫非即時的向該資料倉庫系統查詢並獲取符合預設條件的交易資料,將獲得的交易資料與之前對應的交易資料進行比較,更新不一致的交易資料;該第二應用伺服器結合該交易資料和該類別的歷史交易資料,得到該類別的當前交易資料。To solve the above technical problem, the embodiment of the present application provides a method for counting e-commerce transaction data, which is applicable to an e-commerce system including an e-commerce transaction system, a data warehouse system, and an e-commerce transaction data statistics system, and the e-commerce transaction system includes a first application server and a first database, the e-commerce transaction data statistics system is configured to collect transaction data obtained from the e-commerce transaction system, the e-commerce transaction data statistics system comprises a second application server and a second database The method includes: the second application server immediately obtains the transaction data sent by the first application server; after each time the transaction data is obtained, the second application server analyzes the transaction data to obtain the category of the transaction data. Information; the second application server obtains historical transaction data of the category from the second database according to the information of the category to which the transaction data belongs, wherein the second database is not immediately queried and obtained from the data warehouse system Transaction data that meets the pre-set conditions, and the transaction data obtained Corresponding transaction data to compare, update transaction data inconsistency; the second application server in conjunction with the transaction data and the category of historical transaction data, get the current transaction data that category.

為解決上述技術問題,本申請實施例還提供了一種應用伺服器,適用於包括電子商務交易系統、資料倉庫系統及電子商務交易資料統計系統的電子商務系統,該電子商務交易系統包括第一應用伺服器和第一資料庫,該電子商務交易資料統計系統用於統計從該電子商務交易系統獲得的交易資料,該電子商務交易資料統計系統包括該應用伺服器和第二資料庫,該應用伺服器包括:交易資料處理單元和交易資料統計單元;該交易資料處理單元用於即時獲得該第一應用伺服器發出的交易資料,並在每次獲得交易資料後,將該交易資料發給該交易資料統計單元;該交易資料統計單元用於獲得並分析該交易資料,獲取該交易資料所屬類別的資訊,根據該交易資料所屬類別的資訊,從該第二資料庫中獲得該類別的歷史交易資料,並結合該交易資料和該類別的歷史交易資料,得到該類別的當前交易資料;其中,該第二資料庫非即時的向該資料倉庫系統查詢並獲取符合預設條件的交易資料,將獲得的交易資料與之前對應的交易資料進行比較,更新不一致的交易資料。To solve the above technical problem, the embodiment of the present application further provides an application server, which is applicable to an e-commerce system including an e-commerce transaction system, a data warehouse system, and an e-commerce transaction data statistics system, where the e-commerce transaction system includes a first application. a server and a first database, the e-commerce transaction data statistics system is configured to collect transaction data obtained from the e-commerce transaction system, the e-commerce transaction data statistics system includes the application server and a second database, the application server The device includes: a transaction data processing unit and a transaction data statistics unit; the transaction data processing unit is configured to obtain the transaction data sent by the first application server in real time, and send the transaction data to the transaction after each transaction data is obtained. The data statistics unit is configured to obtain and analyze the transaction data, obtain information about the category of the transaction data, and obtain historical transaction data of the category from the second database according to the information of the category of the transaction data. And combine the transaction data with the history of the category The easy data obtains the current transaction data of the category; wherein the second database non-instantly queries the data warehouse system and obtains transaction data that meets the preset conditions, and compares the obtained transaction data with the corresponding transaction data. , update inconsistent transaction data.

為解決上述技術問題,本申請實施例還提供了一種電子商務交易資料統計系統,適用於包括電子商務交易系統、資料倉庫系統及電子商務交易資料統計系統的電子商務系統,該電子商務交易系統包括第一應用伺服器和第一資料庫,該電子商務交易資料統計系統用於統計從該電子商務交易系統獲得的交易資料,該電子商務交易資料統計系統包括:第二應用伺服器和第二資料庫;該第二應用伺服器用於即時獲得該第一應用伺服器發出的交易資料,在每次獲得交易資料後,分析該交易資料,獲取該交易資料所屬類別的資訊,根據該交易資料所屬類別的資訊,從該第二資料庫中獲得該類別的歷史交易資料,並結合該交易資料和該類別的歷史交易資料,得到該類別的當前交易資料;該第二資料庫用於儲存交易資料,並非即時的向該資料倉庫系統查詢並獲取符合預設條件的交易資料,將獲得的交易資料與之前對應的交易資料進行比較,更新不一致的交易資料。To solve the above technical problem, the embodiment of the present application further provides an e-commerce transaction data statistics system, which is applicable to an e-commerce system including an e-commerce transaction system, a data warehouse system, and an e-commerce transaction data statistics system, and the e-commerce transaction system includes a first application server and a first database, the e-commerce transaction data statistics system is configured to collect transaction data obtained from the e-commerce transaction system, the e-commerce transaction data statistics system comprises: a second application server and a second data The second application server is configured to obtain the transaction data sent by the first application server in real time, analyze the transaction data after obtaining the transaction data, and obtain information about the category of the transaction data, according to the transaction data. The information of the category, the historical transaction data of the category is obtained from the second database, and the current transaction data of the category is obtained by combining the transaction data and the historical transaction data of the category; the second database is used for storing the transaction data. , not instant query and acquisition of the data warehouse system Preconditions transaction data, transaction data will be compared with the corresponding prior transaction data, updated inconsistent transaction data.

為解決上述技術問題,本申請實施例還提供了一種統計電子商務交易資料的方法,適用於包括電子商務交易系統、資料倉庫系統及電子商務交易資料統計系統的電子商務系統,該電子商務交易系統包括第一應用伺服器和第一資料庫,該電子商務交易資料統計系統用於統計從該電子商務交易系統獲得的交易資料,該電子商務交易資料統計系統包括第二應用伺服器和第二資料庫,該方法包括:該第二應用伺服器即時獲得該第一應用伺服器發出的交易資料;在每次獲得交易資料後,該第二應用伺服器將該交易資料儲存到該第二資料庫中,並分析該交易資料,獲取該交易資料所屬類別的資訊,其中,該第二資料庫非即時的向該資料倉庫系統查詢並獲取符合預設條件的交易資料,將獲得的交易資料與之前對應的交易資料進行比較,更新不一致的交易資料;該第二應用伺服器根據該交易資料所屬類別的資訊,從該第二資料庫中獲得該交易資料和該類別的歷史交易資料;該第二應用伺服器結合該交易資料和該類別的歷史交易資料,得到該類別的當前交易資料。To solve the above technical problem, the embodiment of the present application further provides a method for counting e-commerce transaction data, which is applicable to an e-commerce system including an e-commerce transaction system, a data warehouse system, and an e-commerce transaction data statistics system, and the e-commerce transaction system The first application server and the first database are used, and the e-commerce transaction data statistics system is configured to collect transaction data obtained from the e-commerce transaction system, and the e-commerce transaction data statistics system comprises a second application server and a second data. The method includes: the second application server immediately obtains the transaction data sent by the first application server; and after the transaction data is obtained, the second application server stores the transaction data to the second database And analyzing the transaction data to obtain information about the category of the transaction data, wherein the second database does not immediately query the data warehouse system and obtain transaction data that meets the preset conditions, and the obtained transaction data is Corresponding transaction data is compared to update inconsistent transaction data; The application server obtains the transaction data and the historical transaction data of the category from the second database according to the information of the category of the transaction data; the second application server combines the transaction data with the historical transaction data of the category, Get current transaction data for this category.

為解決上述技術問題,本申請實施例還提供了一種應用伺服器,其特徵在於,適用於包括電子商務交易系統、資料倉庫系統及電子商務交易資料統計系統的電子商務系統,該電子商務交易系統包括第一應用伺服器和第一資料庫,該電子商務交易資料統計系統用於統計從該電子商務交易系統獲得的交易資料,該電子商務交易資料統計系統包括該應用伺服器和第二資料庫,該應用伺服器包括:交易資料處理單元和交易資料統計單元;該交易資料處理單元用於即時獲得該第一應用伺服器發出的交易資料,在每次獲得交易資料後,將該交易資料儲存到該第二資料庫中,並分析該交易資料,獲取該交易資料所屬類別的資訊,向該交易資料統計單元發出攜帶該交易資料所屬類別的資訊的觸發消息,該觸發消息用於觸發該交易資料統計單元統計交易資料;該交易資料統計單元用於根據該交易資料所屬類別的資訊,從該第二資料庫中獲得該交易資料和該類別的歷史交易資料,並結合該交易資料和該類別的歷史交易資料,得到該類別的當前交易資料;其中,該第二資料庫非即時的向該資料倉庫系統查詢並獲取符合預設條件的交易資料,將獲得的交易資料與之前對應的交易資料進行比較,更新不一致的交易資料。To solve the above technical problem, the embodiment of the present application further provides an application server, which is applicable to an e-commerce system including an e-commerce transaction system, a data warehouse system, and an e-commerce transaction data statistics system, and the e-commerce transaction system The first application server and the first database are used, and the e-commerce transaction data statistics system is configured to collect transaction data obtained from the e-commerce transaction system, and the e-commerce transaction data statistics system comprises the application server and the second database. The application server includes: a transaction data processing unit and a transaction data statistics unit; the transaction data processing unit is configured to obtain the transaction data sent by the first application server in real time, and store the transaction data each time the transaction data is obtained. Go to the second database, analyze the transaction data, obtain the information of the category of the transaction data, and send a trigger message to the transaction data statistics unit that carries the information of the category of the transaction data, and the trigger message is used to trigger the transaction. Data statistics unit statistical transaction data; the transaction The material statistics unit is configured to obtain the transaction data and the historical transaction data of the category from the second database according to the information of the category of the transaction data, and combine the transaction data with the historical transaction data of the category to obtain the category The current transaction data; wherein, the second database non-instantly queries the data warehouse system and obtains transaction data that meets the preset conditions, compares the obtained transaction data with the corresponding transaction data, and updates the inconsistent transaction data.

為解決上述技術問題,本申請實施例還提供了一種電子商務交易資料統計系統,適用於包括電子商務交易系統、資料倉庫系統及電子商務交易資料統計系統的電子商務系統,該電子商務交易系統包括第一應用伺服器和第一資料庫,該電子商務交易資料統計系統用於統計從該電子商務交易系統獲得的交易資料,該電子商務交易資料統計系統包括:第二應用伺服器和第二資料庫;該第二應用伺服器用於即時獲得該第一應用伺服器發出的交易資料,在每次獲得交易資料後,該第二應用伺服器將該交易資料儲存到該第二資料庫中,分析該交易資料,獲取該交易資料所屬類別的資訊,根據該交易資料所屬類別的資訊,從該第二資料庫中獲得該交易資料和該類別的歷史交易資料,該第二應用伺服器結合該交易資料和該類別的歷史交易資料,得到該類別的當前交易資料;該第二資料庫用於儲存交易資料,並非即時的向該資料倉庫系統查詢並獲取符合預設條件的交易資料,將獲得的交易資料與之前對應的交易資料進行比較,更新不一致的交易資料。To solve the above technical problem, the embodiment of the present application further provides an e-commerce transaction data statistics system, which is applicable to an e-commerce system including an e-commerce transaction system, a data warehouse system, and an e-commerce transaction data statistics system, and the e-commerce transaction system includes a first application server and a first database, the e-commerce transaction data statistics system is configured to collect transaction data obtained from the e-commerce transaction system, the e-commerce transaction data statistics system comprises: a second application server and a second data The second application server is configured to obtain the transaction data sent by the first application server in real time, and the second application server stores the transaction data in the second database after obtaining the transaction data each time. Analyzing the transaction data, obtaining information about a category of the transaction data, obtaining the transaction data and historical transaction data of the category from the second database according to the information of the category of the transaction data, and the second application server is combined with the transaction information Transaction data and historical transaction data of this category, get the current assignment of the category Data; the second database is used for storing transaction data, and is not immediately inquiring to the data warehouse system and obtaining transaction data that meets the preset conditions, comparing the obtained transaction data with the corresponding transaction data, and updating the inconsistent transaction. data.

可見,本申請實施例中,電子商務交易資料統計系統即時從電子商務交易系統的應用伺服器獲得交易資料,而不是從電子商務交易系統的資料庫即時獲得交易資料,這樣不會增加電子商務交易系統的資料庫的負擔,從而不會影響正常的業務交易,更不會導致電子商務交易系統的資料庫當機,由此可以避免整個電子商務網站都不可用。It can be seen that, in the embodiment of the present application, the e-commerce transaction data statistics system immediately obtains the transaction data from the application server of the e-commerce transaction system, instead of obtaining the transaction data from the database of the e-commerce transaction system, so that the e-commerce transaction is not increased. The burden of the system's database will not affect the normal business transactions, and will not cause the e-commerce transaction system's database to be down, thus avoiding the entire e-commerce website being unavailable.

本申請實施例提供統計電子商務交易資料的方法、應用伺服器和電子商務交易資料統計系統。The embodiment of the present application provides a method for counting e-commerce transaction data, an application server, and an e-commerce transaction data statistics system.

在介紹統計電子商務交易資料的方法、應用伺服器和電子商務交易資料統計系統之前,首先介紹本申請實施例應用的網路環境和涉及的一些專業知識。Before introducing the method for calculating the e-commerce transaction data, the application server, and the e-commerce transaction data statistics system, the network environment and some professional knowledge involved in the application of the present application are first introduced.

本申請實施例應用的網路環境如圖1所示,用戶端103可以登錄到電子商務交易系統101進行電子商務交易操作,例如進行建立交易、付款等操作,電子商務交易系統101可以將交易資料和日誌記錄到資料倉庫系統102中。The network environment applied in the embodiment of the present application is as shown in FIG. 1. The client 103 can log in to the e-commerce transaction system 101 to perform an e-commerce transaction operation, for example, to perform operations such as establishing a transaction, payment, etc., and the e-commerce transaction system 101 can log the transaction data. And logging to the data repository system 102.

電子商務交易系統101可以提供例如商品展示、建立交易、交易管理、支付等功能。The e-commerce transaction system 101 can provide functions such as merchandise display, transaction creation, transaction management, payment, and the like.

電子商務交易系統101可以包括應用伺服器和資料庫,應用伺服器也可以將交易資料等內容儲存到資料庫中。在現有技術中,為了統計交易資料,網路實體一般都要從資料庫中獲取交易資料。The e-commerce transaction system 101 can include an application server and a database, and the application server can also store the transaction data and the like into the database. In the prior art, in order to count transaction data, a network entity generally needs to obtain transaction data from a database.

資料倉庫系統102是一個面向主題的、集成的、不可更新的、隨時間不斷變化的資料集合的記錄載體,用於支援企業或組織的決策分析處理。具體來說,資料倉庫系統102會記錄交易資料的詳細變化歷史,用戶使用用戶端101在電子商務交易系統101中的任何操作所產生的交易資料變化都會記錄在資料倉庫系統102中。The data warehouse system 102 is a subject-oriented, integrated, non-renewable, time-varying data collection record carrier for supporting decision analysis processing of a business or organization. Specifically, the material warehouse system 102 records a detailed change history of the transaction data, and the transaction data changes generated by the user using any operation of the client 101 in the electronic commerce transaction system 101 are recorded in the material warehouse system 102.

交易資料可以是指與交易相關的資料,例如用戶帳號、操作類型、交易金額等資料,操作類型例如是指建立交易、付款等事件。The transaction data may refer to information related to the transaction, such as user account number, operation type, transaction amount and the like, and the operation type is, for example, an event such as establishing a transaction or payment.

需要說明的是,本申請實施例在圖1的基礎上增加了一個電子商務交易資料統計系統,如圖2所示,電子商務交易資料統計系統104既可以與電子商務交易系統101交互,也可以與資料倉庫系統102交互。本申請實施例將包括電子商務交易系統、資料倉庫系統和電子商務交易資料統計系統的網路系統稱為電子商務系統,在電子商務系統中,電子商務交易系統、資料倉庫系統和電子商務交易資料統計系統兩兩相連,當然,電子商務系統還可以包括其他網路子系統和其他網路實體,其他網路實體例如是指在電子商務交易系統中進行電子商務交易的用戶端以及管理電子商務交易資料統計系統的管理員所使用的用戶端等。前面提到過,電子商務交易系統101可以包括應用伺服器和資料庫,為便於下文描述方便,本申請實施例將電子商務交易系統包括的應用伺服器稱為第一應用伺服器,將電子商務交易系統包括的資料庫稱為第一資料庫。電子商務交易資料統計系統104用於統計從電子商務交易系統101獲得的交易資料,電子商務交易資料統計系統104也包括應用伺服器,為便於下文描述方便,本申請實施例將電子商務交易資料統計系統包括的應用伺服器稱為第二應用伺服器,將電子商務交易資料統計系統包括的資料庫稱為第二資料庫。本申請實施例的所有技術方案都適用於上述的電子商務系統。It should be noted that, in the embodiment of the present application, an e-commerce transaction data statistics system is added on the basis of FIG. 1. As shown in FIG. 2, the e-commerce transaction data statistics system 104 can interact with the e-commerce transaction system 101, or Interact with the data repository system 102. The embodiment of the present application refers to a network system including an e-commerce transaction system, a data warehouse system, and an e-commerce transaction data statistics system as an e-commerce system. In an e-commerce system, an e-commerce transaction system, a data warehouse system, and an e-commerce transaction data The statistical system is connected in pairs. Of course, the e-commerce system can also include other network subsystems and other network entities. For example, other network entities refer to the user terminals that conduct e-commerce transactions in the e-commerce transaction system and manage e-commerce transaction data. The user side used by the administrator of the statistical system. As mentioned above, the e-commerce transaction system 101 can include an application server and a database. For the convenience of the following description, the application server included in the e-commerce transaction system is referred to as a first application server, and the e-commerce is used. The database included in the trading system is called the first database. The e-commerce transaction data statistics system 104 is used to collect transaction data obtained from the e-commerce transaction system 101. The e-commerce transaction data statistics system 104 also includes an application server. For convenience of the following description, the embodiment of the present application collects e-commerce transaction data. The application server included in the system is referred to as a second application server, and the database included in the e-commerce transaction data statistics system is referred to as a second database. All the technical solutions of the embodiments of the present application are applicable to the above electronic commerce system.

為了使本技術領域的人員更好地理解本申請實施例中的技術方案,並使本申請實施例的上述目的、特徵和優點能夠更加明顯易懂,下面結合附圖對本申請實施例中技術方案作進一步詳細的說明。The above-mentioned objects, features and advantages of the embodiments of the present application can be more clearly understood and understood by those skilled in the art. Give further details.

首先介紹本申請實施例的一種統計電子商務交易資料的方法,前面提到過,這種方法適用於包括電子商務交易系統、資料倉庫系統及電子商務交易資料統計系統的電子商務系統,該電子商務交易系統包括第一應用伺服器和第一資料庫,該電子商務交易資料統計系統用於統計從該電子商務交易系統獲得的交易資料,該電子商務交易資料統計系統包括第二應用伺服器和第二資料庫。如圖3所示,這種方法包括:First, a method for statistical e-commerce transaction data according to an embodiment of the present application is introduced. As mentioned above, the method is applicable to an e-commerce system including an e-commerce transaction system, a data warehouse system, and an e-commerce transaction data statistics system. The transaction system includes a first application server and a first database, and the e-commerce transaction data statistics system is configured to collect transaction data obtained from the e-commerce transaction system, the e-commerce transaction data statistics system includes a second application server and a Two databases. As shown in Figure 3, this method includes:

S301:第二應用伺服器即時獲得第一應用伺服器發出的交易資料。S301: The second application server obtains the transaction data sent by the first application server in real time.

具體的,第一應用伺服器可以即時的向獨立於電子商務交易系統和資料倉庫系統的電子商務交易資料統計系統提供交易資料,具體的,第一應用伺服器即時的向第二應用伺服器提供交易資料。Specifically, the first application server can provide transaction data to the e-commerce transaction data statistics system independent of the e-commerce transaction system and the data warehouse system, and the first application server provides the transaction information to the second application server. Transaction information.

第一應用伺服器可以按照這樣的方式即時向第二應用伺服器提供交易資料,即,第一應用伺服器可以發出非同步消息,非同步消息中攜帶有交易資料。一個非同步消息可以攜帶一個用戶進行一次操作所產生的資料。非同步消息既可以是可靠的非同步消息,也可以是不可靠的非同步消息。如果第一應用伺服器發出的是可靠的非同步消息,那麼非同步消息可以不會丟失的到達第二應用伺服器;如果第一應用伺服器發出的是不可靠的非同步消息,那麼可能會發生非同步消息丟失的現象,或者說,第二應用伺服器可能會接收不到非同步消息,這種情況下,第二應用伺服器可能會無法獲得一些交易資料。The first application server can immediately provide transaction data to the second application server in such a manner that the first application server can issue an asynchronous message, and the asynchronous message carries the transaction data. An asynchronous message can carry a data generated by a user performing an operation. The asynchronous message can be either a reliable asynchronous message or an unreliable asynchronous message. If the first application server sends a reliable asynchronous message, the asynchronous message may arrive at the second application server without being lost; if the first application server sends an unreliable asynchronous message, then the The phenomenon that the asynchronous message is lost occurs, or the second application server may not receive the asynchronous message. In this case, the second application server may not be able to obtain some transaction data.

在實際應用中,使用可靠的非同步消息的成本會比較高,而使用不可靠的非同步消息的成本會比較低。In practical applications, the cost of using reliable asynchronous messages will be higher, and the cost of using unreliable asynchronous messages will be lower.

另外,第一應用伺服器發出非同步消息的動作對於第一應用伺服器來說,代價可以忽略不計,也就是說,第一應用伺服器發出非同步消息的動作不會影響電子商務交易系統提供的正常業務交易。In addition, the action of the first application server to issue the asynchronous message is negligible for the first application server, that is, the action of the first application server to send the asynchronous message does not affect the e-commerce transaction system. Normal business transactions.

執行S301後,執行S302:在每次獲得交易資料後,該第二應用伺服器分析該交易資料,獲取該交易資料所屬類別的資訊。After executing S301, S302 is executed: after each transaction data is obtained, the second application server analyzes the transaction data to obtain information about the category of the transaction data.

在本申請實施例中,可以將交易資料劃分為多個類別,例如,按照用戶或者交易操作種類劃分。例如,某個交易資料可以是一個用戶通過用戶端在電子商務交易系統中進行電子商務操作所產生的資料,那麼這樣的交易資料可以認為是屬於這個用戶的交易資料。再例如,某個交易資料可以是一個用戶通過用戶端在電子商務交易系統中進行某種電子商務操作所產生的資料,某種電子商務操作例如是向賣家付款(即交易成功)等操作,那麼這樣的交易資料可以認為是屬於這種電子商務操作的交易資料。當然,交易資料還可以按照其他方式來劃分,這裏不再一一舉例說明。In the embodiment of the present application, the transaction data may be divided into a plurality of categories, for example, according to the user or the transaction operation type. For example, a transaction data may be data generated by a user performing an e-commerce operation in an e-commerce transaction system by a user, and such transaction data may be considered as transaction materials belonging to the user. For another example, a transaction data may be data generated by a user performing an e-commerce operation in an e-commerce transaction system through a user terminal, and an e-commerce operation is, for example, an operation of paying a seller (ie, a transaction is successful), then Such transaction data can be considered as transaction materials belonging to such e-commerce operations. Of course, the transaction data can also be divided according to other methods, and will not be exemplified here.

第二應用伺服器獲得交易資料後,可以對交易資料進行分析,確定交易資料所屬的類別,即,獲取交易資料所屬類別的資訊。在具體實現時,第一應用伺服器發出的交易資料不僅僅可以攜帶交易資料的資料內容,還可以攜帶交易資料所屬類別的資訊,這種情況下,第二應用伺服器可以直接從交易資料中獲取交易資料所屬類別的資訊。第二應用伺服器也可以預先儲存記錄關鍵字與類別資訊映射關係的映射表,一個類別資訊可以只對應一個關鍵字,一個類別資訊也可以對應多個關鍵字,第二應用伺服器獲得交易資料後,可以從交易資料中提取關鍵字,使用關鍵字在該映射表中查找與關鍵字對應的類別資訊,這樣也可以獲取交易資料所屬類別的資訊。當然,第二應用伺服器還可以通過其他多種方式分析交易資料,獲取交易資料所屬類別的資訊,這裏不再一一舉例說明。After obtaining the transaction data, the second application server may analyze the transaction data to determine the category to which the transaction data belongs, that is, obtain the information of the category to which the transaction data belongs. In the specific implementation, the transaction data sent by the first application server can not only carry the data content of the transaction data, but also carry the information of the category of the transaction data. In this case, the second application server can directly from the transaction data. Get information about the category of the transaction data. The second application server may also pre-store a mapping table for mapping the relationship between the keyword and the category information. One category information may correspond to only one keyword, one category information may also correspond to multiple keywords, and the second application server may obtain transaction data. After that, keywords can be extracted from the transaction data, and the category information corresponding to the keyword can be found in the mapping table by using the keyword, so that the information of the category to which the transaction data belongs can also be obtained. Of course, the second application server can also analyze the transaction data in various other ways to obtain the information of the category of the transaction data, which will not be exemplified here.

執行S302後,執行S303:該第二應用伺服器根據該交易資料所屬類別的資訊,從第二資料庫中獲得該類別的歷史交易資料,其中,該第二資料庫非即時的向該資料倉庫系統查詢並獲取符合預設條件的交易資料,將獲得的交易資料與之前對應的交易資料進行比較,更新不一致的交易資料。After executing S302, executing S303: the second application server obtains historical transaction data of the category from the second database according to the information of the category to which the transaction data belongs, wherein the second database is not instantaneous to the data warehouse The system queries and obtains transaction data that meets the preset conditions, compares the obtained transaction data with the corresponding transaction data, and updates the inconsistent transaction data.

第二應用伺服器獲取交易資料所屬類別的資訊後,可以向第二資料庫發出請求消息,請求消息攜帶交易資料所屬類別的資訊,請求消息用於表示請求提供交易資料所屬類別的歷史交易資料。第二資料庫接收到請求消息後,可以使用請求消息攜帶的交易資料所屬類別的資訊作為關鍵字,在本地查找交易資料所屬類別的歷史交易資料,並將查找到的歷史交易資料返回給第二應用伺服器。特殊情況下,由於第二資料庫可能未儲存過交易資料所屬類別的交易資料等原因,第二資料庫在接收到請求消息後,可以向第二應用伺服器返回一個回應消息,這個回應消息用於表示沒有查找到交易資料所屬類別的歷史交易資料等內容。After obtaining the information of the category to which the transaction data belongs, the second application server may send a request message to the second database, where the request message carries the information of the category to which the transaction data belongs, and the request message is used to indicate the historical transaction data of the category to which the transaction data is requested to be provided. After receiving the request message, the second database may use the information of the category of the transaction data carried by the request message as a keyword to locally search the historical transaction data of the category to which the transaction data belongs, and return the found historical transaction data to the second. Application server. In a special case, because the second database may not store the transaction data of the category to which the transaction data belongs, the second database may return a response message to the second application server after receiving the request message, and the response message is used. It means that there is no history transaction data such as the category of the transaction data.

前面提到過,如果第一應用伺服器發出的是不可靠的非同步消息,那麼第二應用伺服器可能會無法接收到一些非同步消息,進而導致第二應用伺服器可能會無法得到一些交易資料。對此,第二資料庫可以非即時的向資料倉庫系統查詢並獲取符合預設條件的交易資料,將獲得的交易資料與之前對應的交易資料進行比較,更新不一致的交易資料。As mentioned earlier, if the first application server sends an unreliable asynchronous message, the second application server may not receive some asynchronous messages, which may result in the second application server may not be able to get some transactions. data. In this regard, the second database may inquire non-instantly to the data warehouse system and obtain transaction data that meets the preset conditions, compare the obtained transaction data with the corresponding transaction data, and update the inconsistent transaction data.

在實際應用中,第二資料庫可以每隔預先設置的週期向資料倉庫系統查詢並獲取符合預設條件的交易資料。預先設置的週期可以由本領域技術人員根據實際需要而設置,例如10分鐘。預設條件也可以由本領域技術人員根據實際需要而設置,例如,在最近的一個週期內所有發生變化的資料,所有發生變化的資料可以是指新增加的資料。In practical applications, the second database can query the data warehouse system and obtain transaction data that meets the preset conditions every preset period. The preset period can be set by a person skilled in the art according to actual needs, for example, 10 minutes. The preset condition can also be set by a person skilled in the art according to actual needs, for example, all the changed data in the most recent period, and all the changed data can refer to the newly added data.

第二資料庫可以將獲得的符合預設條件的交易資料與之前保存的符合預設條件的交易資料進行比較,如果一致,則可以不進行任何處理,如果存在不一致的資料,則更新不一致的交易資料。The second database can compare the obtained transaction data that meets the preset conditions with the previously saved transaction data that meets the preset conditions. If they are consistent, the transaction data may be left unprocessed, and if there is inconsistent data, the inconsistent transaction is updated. data.

執行S303後,執行S304:該第二應用伺服器結合該交易資料和該類別的歷史交易資料,得到該類別的當前交易資料。After executing S303, executing S304: the second application server combines the transaction data and the historical transaction data of the category to obtain current transaction data of the category.

在具體實現時,第二應用伺服器可以按照統計規則對交易資料進行即時統計。第二應用伺服器在按照統計規則對交易資料進行即時統計處理之前,可以獲得用戶端所設定的對交易資料進行統計處理的統計規則。例如,在第二應用伺服器按照統計規則對交易資料進行統計處理之前,管理電子商務交易資料統計系統的管理員在用戶端上設定統計規則,用戶端將統計規則提供給第二應用伺服器,這樣,第二應用伺服器就獲得了用戶端所設定的統計規則。In a specific implementation, the second application server may perform real-time statistics on the transaction data according to statistical rules. Before the second application server performs real-time statistical processing on the transaction data according to the statistical rule, the statistical rule for statistical processing of the transaction data set by the user end can be obtained. For example, before the second application server performs statistical processing on the transaction data according to the statistical rule, the administrator who manages the e-commerce transaction data statistics system sets a statistical rule on the user end, and the user terminal provides the statistical rule to the second application server. In this way, the second application server obtains the statistical rules set by the client.

在實際應用中,上述統計規則例如包括對同一個類別的交易資料進行疊加操作的規定,這種情況下,第二應用伺服器可以將獲得的交易資料和同一個類別的歷史交易資料進行疊加。In practical applications, the above statistical rules include, for example, a provision for superimposing transaction data of the same category. In this case, the second application server may superimpose the obtained transaction data with the historical transaction data of the same category.

以交易資料所屬的類別是用戶為例,第二資料庫可以以一個用戶為單位儲存這個用戶的交易記錄,或者說,每個用戶資訊只對應一條交易記錄,每條交易記錄只對應一個用戶資訊,交易記錄中記錄有這個用戶的交易資料。在具體實現時,第二應用伺服器獲得一個用戶的交易資料和這個用戶的歷史交易資料後,將這個用戶的交易資料和這個用戶的歷史交易資料進行疊加,得到這個用戶的當前交易資料,之後,將這個用戶的當前交易資料儲存到第二資料庫中保存的這個用戶的交易記錄中。For example, the user belongs to the category in which the transaction data belongs. The second database can store the transaction record of the user in units of one user, or each user information only corresponds to one transaction record, and each transaction record only corresponds to one user information. The transaction data of this user is recorded in the transaction record. In a specific implementation, after obtaining the transaction data of the user and the historical transaction data of the user, the second application server superimposes the transaction data of the user and the historical transaction data of the user to obtain the current transaction data of the user, and then The current transaction data of the user is stored in the transaction record of the user saved in the second database.

例如,假設用戶1的交易記錄中記錄有用戶1的帳號、建立交易次數、交易總金額等資訊,並假設用戶1通過用戶端在電子商務交易系統中完成了一次交易,第一應用伺服器為此產生的交易資料包括交易金額,第二應用伺服器在獲得交易資料後,如果判斷出交易資料對應的是用戶1,那麼第二應用伺服器要向第二資料庫請求提供用戶1的歷史交易資料,第二資料庫查找到用戶1對應的交易記錄後,向第二應用伺服器返回用戶1的歷史交易資料。之後,第二應用伺服器將獲得的交易金額與用戶1對應的交易記錄中原有的交易總金額相加(即結合獲得的用戶1的交易資料和用戶1的歷史交易資料),得到新的交易總金額(即用戶1的當前交易資料)。。第二應用伺服器得到新的交易總金額後,可以將新的交易總金額提供給管理員使用的用戶端,或者,根據新的交易總金額繪製用戶1的交易總金額的顯示曲線,管理員通過顯示曲線可以直觀的瞭解到用戶1的交易總金額的變化趨勢。For example, suppose that the transaction record of the user 1 records the account number of the user 1, the number of transactions established, the total amount of the transaction, and the like, and assumes that the user 1 completes a transaction in the e-commerce transaction system through the user terminal, and the first application server is The transaction data generated includes the transaction amount, and after the second application server obtains the transaction data, if it is determined that the transaction data corresponds to the user 1, the second application server requests the second database to provide the historical transaction of the user 1. After the second database finds the transaction record corresponding to the user 1, the second database returns the historical transaction data of the user 1 to the second application server. After that, the second application server adds the transaction amount obtained to the original transaction total amount in the transaction record corresponding to the user 1 (ie, the acquired transaction data of the user 1 and the historical transaction data of the user 1) to obtain a new transaction. The total amount (ie the current transaction data of User 1). . After the second application server obtains the total amount of the new transaction, the total amount of the new transaction can be provided to the client used by the administrator, or the display curve of the total transaction amount of the user 1 is plotted according to the total amount of the new transaction, the administrator By displaying the curve, it is possible to intuitively understand the trend of the total amount of the transaction of the user 1.

以交易資料所屬的類別是交易操作種類為例。每個交易資料對應至少一個交易資料類別,交易資料類別例如為在一段時間內的交易總金額、在一段時間內的建立交易的總次數或在一段時間內的成功交易的總次數等。在具體實現時,第二應用伺服器獲得一個交易操作種類的交易資料和這個交易操作種類的歷史交易資料後,將這個交易操作種類的交易資料和這個交易操作種類的歷史交易資料進行疊加,得到這個交易操作種類的當前交易資料。Take the category of the transaction data as an example of the type of transaction operation. Each transaction data corresponds to at least one transaction data category, such as the total amount of transactions over a period of time, the total number of transactions established over a period of time, or the total number of successful transactions over a period of time. In a specific implementation, after obtaining the transaction data of the transaction operation type and the historical transaction data of the transaction operation type, the second application server superimposes the transaction information of the transaction operation type and the historical transaction data of the transaction operation type to obtain The current transaction data for this transaction type.

例如,假設第二應用伺服器需要統計在一段時間內的交易總金額(交易操作種類為付款和/或收款,可以不區分用戶),並假設用戶1通過用戶端在電子商務交易系統中完成了一次交易,第二應用伺服器為此產生的交易資料包括交易金額,第二應用伺服器在獲得交易資料後,如果判斷出交易資料中的交易金額對應付款和/或收款這個類別,那麼第二應用伺服器要向第二資料庫請求提供付款和/或收款對應的歷史交易金額,第二資料庫查找到付款和/或收款對應的歷史交易金額後,向第二應用伺服器返回付款和/或收款對應的歷史交易金額。之後,第二應用伺服器將獲得的交易金額與付款和/或收款對應的歷史交易金額相加,得到付款和/或收款對應的新的交易總金額。第二應用伺服器在得到付款和/或收款對應的新的交易總金額後,可以將新的交易總金額提供給管理員使用的用戶端,或者,根據新的交易總金額繪製在一段時間內的交易總金額的顯示曲線,管理員通過顯示曲線可以直觀的瞭解到在一段時間內的交易總金額的變化趨勢。For example, suppose that the second application server needs to count the total amount of transactions over a period of time (the type of transaction operation is payment and/or collection, which may not distinguish users), and assume that user 1 completes in the e-commerce transaction system through the client. a transaction, the transaction data generated by the second application server for this includes the transaction amount, and after the second application server obtains the transaction data, if it is determined that the transaction amount in the transaction data corresponds to the payment and/or collection category, then The second application server requests the second database to provide the historical transaction amount corresponding to the payment and/or payment, and the second database finds the historical transaction amount corresponding to the payment and/or the payment, and then sends the second transaction server to the second application server. Returns the historical transaction amount corresponding to the payment and/or receipt. Thereafter, the second application server adds the obtained transaction amount to the historical transaction amount corresponding to the payment and/or the receipt, and obtains the new transaction total amount corresponding to the payment and/or the receipt. After obtaining the new transaction total amount corresponding to the payment and/or payment, the second application server may provide the total amount of the new transaction to the client used by the administrator, or draw the total amount of the new transaction for a period of time according to the total amount of the new transaction. The display curve of the total amount of transactions within the transaction, the administrator can intuitively understand the trend of the total amount of transactions over a period of time by displaying the curve.

前面提到過,第二資料庫從資料倉庫系統獲得的符合預設條件的交易資料與之前保存的符合預設條件的交易資料可能不一致。如果第二資料庫從資料倉庫系統獲得的符合預設條件的交易資料與之前保存的符合預設條件的交易資料不一致,那麼第二應用伺服器可以以資料倉庫系統提供的資料為準進行統計。也就是說,第二資料庫向第二應用伺服器提供的資料都是資料倉庫系統保存的完整、準確的資料,這樣,第二應用伺服器是以完整、準確的資料為準進行統計的。As mentioned above, the transaction data of the second database obtained from the data warehouse system that meets the preset conditions may not be consistent with the previously saved transaction data that meets the preset conditions. If the transaction data of the second database obtained from the data warehouse system that meets the preset conditions is inconsistent with the previously saved transaction data that meets the preset conditions, the second application server may perform statistics based on the data provided by the data warehouse system. That is to say, the data provided by the second database to the second application server is complete and accurate data stored by the data warehouse system, so that the second application server is based on complete and accurate data.

例如,假設在10分鐘之內,用戶1通過用戶端在電子商務交易系統中完成了一次交易,第一應用伺服器發出了非同步消息,非同步消息攜帶了第一應用伺服器為此次交易產生的交易資料,交易資料包括交易金額,但第二應用伺服器沒有收到這個非同步消息。在10分鐘結束時,第二資料庫向資料倉庫系統發出了查詢在10分鐘之內發生變化的資料的請求,資料倉庫系統向第二資料庫返回了在10分鐘之內發生變化的資料,發生變化的資料包括上述的交易金額,第二資料庫將從資料倉庫系統獲得的在10分鐘之內發生變化的資料和自己保存的在10分鐘之內發生變化的資料相比較,確定自己沒有獲得用戶1在10分鐘之內完成的一次交易而產生的交易資料,對此,第二資料庫將用戶1在10分鐘之內完成的一次交易而產生的交易資料保存到用戶1對應的交易記錄中,之後,第二應用伺服器可以修改用戶1的交易金額對應的顯示曲線,並將修改後的顯示曲線提供給管理員使用的用戶端。For example, suppose that within 10 minutes, user 1 completes a transaction in the e-commerce transaction system through the client, the first application server issues an asynchronous message, and the non-synchronized message carries the first application server as the transaction. The generated transaction data, the transaction data includes the transaction amount, but the second application server does not receive the asynchronous message. At the end of 10 minutes, the second database sent a request to the data warehouse system to query the data that changed within 10 minutes. The data warehouse system returned the data that changed within 10 minutes to the second database. The changed information includes the transaction amount mentioned above, and the second database compares the data obtained by the data warehouse system within 10 minutes with the data saved within 10 minutes, and determines that the user has not obtained the user. 1 transaction data generated by a transaction completed within 10 minutes. For this, the second database saves the transaction data generated by the user 1 for a transaction completed within 10 minutes to the transaction record corresponding to the user 1, After that, the second application server may modify the display curve corresponding to the transaction amount of the user 1, and provide the modified display curve to the client used by the administrator.

可選的,在執行S301後,第二應用伺服器可以將獲得交易資料的日誌記錄在第二資料庫中的交易資料日誌表中。交易資料日誌表中可以以一個用戶發起的事件為單位構造一條記錄,或者說,以一個非同步消息為單位構造一條記錄。Optionally, after executing S301, the second application server may record the log of obtaining the transaction data in the transaction data log table in the second database. The transaction data log table can construct a record in units of a user-initiated event, or construct a record in units of an asynchronous message.

另外,第二應用伺服器在每次獲得交易資料後,都可以將交易資料儲存到第二資料庫中。第二資料庫也可以分析交易資料,獲取交易資料所屬類別的資訊,將交易資料與其所屬類別的資訊進行綁定。這樣,第二資料庫在後續查找這個類別的交易資料時,就可以根據綁定關係,查找到與這個類別綁定的所有交易資料。In addition, the second application server can store the transaction data in the second database after obtaining the transaction data each time. The second database can also analyze the transaction data, obtain the information of the category of the transaction data, and bind the transaction data with the information of the category to which it belongs. In this way, when the second database searches for the transaction data of this category, it can find all the transaction materials bound to the category according to the binding relationship.

此外,在實際應用中,管理電子商務系統的管理員可能會需要查詢交易資料,這種情況下,管理員使用的用戶端可以向第二應用伺服器發出查詢符合某個條件的交易資料的請求消息,第二應用伺服器獲得請求消息後,可以向第二資料庫發出查詢符合這個條件的交易資料,第二資料庫查找到符合這個條件的交易資料後,向第二應用伺服器返回符合這個條件的交易資料,第二應用伺服器再向管理員使用的用戶端返回符合這個條件的交易資料。In addition, in practical applications, the administrator managing the e-commerce system may need to query the transaction data. In this case, the client used by the administrator may send a request to the second application server to query the transaction data that meets certain conditions. The message, after the second application server obtains the request message, may send a transaction data that meets the condition to the second database, and the second database returns the transaction data that meets the condition, and returns the information to the second application server. The transaction data of the condition, the second application server returns the transaction data that meets the condition to the client used by the administrator.

與本申請監控事件的方法的實施例相對應,本申請還提供了設置於電子商務交易資料統計系統中的應用伺服器的實施例。這種應用伺服器適用於包括電子商務交易系統、資料倉庫系統及電子商務交易資料統計系統的電子商務系統,該電子商務交易系統包括第一應用伺服器和第一資料庫,該電子商務交易資料統計系統用於統計從該電子商務交易系統獲得的交易資料,該電子商務交易資料統計系統包括該應用伺服器和第二資料庫。如圖4所示,該應用伺服器包括:交易資料處理單元401和交易資料統計單元402;交易資料處理單元401用於即時獲得該第一應用伺服器發出的交易資料,並在每次獲得交易資料後,將該交易資料發給交易資料統計單元402;交易資料統計單元402用於獲得並分析該交易資料,獲取該交易資料所屬類別的資訊,根據該交易資料所屬類別的資訊,從該第二資料庫中獲得該類別的歷史交易資料,並結合該交易資料和該類別的歷史交易資料,得到該類別的當前交易資料;其中,該第二資料庫非即時的向該資料倉庫系統查詢並獲取符合預設條件的交易資料,將獲得的交易資料與之前對應的交易資料進行比較,更新不一致的交易資料。Corresponding to the embodiment of the method for monitoring an event of the present application, the present application also provides an embodiment of an application server disposed in an e-commerce transaction data statistics system. The application server is applicable to an e-commerce system including an e-commerce transaction system, a data warehouse system, and an e-commerce transaction data statistics system. The e-commerce transaction system includes a first application server and a first database, and the e-commerce transaction data The statistical system is configured to count transaction data obtained from the e-commerce transaction system, and the e-commerce transaction data statistics system includes the application server and the second database. As shown in FIG. 4, the application server includes: a transaction data processing unit 401 and a transaction data statistics unit 402. The transaction data processing unit 401 is configured to obtain the transaction data sent by the first application server in real time, and obtain the transaction each time. After the data is sent, the transaction data is sent to the transaction data statistics unit 402. The transaction data statistics unit 402 is configured to obtain and analyze the transaction data, and obtain information about the category of the transaction data, according to the information of the category of the transaction data. The second database obtains the historical transaction data of the category, and combines the transaction data with the historical transaction data of the category to obtain the current transaction data of the category; wherein the second database is not immediately queried to the data warehouse system and Obtain transaction data that meets the preset conditions, compare the obtained transaction data with the corresponding transaction data, and update the inconsistent transaction data.

在實際應用中,交易資料處理單元401在每次獲得交易資料後,將該交易資料發給交易資料統計單元402,其實質就是觸發交易資料統計單元402對交易資料進行統計處理。在具體實現時,交易資料處理單元401可以向交易資料統計單元402發出用於觸發交易資料統計單元402對交易資料進行統計的觸發消息,這個觸發消息攜帶有交易資料。In an actual application, the transaction data processing unit 401 sends the transaction data to the transaction data statistics unit 402 each time the transaction data is obtained, and the essence is that the transaction data statistics unit 402 is triggered to perform statistical processing on the transaction data. In a specific implementation, the transaction data processing unit 401 may send a trigger message to the transaction data statistics unit 402 for triggering the transaction data statistics unit 402 to perform statistics on the transaction data, and the trigger message carries the transaction data.

在實際應用中,交易資料統計單元402獲得交易資料後,可以對交易資料進行分析,確定交易資料所屬的類別,即,獲取交易資料所屬類別的資訊。在具體實現時,第一應用伺服器發出的交易資料不僅僅可以攜帶交易資料的資料內容,還可以攜帶交易資料所屬類別的資訊,這種情況下,交易資料統計單元402可以直接從交易資料中獲取交易資料所屬類別的資訊。交易資料統計單元402也可以預先儲存記錄關鍵字與類別資訊映射關係的映射表,一個類別資訊可以只對應一個關鍵字,一個類別資訊也可以對應多個關鍵字,交易資料統計單元402獲得交易資料後,可以從交易資料中提取關鍵字,使用關鍵字在該映射表中查找與關鍵字對應的類別資訊,這樣也可以獲取交易資料所屬類別的資訊。當然,交易資料統計單元402還可以通過其他多種方式分析交易資料,獲取交易資料所屬類別的資訊,這裏不再一一舉例說明。In an actual application, after the transaction data statistics unit 402 obtains the transaction data, the transaction data may be analyzed to determine the category to which the transaction data belongs, that is, the information of the category to which the transaction data belongs. In a specific implementation, the transaction data sent by the first application server can not only carry the data content of the transaction data, but also carry the information of the category of the transaction data. In this case, the transaction data statistics unit 402 can directly from the transaction data. Get information about the category of the transaction data. The transaction data statistic unit 402 may also pre-store a mapping table of the mapping relationship between the record keyword and the category information. One category information may correspond to only one keyword, one category information may also correspond to multiple keywords, and the transaction data statistic unit 402 obtains transaction data. After that, keywords can be extracted from the transaction data, and the category information corresponding to the keyword can be found in the mapping table by using the keyword, so that the information of the category to which the transaction data belongs can also be obtained. Of course, the transaction data statistics unit 402 can also analyze the transaction data in various other ways to obtain the information of the category to which the transaction data belongs, and no further examples are given here.

交易資料統計單元402獲取交易資料所屬類別的資訊後,可以向第二資料庫發出請求消息,請求消息攜帶交易資料所屬類別的資訊,請求消息用於表示請求提供交易資料所屬類別的歷史交易資料。第二資料庫接收到請求消息後,可以使用請求消息攜帶的交易資料所屬類別的資訊作為關鍵字,在本地查找交易資料所屬類別的歷史交易資料,並將查找到的歷史交易資料返回給交易資料統計單元402。特殊情況下,由於第二資料庫可能未儲存過交易資料所屬類別的交易資料等原因,第二資料庫在接收到請求消息後,可以向交易資料統計單元402返回一個回應消息,這個回應消息用於表示沒有查找到交易資料所屬類別的歷史交易資料等內容。After obtaining the information of the category to which the transaction data belongs, the transaction data statistics unit 402 may send a request message to the second database, the request message carries the information of the category to which the transaction data belongs, and the request message is used to indicate the historical transaction data of the category to which the transaction data is requested to be provided. After receiving the request message, the second database may use the information of the category of the transaction data carried in the request message as a keyword, locally search the historical transaction data of the category to which the transaction data belongs, and return the found historical transaction data to the transaction data. Statistics unit 402. In a special case, since the second database may not store the transaction data of the category to which the transaction data belongs, the second database may return a response message to the transaction data statistics unit 402 after receiving the request message, and the response message is used. It means that there is no history transaction data such as the category of the transaction data.

在實際應用中,交易資料統計單元402可以按照統計規則對交易資料進行即時統計。交易資料統計單元402在按照統計規則對交易資料進行即時統計處理之前,可以獲得用戶端所設定的對交易資料進行統計處理的統計規則。例如,在交易資料統計單元402按照統計規則對交易資料進行統計處理之前,管理電子商務交易資料統計系統的管理員在用戶端上設定統計規則,用戶端將統計規則提供給交易資料統計單元402,這樣,交易資料統計單元402就獲得了用戶端所設定的統計規則。In practical applications, the transaction data statistics unit 402 can perform real-time statistics on transaction data according to statistical rules. The transaction data statistics unit 402 can obtain the statistical rules for statistical processing of the transaction data set by the client before performing the real-time statistical processing on the transaction data according to the statistical rules. For example, before the transaction data statistics unit 402 performs statistical processing on the transaction data according to the statistical rule, the administrator managing the e-commerce transaction data statistics system sets a statistical rule on the user end, and the user terminal provides the statistical rule to the transaction data statistical unit 402. Thus, the transaction data statistic unit 402 obtains the statistical rules set by the client.

在實際應用中,上述統計規則例如包括對同一個類別的交易資料進行疊加操作的規定,這種情況下,交易資料統計單元402可以將獲得的交易資料和同一個類別的歷史交易資料進行疊加。In practical applications, the above statistical rules include, for example, a provision for superimposing transaction data of the same category. In this case, the transaction data statistics unit 402 may superimpose the obtained transaction data with the historical transaction data of the same category.

在實際應用中,如果第二資料庫從資料倉庫系統獲得的符合預設條件的交易資料與之前保存的符合預設條件的交易資料不一致,那麼交易資料統計單元402可以以資料倉庫系統提供的資料為準進行統計。也就是說,第二資料庫向交易資料統計單元402提供的資料都是資料倉庫系統保存的完整、準確的資料,這樣,交易資料統計單元402是以完整、準確的資料為準進行統計的。In an actual application, if the transaction data obtained by the second database from the data warehouse system that meets the preset condition is inconsistent with the previously saved transaction data that meets the preset condition, the transaction data statistics unit 402 may use the data provided by the data warehouse system. For the purpose of statistics. That is to say, the data provided by the second database to the transaction data statistics unit 402 is complete and accurate data stored by the data warehouse system. Thus, the transaction data statistics unit 402 performs statistics based on complete and accurate data.

在實際應用中,交易資料處理單元401在每次獲得交易資料後,可以將獲得交易資料的日誌記錄在第二資料庫中的交易資料日誌表中。In an actual application, the transaction data processing unit 401 may record the log of the obtained transaction data in the transaction data log table in the second database after each time the transaction data is obtained.

在實際應用中,交易資料處理單元401在每次獲得交易資料後,可以將交易資料儲存到第二資料庫中。交易資料統計單元402在獲得該交易資料後,也可以將該交易資料儲存到該第二資料庫中。在實際應用中,交易資料處理單元401和交易資料統計單元402兩者之一將交易資料儲存到第二資料庫中即可。In an actual application, the transaction data processing unit 401 may store the transaction data in the second database after obtaining the transaction data each time. After obtaining the transaction data, the transaction data statistics unit 402 may also store the transaction data in the second database. In an actual application, one of the transaction data processing unit 401 and the transaction data statistics unit 402 may store the transaction data in the second database.

在實際應用中,管理電子商務系統的管理員可能會需要查詢交易資料,這種情況下,管理員使用的用戶端可以向交易資料統計單元402發出查詢符合某個條件的交易資料的請求消息,交易資料統計單元402獲得請求消息後,可以向第二資料庫發出查詢符合這個條件的交易資料,第二資料庫查找到符合這個條件的交易資料後,向交易資料統計單元402返回符合這個條件的交易資料,交易資料統計單元402再向管理員使用的用戶端返回符合這個條件的交易資料。In an actual application, an administrator managing the e-commerce system may need to query the transaction data. In this case, the client used by the administrator may send a request message to the transaction data statistics unit 402 to query the transaction data that meets certain conditions. After obtaining the request message, the transaction data statistics unit 402 may issue a transaction data that meets the condition to the second database. After the second database finds the transaction data that meets the condition, the transaction data statistic unit 402 returns a condition that meets the condition. In the transaction data, the transaction data statistic unit 402 returns the transaction data that meets the conditions to the client used by the administrator.

由於圖4所示的應用伺服器實施例是與圖3所示的方法實施例相對應的實施例,所以,圖4所示的應用伺服器中的各個功能單元的功能及相互配合關係的詳細描述可以參照圖3所示的方法實施例中的相關描述,這裏不再贅述。Since the application server embodiment shown in FIG. 4 is an embodiment corresponding to the method embodiment shown in FIG. 3, the functions and mutual cooperation relationships of the respective functional units in the application server shown in FIG. For a description, reference may be made to the related description in the method embodiment shown in FIG. 3, and details are not described herein again.

由圖3所示的方法可知,圖3所示的方法中的很多步驟都是以電子商務交易資料統計系統包括的應用伺服器為執行主體,另外,圖4所示的應用伺服器也是設置在電子商務交易資料統計系統中的,所以,本申請實施例還提供了一種電子商務交易資料統計系統。這種電子商務交易資料統計系統適用於包括電子商務交易系統、資料倉庫系統及電子商務交易資料統計系統的電子商務系統,該電子商務交易系統包括第一應用伺服器和第一資料庫,該電子商務交易資料統計系統用於統計從該電子商務交易系統獲得的交易資料。It can be seen from the method shown in FIG. 3 that many steps in the method shown in FIG. 3 are performed by using an application server included in the e-commerce transaction data statistics system, and the application server shown in FIG. 4 is also disposed. The e-commerce transaction data statistics system, therefore, the embodiment of the present application also provides an e-commerce transaction data statistics system. The e-commerce transaction data statistics system is applicable to an e-commerce system including an e-commerce transaction system, a data warehouse system, and an e-commerce transaction data statistics system, the e-commerce transaction system including a first application server and a first database, the electronic The business transaction data statistics system is used to count transaction data obtained from the e-commerce transaction system.

如圖5所示,這種電子商務交易資料統計系統包括第二應用伺服器和第二資料庫502;第二應用伺服器501用於即時獲得該第一應用伺服器發出的交易資料,在每次獲得交易資料後,分析該交易資料,獲取該交易資料所屬類別的資訊,根據該交易資料所屬類別的資訊,從第二資料庫502中獲得該類別的歷史交易資料,並結合該交易資料和該類別的歷史交易資料,得到該類別的當前交易資料;第二資料庫502用於儲存交易資料,並非即時的向該資料倉庫系統查詢並獲取符合預設條件的交易資料,將獲得的交易資料與之前對應的交易資料進行比較,更新不一致的交易資料。As shown in FIG. 5, the e-commerce transaction data statistics system includes a second application server and a second database 502. The second application server 501 is configured to obtain the transaction data sent by the first application server in real time. After obtaining the transaction data, analyzing the transaction data, obtaining the information of the category of the transaction data, obtaining the historical transaction data of the category from the second database 502 according to the information of the category of the transaction data, and combining the transaction data and The historical transaction data of the category obtains the current transaction data of the category; the second database 502 is used for storing the transaction data, and is not an instant query to the data warehouse system and obtaining the transaction data that meets the preset conditions, and the transaction data to be obtained. Compare with the corresponding transaction data to update the inconsistent transaction data.

可選的,第二資料庫502中可以設置有用於儲存交易資料的日誌的交易資料日誌表和用於儲存交易資料的交易資料基準表。在交易資料日誌表中,一條記錄可以以一個用戶發起的事件為單位,在交易資料基準表中,一條記錄可以以一個用戶為單位。第二應用伺服器501可以將獲得交易資料的日誌記錄在交易資料日誌表中。Optionally, the second database 502 may be provided with a transaction data log table for storing the log of the transaction data and a transaction data reference table for storing the transaction data. In the transaction data log table, a record can be in units of a user-initiated event. In the transaction data reference table, a record can be in units of one user. The second application server 501 can record the log of the transaction data in the transaction data log table.

第二應用伺服器501和第二資料庫502的具體功能以及相互配合關係的詳細描述可以參照圖3所示的方法實施例和圖4所示的應用伺服器實施例中的相關描述,這裏不再贅述。For a detailed description of the specific functions and the mutual cooperation relationship between the second application server 501 and the second database 502, reference may be made to the method embodiment shown in FIG. 3 and the related description in the application server embodiment shown in FIG. Let me repeat.

除圖3所示的方法實施例外,本申請實施例還提供一種統計電子商務交易資料的方法。這種方法適用於包括電子商務交易系統、資料倉庫系統及電子商務交易資料統計系統的電子商務系統,該電子商務交易系統包括第一應用伺服器和第一資料庫,該電子商務交易資料統計系統用於統計從該電子商務交易系統獲得的交易資料,該電子商務交易資料統計系統包括第二應用伺服器和第二資料庫。如圖6所示,方法包括:In addition to the method implementation shown in FIG. 3, the embodiment of the present application also provides a method for counting e-commerce transaction data. The method is applicable to an e-commerce system including an e-commerce transaction system, a data warehouse system and an e-commerce transaction data statistics system, the e-commerce transaction system comprising a first application server and a first database, the e-commerce transaction data statistics system For counting transaction data obtained from the e-commerce transaction system, the e-commerce transaction data statistics system includes a second application server and a second database. As shown in Figure 6, the method includes:

S601:第二應用伺服器即時獲得第一應用伺服器發出的交易資料。S601: The second application server immediately obtains the transaction data sent by the first application server.

具體的,第一應用伺服器可以即時的向獨立於電子商務交易系統和資料倉庫系統的電子商務交易資料統計系統提供交易資料,具體的,第一應用伺服器即時的向第二應用伺服器提供交易資料。Specifically, the first application server can provide transaction data to the e-commerce transaction data statistics system independent of the e-commerce transaction system and the data warehouse system, and the first application server provides the transaction information to the second application server. Transaction information.

第一應用伺服器可以按照這樣的方式即時向第二應用伺服器提供交易資料,即,第一應用伺服器可以發出非同步消息,非同步消息中攜帶有交易資料。一個非同步消息可以攜帶一個用戶進行一次操作所產生的資料。非同步消息既可以是可靠的非同步消息,也可以是不可靠的非同步消息。如果第一應用伺服器發出的是可靠的非同步消息,那麼非同步消息可以不會丟失的到達第二應用伺服器;如果第一應用伺服器發出的是不可靠的非同步消息,那麼可能會發生非同步消息丟失的現象,或者說,第二應用伺服器可能會接收不到非同步消息,這種情況下,第二應用伺服器可能會無法獲得一些交易資料。The first application server can immediately provide transaction data to the second application server in such a manner that the first application server can issue an asynchronous message, and the asynchronous message carries the transaction data. An asynchronous message can carry a data generated by a user performing an operation. The asynchronous message can be either a reliable asynchronous message or an unreliable asynchronous message. If the first application server sends a reliable asynchronous message, the asynchronous message may arrive at the second application server without being lost; if the first application server sends an unreliable asynchronous message, then the The phenomenon that the asynchronous message is lost occurs, or the second application server may not receive the asynchronous message. In this case, the second application server may not be able to obtain some transaction data.

在實際應用中,使用可靠的非同步消息的成本會比較高,而使用不可靠的非同步消息的成本會比較低。In practical applications, the cost of using reliable asynchronous messages will be higher, and the cost of using unreliable asynchronous messages will be lower.

另外,第一應用伺服器發出非同步消息的動作對於第一應用伺服器來說,代價可以忽略不計,也就是說,第一應用伺服器發出非同步消息的動作不會影響電子商務交易系統提供的正常業務交易。In addition, the action of the first application server to issue the asynchronous message is negligible for the first application server, that is, the action of the first application server to send the asynchronous message does not affect the e-commerce transaction system. Normal business transactions.

S602:在每次獲得交易資料後,該第二應用伺服器將該交易資料儲存到第二資料庫中,並分析該交易資料,獲取該交易資料所屬類別的資訊,其中,該第二資料庫非即時的向資料倉庫系統查詢並獲取符合預設條件的交易資料,將獲得的交易資料與之前對應的交易資料進行比較,更新不一致的交易資料。S602: After obtaining the transaction data, the second application server stores the transaction data in the second database, and analyzes the transaction data to obtain information about the category of the transaction data, wherein the second database Non-instantly querying and obtaining the transaction data that meets the preset conditions to the data warehouse system, comparing the obtained transaction data with the corresponding transaction data, and updating the inconsistent transaction data.

在本申請實施例中,可以將交易資料劃分為多個類別,例如,按照用戶或者交易操作種類劃分。In the embodiment of the present application, the transaction data may be divided into a plurality of categories, for example, according to the user or the transaction operation type.

第二應用伺服器獲得交易資料後,要將交易資料儲存到第二資料庫中,並且還要分析交易資料,獲取交易資料所屬類別的資訊。在實際應用中,將交易資料儲存到第二資料庫中和分析交易資料可以同時進行,也可以先後進行,如果先後進行,那麼也沒有必然的先後順序,或者說,先進行哪個操作都可以。After the second application server obtains the transaction data, the transaction data is stored in the second database, and the transaction data is also analyzed to obtain the information of the category of the transaction data. In practical applications, storing the transaction data in the second database and analyzing the transaction data can be performed simultaneously or sequentially. If it is performed sequentially, then there is no inevitable sequence, or which operation can be performed first.

在具體實現時,第一應用伺服器發出的交易資料不僅僅可以攜帶交易資料的資料內容,還可以攜帶交易資料所屬類別的資訊,這種情況下,第二應用伺服器可以直接從交易資料中獲取交易資料所屬類別的資訊。第二應用伺服器也可以預先儲存記錄關鍵字與類別資訊映射關係的映射表,一個類別資訊可以只對應一個關鍵字,一個類別資訊也可以對應多個關鍵字,第二應用伺服器獲得交易資料後,可以從交易資料中提取關鍵字,使用關鍵字在該映射表中查找與關鍵字對應的類別資訊,這樣也可以獲取交易資料所屬類別的資訊。當然,第二應用伺服器還可以通過其他多種方式分析交易資料,獲取交易資料所屬類別的資訊,這裏不再一一舉例說明。In the specific implementation, the transaction data sent by the first application server can not only carry the data content of the transaction data, but also carry the information of the category of the transaction data. In this case, the second application server can directly from the transaction data. Get information about the category of the transaction data. The second application server may also pre-store a mapping table for mapping the relationship between the keyword and the category information. One category information may correspond to only one keyword, one category information may also correspond to multiple keywords, and the second application server may obtain transaction data. After that, keywords can be extracted from the transaction data, and the category information corresponding to the keyword can be found in the mapping table by using the keyword, so that the information of the category to which the transaction data belongs can also be obtained. Of course, the second application server can also analyze the transaction data in various other ways to obtain the information of the category of the transaction data, which will not be exemplified here.

前面提到過,如果第一應用伺服器發出的是不可靠的非同步消息,那麼第二應用伺服器可能會無法接收到一些非同步消息,進而導致第二應用伺服器可能會無法得到一些交易資料。對此,第二資料庫可以非即時的向資料倉庫系統查詢並獲取符合預設條件的交易資料,將獲得的交易資料與之前對應的交易資料進行比較,更新不一致的交易資料。As mentioned earlier, if the first application server sends an unreliable asynchronous message, the second application server may not receive some asynchronous messages, which may result in the second application server may not be able to get some transactions. data. In this regard, the second database may inquire non-instantly to the data warehouse system and obtain transaction data that meets the preset conditions, compare the obtained transaction data with the corresponding transaction data, and update the inconsistent transaction data.

在實際應用中,第二資料庫可以每隔預先設置的週期向資料倉庫系統查詢並獲取符合預設條件的交易資料。預先設置的週期可以由本領域技術人員根據實際需要而設置,例如10分鐘。預設條件也可以由本領域技術人員根據實際需要而設置,例如,在最近的一個週期內所有發生變化的資料,所有發生變化的資料可以是指新增加的資料。In practical applications, the second database can query the data warehouse system and obtain transaction data that meets the preset conditions every preset period. The preset period can be set by a person skilled in the art according to actual needs, for example, 10 minutes. The preset condition can also be set by a person skilled in the art according to actual needs, for example, all the changed data in the most recent period, and all the changed data can refer to the newly added data.

第二資料庫可以將獲得的符合預設條件的交易資料與之前保存的符合預設條件的交易資料進行比較,如果一致,則可以不進行任何處理,如果存在不一致的資料,則更新不一致的交易資料。The second database can compare the obtained transaction data that meets the preset conditions with the previously saved transaction data that meets the preset conditions. If they are consistent, the transaction data may be left unprocessed, and if there is inconsistent data, the inconsistent transaction is updated. data.

S603:該第二應用伺服器根據該交易資料所屬類別的資訊,從該第二資料庫中獲得該交易資料和該類別的歷史交易資料。S603: The second application server obtains the transaction data and the historical transaction data of the category from the second database according to the information of the category to which the transaction data belongs.

第二應用伺服器獲取交易資料所屬類別的資訊後,可以向第二資料庫發出請求消息,請求消息攜帶交易資料所屬類別的資訊,請求消息用於表示請求提供交易資料所屬類別的所有交易資料,包括獲得的交易資料和歷史交易資料。第二資料庫接收到請求消息後,可以使用請求消息攜帶的交易資料所屬類別的資訊作為關鍵字,在本地查找交易資料所屬類別的所有交易資料,並將查找到的所有交易資料返回給第二應用伺服器。特殊情況下,可能由於某個或某些原因,第二資料庫並沒有儲存過上述交易資料所屬類別的歷史交易資料,這種情況下,第二資料庫只能向第二應用伺服器返回第二應用伺服器獲得的上述交易資料所屬類別的交易資料,而無法返回上述交易資料所屬類別的歷史交易資料。After obtaining the information of the category to which the transaction data belongs, the second application server may send a request message to the second database, where the request message carries the information of the category to which the transaction data belongs, and the request message is used to indicate all the transaction materials requesting to provide the category of the transaction data. Includes acquired transaction data and historical transaction data. After receiving the request message, the second database may use the information of the category of the transaction data carried by the request message as a key to locally search all the transaction materials of the category to which the transaction data belongs, and return all the found transaction data to the second. Application server. In special cases, the second database may not store historical transaction data of the category of the above transaction data for one reason or some reasons. In this case, the second database can only return to the second application server. The transaction data of the category of the transaction data obtained by the application server is not returned to the historical transaction data of the category of the transaction data.

S604:該第二應用伺服器結合該交易資料和該類別的歷史交易資料,得到該類別的當前交易資料。S604: The second application server combines the transaction data and the historical transaction data of the category to obtain current transaction data of the category.

這裏需要說明的是,雖然第二應用伺服器之前已經將獲得的交易資料儲存到第二資料庫中,但第二資料庫可以只是將獲得的交易資料與對應的類別進行綁定,而不是與相同類別的交易資料進行疊加等操作,這種情況下,第二資料庫中儲存的這個類別的交易資料至少包括第二應用伺服器獲得的交易資料和這個類別的歷史交易資料。所以,第二應用伺服器從第二資料庫中得到的這個類別的交易資料至少包括第二應用伺服器獲得的交易資料和這個類別的歷史交易資料。因此,第二應用伺服器可以結合自己獲得的交易資料和這個類別的歷史交易資料,得到這個類別的當前交易資料。It should be noted that although the second application server has previously stored the obtained transaction data into the second database, the second database may simply bind the obtained transaction data to the corresponding category, instead of The same type of transaction data is superimposed and the like. In this case, the transaction data of this category stored in the second database includes at least the transaction data obtained by the second application server and the historical transaction data of this category. Therefore, the transaction data of the category obtained by the second application server from the second database includes at least the transaction data obtained by the second application server and the historical transaction data of the category. Therefore, the second application server can combine the transaction data obtained by itself and the historical transaction data of this category to obtain the current transaction data of this category.

在具體實現時,第二應用伺服器可以按照統計規則對交易資料進行即時統計。第二應用伺服器在按照統計規則對交易資料進行即時統計處理之前,可以獲得用戶端所設定的對交易資料進行統計處理的統計規則。例如,在第二應用伺服器按照統計規則對交易資料進行統計處理之前,管理電子商務交易資料統計系統的管理員在用戶端上設定統計規則,用戶端將統計規則提供給第二應用伺服器,這樣,第二應用伺服器就獲得了用戶端所設定的統計規則。In a specific implementation, the second application server may perform real-time statistics on the transaction data according to statistical rules. Before the second application server performs real-time statistical processing on the transaction data according to the statistical rule, the statistical rule for statistical processing of the transaction data set by the user end can be obtained. For example, before the second application server performs statistical processing on the transaction data according to the statistical rule, the administrator who manages the e-commerce transaction data statistics system sets a statistical rule on the user end, and the user terminal provides the statistical rule to the second application server. In this way, the second application server obtains the statistical rules set by the client.

在實際應用中,上述統計規則例如包括對同一個類別的交易資料進行疊加操作的規定,這種情況下,第二應用伺服器可以將獲得的交易資料和同一個類別的歷史交易資料進行疊加。In practical applications, the above statistical rules include, for example, a provision for superimposing transaction data of the same category. In this case, the second application server may superimpose the obtained transaction data with the historical transaction data of the same category.

前面提到過,第二資料庫從資料倉庫系統獲得的符合預設條件的交易資料與之前保存的符合預設條件的交易資料可能不一致。如果第二資料庫從資料倉庫系統獲得的符合預設條件的交易資料與之前保存的符合預設條件的交易資料不一致,那麼第二應用伺服器可以以資料倉庫系統提供的資料為準進行統計。也就是說,第二資料庫向第二應用伺服器提供的資料都是資料倉庫系統保存的完整、準確的資料,這樣,第二應用伺服器是以完整、準確的資料為準進行統計的。As mentioned above, the transaction data of the second database obtained from the data warehouse system that meets the preset conditions may not be consistent with the previously saved transaction data that meets the preset conditions. If the transaction data of the second database obtained from the data warehouse system that meets the preset conditions is inconsistent with the previously saved transaction data that meets the preset conditions, the second application server may perform statistics based on the data provided by the data warehouse system. That is to say, the data provided by the second database to the second application server is complete and accurate data stored by the data warehouse system, so that the second application server is based on complete and accurate data.

可選的,在執行S601後,第二應用伺服器可以將獲得交易資料的日誌記錄在第二資料庫中的交易資料日誌表中。交易資料日誌表中可以以一個用戶發起的事件為單位構造一條記錄,或者說,以一個非同步消息為單位構造一條記錄。Optionally, after executing S601, the second application server may record the log of obtaining the transaction data in the transaction data log table in the second database. The transaction data log table can construct a record in units of a user-initiated event, or construct a record in units of an asynchronous message.

另外,第二應用伺服器在將交易資料儲存到第二資料庫中後,第二資料庫也可以分析交易資料,獲取交易資料所屬類別的資訊,將交易資料與其所屬類別的資訊進行綁定。這樣,第二資料庫在後續查找這個類別的交易資料時,就可以根據綁定關係,查找到與這個類別綁定的所有交易資料。In addition, after the second application server stores the transaction data in the second database, the second database may also analyze the transaction data, obtain the information of the category of the transaction data, and bind the transaction data with the information of the category to which it belongs. In this way, when the second database searches for the transaction data of this category, it can find all the transaction materials bound to the category according to the binding relationship.

此外,在實際應用中,管理電子商務系統的管理員可能會需要查詢交易資料,這種情況下,管理員使用的用戶端可以向第二應用伺服器發出查詢符合某個條件的交易資料的請求消息,第二應用伺服器獲得請求消息後,可以向第二資料庫發出查詢符合這個條件的交易資料,第二資料庫查找到符合這個條件的交易資料後,向第二應用伺服器返回符合這個條件的交易資料,第二應用伺服器再向管理員使用的用戶端返回符合這個條件的交易資料。In addition, in practical applications, the administrator managing the e-commerce system may need to query the transaction data. In this case, the client used by the administrator may send a request to the second application server to query the transaction data that meets certain conditions. The message, after the second application server obtains the request message, may send a transaction data that meets the condition to the second database, and the second database returns the transaction data that meets the condition, and returns the information to the second application server. The transaction data of the condition, the second application server returns the transaction data that meets the condition to the client used by the administrator.

圖6所示的方法實施例與圖3所示的方法實施例存在相同的技術特徵,對於這些相同技術特徵的具體描述可以參照圖3所示的方法實施例中的相關描述,這裏不再贅述。The method embodiment shown in FIG. 6 has the same technical features as the method embodiment shown in FIG. 3 . For a detailed description of the same technical features, reference may be made to the related description in the method embodiment shown in FIG. 3 , and details are not described herein again. .

與圖6所示的方法實施例相對應,本申請還提供了設置於電子商務交易資料統計系統中的應用伺服器的實施例。這種應用伺服器適用於包括電子商務交易系統、資料倉庫系統及電子商務交易資料統計系統的電子商務系統,該電子商務交易系統包括第一應用伺服器和第一資料庫,該電子商務交易資料統計系統用於統計從該電子商務交易系統獲得的交易資料,該電子商務交易資料統計系統包括該應用伺服器和第二資料庫。請再參見圖4,該應用伺服器包括:交易資料處理單元401和交易資料統計單元402;交易資料處理單元401用於即時獲得該第一應用伺服器發出的交易資料,在每次獲得交易資料後,將該交易資料儲存到該第二資料庫中,並分析該交易資料,獲取該交易資料所屬類別的資訊,向交易資料統計單元402發出攜帶該交易資料所屬類別的資訊的觸發消息,該觸發消息用於觸發交易資料統計單元402統計交易資料;交易資料統計單元402用於根據該交易資料所屬類別的資訊,從該第二資料庫中獲得該交易資料和該類別的歷史交易資料,並結合該交易資料和該類別的歷史交易資料,得到該類別的當前交易資料;其中,該第二資料庫非即時的向該資料倉庫系統查詢並獲取符合預設條件的交易資料,將獲得的交易資料與之前對應的交易資料進行比較,更新不一致的交易資料。Corresponding to the method embodiment shown in FIG. 6, the present application also provides an embodiment of an application server disposed in an e-commerce transaction data statistics system. The application server is applicable to an e-commerce system including an e-commerce transaction system, a data warehouse system, and an e-commerce transaction data statistics system. The e-commerce transaction system includes a first application server and a first database, and the e-commerce transaction data The statistical system is configured to count transaction data obtained from the e-commerce transaction system, and the e-commerce transaction data statistics system includes the application server and the second database. Referring to FIG. 4 again, the application server includes: a transaction data processing unit 401 and a transaction data statistics unit 402. The transaction data processing unit 401 is configured to obtain the transaction data sent by the first application server in real time, and obtain the transaction data each time. And storing the transaction data in the second database, analyzing the transaction data, obtaining information about the category of the transaction data, and sending a trigger message to the transaction data statistics unit 402 that carries the information of the category to which the transaction data belongs. The trigger message is used to trigger the transaction data statistics unit 402 to count the transaction data; the transaction data statistics unit 402 is configured to obtain the transaction data and the historical transaction data of the category from the second database according to the information of the category to which the transaction data belongs, and Combining the transaction data with the historical transaction data of the category, obtaining current transaction data of the category; wherein the second database is non-instantly querying the data warehouse system and obtaining the transaction data meeting the preset condition, and the transaction to be obtained The data is compared with the corresponding transaction data to update the inconsistent transaction data.

這個應用伺服器實施例與前面描述的應用伺服器實施例之間的一個明顯區別是,在這個應用伺服器實施例中,交易資料處理單元401在獲取交易資料所屬類別的資訊後,向交易資料統計單元402發出不攜帶有交易資料、但攜帶有交易資料所屬類別的資訊的觸發消息。交易資料統計單元402從第二資料庫中獲得的是交易資料處理單元401獲得的交易資料和這個類別的歷史交易資料。A significant difference between this application server embodiment and the previously described application server embodiment is that in this application server embodiment, the transaction data processing unit 401, after obtaining the information of the category to which the transaction data belongs, to the transaction data The statistic unit 402 issues a trigger message that does not carry the transaction data but carries the information of the category to which the transaction material belongs. The transaction data statistics unit 402 obtains from the second database the transaction data obtained by the transaction data processing unit 401 and the historical transaction data of this category.

這個應用伺服器實施例與前面描述的應用伺服器實施例存在很多相同的技術特徵,例如,交易資料處理單元401在每次獲得交易資料後,將獲得交易資料的日誌記錄在第二資料庫中的交易資料日誌表中。對於這些相同技術特徵的詳細描述,可以參照前面描述的應用伺服器實施例中的相關描述,這裏不再贅述。This application server embodiment has many of the same technical features as the application server embodiment described above. For example, the transaction data processing unit 401 records the log of the transaction data in the second database each time the transaction data is obtained. The transaction data in the log table. For a detailed description of these same technical features, reference may be made to the related description in the application server embodiment described above, and details are not described herein again.

另外,這個應用伺服器實施例是與圖6所示的方法實施例相對應的,所以,這個應用伺服器中的各個功能單元的功能及相互配合關係的描述可以參照圖6所示的方法實施例中的相關描述,這裏不再贅述。In addition, the application server embodiment corresponds to the method embodiment shown in FIG. 6. Therefore, the functions and mutual cooperation relationships of the functional units in the application server can be implemented by referring to the method shown in FIG. 6. The related descriptions in the examples are not described here.

由圖6所示的方法可知,圖6所示的方法中的很多步驟都是以電子商務交易資料統計系統包括的應用伺服器為執行主體,另外,對應的應用伺服器也是設置在電子商務交易資料統計系統中的,所以,本申請實施例還提供了一種電子商務交易資料統計系統。這種電子商務交易資料統計系統適用於包括電子商務交易系統、資料倉庫系統及電子商務交易資料統計系統的電子商務系統,該電子商務交易系統包括第一應用伺服器和第一資料庫,該電子商務交易資料統計系統用於統計從該電子商務交易系統獲得的交易資料。請再參見圖5,該電子商務交易資料統計系統包括:第二應用伺服器501和第二資料庫502;第二應用伺服器501用於即時獲得該第一應用伺服器發出的交易資料,在每次獲得交易資料後,第二應用伺服器501將該交易資料儲存到第二資料庫502中,分析該交易資料,獲取該交易資料所屬類別的資訊,根據該交易資料所屬類別的資訊,從第二資料庫502中獲得該交易資料和該類別的歷史交易資料,第二應用伺服器501結合該交易資料和該類別的歷史交易資料,得到該類別的當前交易資料;第二資料庫502用於儲存交易資料,並非即時的向該資料倉庫系統查詢並獲取符合預設條件的交易資料,將獲得的交易資料與之前對應的交易資料進行比較,更新不一致的交易資料。It can be seen from the method shown in FIG. 6 that many steps in the method shown in FIG. 6 are performed by using an application server included in the e-commerce transaction data statistics system, and the corresponding application server is also set in the e-commerce transaction. In the data statistics system, the embodiment of the present application further provides an e-commerce transaction data statistics system. The e-commerce transaction data statistics system is applicable to an e-commerce system including an e-commerce transaction system, a data warehouse system, and an e-commerce transaction data statistics system, the e-commerce transaction system including a first application server and a first database, the electronic The business transaction data statistics system is used to count transaction data obtained from the e-commerce transaction system. Referring to FIG. 5, the e-commerce transaction data statistics system includes: a second application server 501 and a second database 502. The second application server 501 is configured to obtain the transaction data sent by the first application server in real time. After the transaction data is obtained, the second application server 501 stores the transaction data in the second database 502, analyzes the transaction data, and obtains information about the category of the transaction data, according to the information of the category of the transaction data. The second database 502 obtains the transaction data and the historical transaction data of the category, and the second application server 501 combines the transaction data and the historical transaction data of the category to obtain the current transaction data of the category; the second database 502 In the storage of the transaction data, it is not instantaneous to query the data warehouse system and obtain the transaction data that meets the preset conditions, compare the obtained transaction data with the corresponding transaction data, and update the inconsistent transaction data.

可選的,第二資料庫502中可以設置有用於儲存交易資料的日誌的交易資料日誌表和用於儲存交易資料的交易資料基準表。在交易資料日誌表中,一條記錄可以以一個用戶發起的事件為單位,在交易資料基準表中,一條記錄可以以一個用戶為單位。第二應用伺服器501可以將獲得交易資料的日誌記錄在交易資料日誌表中。Optionally, the second database 502 may be provided with a transaction data log table for storing the log of the transaction data and a transaction data reference table for storing the transaction data. In the transaction data log table, a record can be in units of a user-initiated event. In the transaction data reference table, a record can be in units of one user. The second application server 501 can record the log of the transaction data in the transaction data log table.

第二應用伺服器501和第二資料庫502的具體功能以及相互配合關係的詳細描述可以參照圖6所示的方法實施例和對應的應用伺服器實施例中的相關描述,這裏不再贅述。For a detailed description of the specific functions of the second application server 501 and the second database 502 and the mutual cooperation relationship, reference may be made to the related embodiments in the method embodiment and the corresponding application server embodiment shown in FIG. 6, and details are not described herein again.

通過以上的實施方式的描述可知,本申請實施例中,電子商務交易資料統計系統的應用伺服器即時的從電子商務交易系統的應用伺服器獲得交易資料,而不是從電子商務交易系統的資料庫即時獲得交易資料,這樣不會增加電子商務交易系統的資料庫的負擔,從而不會影響正常的業務交易,更不會導致電子商務交易系統的資料庫當機,由此可以避免整個電子商務網站都不可用。It can be seen from the description of the foregoing embodiments that, in the embodiment of the present application, the application server of the e-commerce transaction data statistics system obtains the transaction data from the application server of the e-commerce transaction system in real time, instead of the database from the e-commerce transaction system. Instant access to transaction data, which will not increase the burden of the e-commerce transaction system database, so as not affecting normal business transactions, and will not cause the e-commerce transaction system database to crash, thereby avoiding the entire e-commerce website. Not available.

另外,電子商務交易系統的應用伺服器可以通過發出非同步不可靠的消息向電子商務交易資料統計系統提供交易資料,既不會影響電子商務交易系統中的正常的業務交易,還會降低實現成本。In addition, the application server of the e-commerce transaction system can provide transaction data to the e-commerce transaction data statistics system by issuing asynchronous and unreliable messages, which will not affect the normal business transactions in the e-commerce transaction system, and also reduce the implementation cost. .

此外,電子商務交易資料統計系統可以非即時的從資料倉庫系統中獲得符合一定條件的資料,特別是最近的一個週期內獲得發生變化的交易資料,這樣,即使電子商務交易資料統計系統在一個週期內沒有接收到全部的非同步消息,或者說,在一個週期內沒有接收到全部的交易資料,那麼也能保證電子商務交易資料統計系統在這個週期結束之後能夠獲得全部的交易資料,從而可以為統計處理提供更加準確的資料基礎。In addition, the e-commerce transaction data statistics system can obtain the data that meets certain conditions from the data warehouse system in a non-instantaneous manner, especially the transaction data that has changed in the most recent cycle, so that even if the e-commerce transaction data statistics system is in a cycle If all the unsynchronized messages are not received, or if all the transaction data are not received within one cycle, then the e-commerce transaction data statistics system can be guaranteed to obtain all the transaction data after the end of the cycle, so that Statistical processing provides a more accurate data base.

通過以上的實施方式的描述可知,本領域的技術人員可以清楚地瞭解到本申請可借助軟體加必需的通用硬體平臺的方式來實現。基於這樣的理解,本申請的技術方案本質上或者說對現有技術做出貢獻的部分可以以軟體產品的形式體現出來,該電腦軟體產品可以儲存在儲存媒體中,如ROM/RAM、磁碟、光碟等,包括若干指令用以使得一台電腦設備(可以是個人電腦,伺服器,或者網路設備等)執行本申請各個實施例或者實施例的某些部分所述的方法。As can be seen from the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of a software plus a necessary universal hardware platform. Based on such understanding, the technical solution of the present application can be embodied in the form of a software product in essence or in the form of a software product, which can be stored in a storage medium such as a ROM/RAM, a disk, A disc or the like includes instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present application or portions of the embodiments.

本說明書中的各個實施例均採用遞進的方式描述,各個實施例之間相同相似的部分互相參見即可,每個實施例重點說明的都是與其他實施例的不同之處。尤其,對於系統實施例而言,由於其基本相似於方法實施例,所以描述的比較簡單,相關之處參見方法實施例的部分說明即可。The various embodiments in the specification are described in a progressive manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.

本申請可用於眾多通用或專用的計算系統環境或配置中。例如:個人電腦、伺服器電腦、手持設備或可攜式設備、平板型設備、多處理器系統、基於微處理器的系統、置頂盒、可編程的消費電子設備、網路PC、小型電腦、大型電腦、包括以上任何系統或設備的分散式計算環境等等。This application can be used in a variety of general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, small computers, Large computers, decentralized computing environments including any of the above systems or devices, and more.

本申請可以在由電腦執行的電腦可執行指令的一般上下文中描述,例如程式模組。一般地,程式模組包括執行特定任務或實現特定抽象資料類型的常式、程式、物件、元件、資料結構等等。也可以在分散式計算環境中實踐本申請,在這些分散式計算環境中,由通過通信網路而被連接的遠端處理設備來執行任務。在分散式計算環境中,程式模組可以位於包括儲存設備在內的本地和遠端電腦儲存媒體中。The application can be described in the general context of computer-executable instructions executed by a computer, such as a program module. Generally, a program module includes routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types. The present application can also be practiced in a distributed computing environment where tasks are performed by remote processing devices that are connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.

雖然通過實施例描繪了本申請,本領域普通技術人員知道,本申請有許多變形和變化而不脫離本申請的精神,希望所附的申請專利範圍包括這些變形和變化而不脫離本申請的精神。While the present invention has been described by the embodiments of the present invention, it will be understood by those skilled in the art .

101...電子商務交易系統101. . . E-commerce trading system

102...資料倉庫系統102. . . Data warehouse system

103...用戶端103. . . user terminal

104...電子商務交易資料統計系統104. . . E-commerce transaction data statistics system

401...交易資料處理單元401. . . Transaction data processing unit

402...交易資料統計單元402. . . Transaction data statistic unit

501...第二應用伺服器501. . . Second application server

502...第二資料庫502. . . Second database

為了更清楚地說明本申請實施例或現有技術中的技術方案,下面將對實施例或現有技術描述中所需要使用的附圖作簡單地介紹,顯而易見地,下面描述中的附圖僅僅是本申請中記載的一些實施例,對於本領域普通技術人員來講,在不付出創造性勞動的前提下,還可以根據這些附圖獲得其他的附圖。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings to be used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only Some of the embodiments described in the application can be used to obtain other drawings based on these drawings without departing from the prior art.

圖1為本申請實施例應用的網路環境示意圖;1 is a schematic diagram of a network environment applied to an embodiment of the present application;

圖2為本申請實施例應用的包括電子商務交易資料統計系統的網路環境示意圖;2 is a schematic diagram of a network environment including an e-commerce transaction data statistics system applied in an embodiment of the present application;

圖3為本申請實施例的一種統計電子商務交易資料的方法的流程圖;3 is a flowchart of a method for counting e-commerce transaction data according to an embodiment of the present application;

圖4為本申請實施例的應用伺服器的邏輯結構示意圖;4 is a schematic diagram of a logical structure of an application server according to an embodiment of the present application;

圖5為本申請實施例的電子商務交易資料統計系統的邏輯結構示意圖;FIG. 5 is a schematic diagram of a logical structure of an e-commerce transaction data statistics system according to an embodiment of the present application; FIG.

圖6為本申請實施例的另一種統計電子商務交易資料的方法的流程圖。FIG. 6 is a flowchart of another method for counting e-commerce transaction data according to an embodiment of the present application.

Claims (16)

一種統計電子商務交易資料的方法,該方法包括:從電子商務交易系統的第一應用伺服器接收包含交易資料的一或多個非同步消息,該電子商務交易系統包括該第一應用伺服器和儲存該交易資料的第一資料庫,在該一或多個非同步消息為不可靠的且易於發生資料丟失的情況下:分析該接收的交易資料以識別該接收的交易資料的類別,該分析包含從該接收的交易資料提取關鍵字,並依據該關鍵字在關鍵字與類別映射關係中查找該接收的交易資料的該類別;至少部分根據該接收的交易資料的該類別,從第二資料庫中獲得歷史交易資料,其中,該歷史交易資料包含符合預設條件且藉由回應於該不可靠的一或多個非同步消息每隔預先設置的時間間隔向不同於該電子商務交易系統之資料倉庫系統查詢而獲得的交易資料,其中符合該預設條件的該交易資料包含在最近的一個時間間隔內發生變化的交易資料;及將從該第一應用伺服器接收的該交易資料與從該第二資料庫接收的該歷史交易資料比較,以更新該歷史交易資料中的不一致,並結合該接收的交易資料和該歷史交易資料以產生當前交易資料。 A method for counting e-commerce transaction data, the method comprising: receiving, from a first application server of an e-commerce transaction system, one or more non-synchronized messages including transaction data, the e-commerce transaction system including the first application server and Storing a first database of the transaction data, wherein the one or more non-synchronized messages are unreliable and prone to data loss: analyzing the received transaction data to identify a category of the received transaction data, the analysis Including extracting a keyword from the received transaction data, and searching for the category of the received transaction data in the keyword and category mapping relationship according to the keyword; at least in part according to the category of the received transaction data, from the second data Obtaining historical transaction data in the library, wherein the historical transaction data includes a predetermined time condition and is different from the e-commerce transaction system by a predetermined time interval in response to the unreliable one or more asynchronous messages Transaction data obtained by querying the data warehouse system, wherein the transaction data conforming to the preset condition includes Transaction data that has changed in the most recent time interval; and the transaction data received from the first application server is compared with the historical transaction data received from the second database to update the inconsistency in the historical transaction data And combining the received transaction data and the historical transaction data to generate current transaction data. 如申請專利範圍第1項所述的方法,其中,該接 收的交易資料的該類別係根據用戶或者交易操作的種類。 The method of claim 1, wherein the connection is The category of the transaction data received is based on the type of user or transaction operation. 如申請專利範圍第1項所述的方法,還包括,將該接收的交易資料儲存在該第二資料庫中。 The method of claim 1, further comprising storing the received transaction data in the second database. 如申請專利範圍第1項所述的方法,還包括,將該接收的交易資料的日誌儲存在該第二資料庫中的交易資料日誌表中。 The method of claim 1, further comprising storing the log of the received transaction data in a transaction data log table in the second database. 如申請專利範圍第4項所述的方法,其中該交易資料日誌表以用戶發起的事件為用於記錄的單位來記錄資料,或者以從該第一應用伺服器接收的該一或多個非同步消息為用於記錄的單位來記錄資料。 The method of claim 4, wherein the transaction data log table records data in a unit for recording by a user-initiated event, or the one or more non-received from the first application server. The sync message is a unit for recording to record data. 一種電子商務交易資料統計系統的應用伺服器,其由一或多個計算裝置實施,該應用伺服器包括:交易資料處理單元;和交易資料統計單元,該交易資料處理單元用於:從電子商務交易系統接收交易資料,及將該接收的交易資料傳送給該交易資料統計單元;且該交易資料統計單元用於:分析該接收的交易資料,從該電子商務交易統計系統的資料庫中獲得歷史交易資料,及結合該接收的交易資料和該獲得的歷史交易資料,以產生當前交易資料,其中從該應用伺服器接收的先 前獲得的交易資料係與一類別綁定,並且不與該資料庫中該類別的其他歷史交易資料進行疊加。 An application server of an e-commerce transaction data statistics system, implemented by one or more computing devices, the application server comprising: a transaction data processing unit; and a transaction data statistics unit, the transaction data processing unit is used for: e-commerce The transaction system receives the transaction data, and transmits the received transaction data to the transaction data statistics unit; and the transaction data statistics unit is configured to: analyze the received transaction data, and obtain history from the database of the e-commerce transaction statistics system Transaction data, and combining the received transaction data and the obtained historical transaction data to generate current transaction data, wherein the first transaction received from the application server The previously acquired transaction data is tied to a category and is not superimposed with other historical transaction data for that category in the database. 如申請專利範圍第6項所述的應用伺服器,其中,該交易資料處理單元或者該交易資料統計單元將該接收的交易資料儲存到該資料庫中。 The application server of claim 6, wherein the transaction data processing unit or the transaction data statistics unit stores the received transaction data in the database. 如申請專利範圍第6項所述的應用伺服器,其中,該交易資料處理單元將該接收的交易資料的日誌儲存在該資料庫中的交易資料日誌表中。 The application server of claim 6, wherein the transaction data processing unit stores the log of the received transaction data in a transaction data log table in the database. 如申請專利範圍第8項所述的應用伺服器,其中該應用伺服器包含第二應用伺服器,且該交易資料日誌表以用戶發起的事件為用於記錄的單位來記錄資料,或者以從該第一應用伺服器向該第二應用伺服器發送的非同步消息為用於記錄的單位來記錄資料。 The application server according to claim 8, wherein the application server includes a second application server, and the transaction data log table records the data in a unit for recording by a user-initiated event, or The asynchronous message sent by the first application server to the second application server is a unit for recording to record data. 如申請專利範圍第6項所述的應用伺服器,其中該交易資料處理單元從電子商務交易系統接收一或多個非同步消息,該一或多個非同步消息包含該接收的交易資料。 The application server of claim 6, wherein the transaction data processing unit receives one or more asynchronous messages from the electronic commerce transaction system, the one or more asynchronous messages including the received transaction data. 如申請專利範圍第6項所述的應用伺服器,其中該類別屬於包括一段時間內的交易總金額、建立交易的總次數及成功交易的總次數之複數個類別之一。 The application server of claim 6, wherein the category belongs to one of a plurality of categories including a total amount of transactions, a total number of transactions established, and a total number of successful transactions. 如申請專利範圍第6項所述的應用伺服器,其中該交易資料處理單元將該接收的交易資料儲存在該資料庫中,並將觸發消息傳送至該交易資料統計單元,該觸發消息指示該接收的交易資料的類別,並觸發該交易資料統計 單元執行該接收的交易資料的統計。 The application server of claim 6, wherein the transaction data processing unit stores the received transaction data in the database, and transmits a trigger message to the transaction data statistics unit, the trigger message indicating the The type of transaction data received and trigger the transaction statistics The unit performs statistics on the received transaction data. 一種電子商務交易資料統計系統,其由一或多個計算裝置實施,該電子商務交易資料統計系統包括:第二應用伺服器和第二資料庫;該第二應用伺服器用於:從包含第一應用伺服器和第一資料庫的電子商務交易系統的該第一應用伺服器接收一或多個非同步消息,該電子商務交易系統不同於該電子商務交易資料統計系統,分析該接收的交易資料,以識別該接收的交易資料的類別,該分析包含從該接收的交易資料提取關鍵字,並依據該關鍵字在關鍵字與類別映射關係中查找該接收的交易資料的該類別,從該第二資料庫中獲得該類別下的歷史交易資料,及結合該接收的交易資料和該類別的歷史交易資料,以產生當前交易資料且該第二資料庫用於:藉由回應於不可靠且易於發生資料丟失的該一或多個非同步訊息每隔預先設置的時間間隔向不同於該電子商務資料統計交易系統及該電子商務交易系統的資料倉庫系統查詢而獲得符合預設條件的交易資料,其中符合該預設條件的該獲得的交易資料包含在最近的一個時間間隔內發生變化的交易資料, 從該第二應用伺服器接收包括該接收的交易資料的類別的請求消息,使用包括在該請求消息中的該接收的交易資料的該類別作為該關鍵字,以查找在該接收的交易資料的該類別下的該歷史交易資料,及將該歷史交易資料提供給該第二應用伺服器。 An e-commerce transaction data statistics system is implemented by one or more computing devices, the e-commerce transaction data statistics system includes: a second application server and a second database; the second application server is configured to: The application server and the first application server of the e-commerce transaction system of the first database receive one or more asynchronous messages, and the e-commerce transaction system is different from the e-commerce transaction data statistics system, and analyzes the received transaction. Data to identify a category of the received transaction data, the analysis comprising extracting a keyword from the received transaction data, and searching for the category of the received transaction data in the keyword and category mapping relationship according to the keyword, from the The second database obtains historical transaction data under the category, and combines the received transaction data with historical transaction data of the category to generate current transaction data and the second database is used: by responding to unreliable The one or more asynchronous messages that are prone to data loss are different from the e-commerce every preset time interval The statistical trading system and the data warehouse system of the e-commerce transaction system query to obtain the transaction data that meets the preset condition, wherein the obtained transaction data that meets the preset condition includes the transaction data that changes during the most recent time interval. , Receiving, from the second application server, a request message including a category of the received transaction data, using the category of the received transaction data included in the request message as the keyword to find a transaction data in the received transaction data The historical transaction data under the category, and providing the historical transaction data to the second application server. 如申請專利範圍第13項所述的電子商務交易資料統計系統,其中該第二應用伺服器將該接收的交易資料的日誌儲存在該第二資料庫中的交易資料日誌表中。 The e-commerce transaction data statistics system of claim 13, wherein the second application server stores the log of the received transaction data in a transaction data log table in the second database. 如申請專利範圍第14項所述的電子商務交易資料統計系統,其中該交易資料日誌表以用戶發起的事件為用於記錄的單位來記錄資料,或者以從該第一應用伺服器接收的一或多個非同步消息為用於記錄的單位來記錄資料。 The e-commerce transaction data statistics system of claim 14, wherein the transaction data log table records the data in a unit for recording by a user-initiated event, or one received from the first application server. Or multiple non-synchronous messages are records for the unit used for recording. 如申請專利範圍第13項所述的電子商務交易資料統計系統,其中該接收的交易資料的該類別係根據用戶或者交易操作的種類。The e-commerce transaction data statistics system of claim 13, wherein the category of the received transaction data is based on a user or a type of transaction operation.
TW099117425A 2010-05-31 2010-05-31 Statistical e-commerce transaction data, e-commerce transaction data statistics system and application server TWI578173B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW099117425A TWI578173B (en) 2010-05-31 2010-05-31 Statistical e-commerce transaction data, e-commerce transaction data statistics system and application server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW099117425A TWI578173B (en) 2010-05-31 2010-05-31 Statistical e-commerce transaction data, e-commerce transaction data statistics system and application server

Publications (2)

Publication Number Publication Date
TW201142619A TW201142619A (en) 2011-12-01
TWI578173B true TWI578173B (en) 2017-04-11

Family

ID=46765090

Family Applications (1)

Application Number Title Priority Date Filing Date
TW099117425A TWI578173B (en) 2010-05-31 2010-05-31 Statistical e-commerce transaction data, e-commerce transaction data statistics system and application server

Country Status (1)

Country Link
TW (1) TWI578173B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI574168B (en) * 2013-07-26 2017-03-11 網路家庭國際資訊股份有限公司 Database system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6366682B1 (en) * 1994-11-28 2002-04-02 Indivos Corporation Tokenless electronic transaction system
US20030088562A1 (en) * 2000-12-28 2003-05-08 Craig Dillon System and method for obtaining keyword descriptions of records from a large database
US20050177494A1 (en) * 2004-02-11 2005-08-11 Kelly Dogulas F. Method and system for processing electronic financial transactions

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6366682B1 (en) * 1994-11-28 2002-04-02 Indivos Corporation Tokenless electronic transaction system
US20030088562A1 (en) * 2000-12-28 2003-05-08 Craig Dillon System and method for obtaining keyword descriptions of records from a large database
US20050177494A1 (en) * 2004-02-11 2005-08-11 Kelly Dogulas F. Method and system for processing electronic financial transactions

Also Published As

Publication number Publication date
TW201142619A (en) 2011-12-01

Similar Documents

Publication Publication Date Title
JP5815563B2 (en) Method and system for e-commerce transaction data accounting
US11789943B1 (en) Configuring alerts for tags associated with high-latency and error spans for instrumented software
JP7273045B2 (en) Dimensional Context Propagation Techniques for Optimizing SQL Query Plans
US11269859B1 (en) Correlating different types of data of a distributed ledger system
US20200372007A1 (en) Trace and span sampling and analysis for instrumented software
WO2021068549A1 (en) Data processing method, platform and system
US11507562B1 (en) Associating data from different nodes of a distributed ledger system
CN102722481B (en) The processing method of a kind of user's favorites data and searching method
CN110851465B (en) Data query method and system
US20110191361A1 (en) System and method for building a cloud aware massive data analytics solution background
WO2020037917A1 (en) User behavior data recommendation method, server and computer readable medium
CN109189782A (en) A kind of indexing means in block chain commodity transaction inquiry
US11676345B1 (en) Automated adaptive workflows in an extended reality environment
CN109783512A (en) Data processing method, device, computer equipment and storage medium
US10891792B1 (en) Precise plane detection and placement of virtual objects in an augmented reality environment
EP3076359A1 (en) Implementing retail customer analytics data model in a distributed computing environment
US20160196319A1 (en) Multi-dimensional data analysis
CN110019258A (en) The method and apparatus for handling order data
US20230123539A1 (en) Stitching event data using identity mappings
CN112948397A (en) Data processing system, method, device and storage medium
US8301506B2 (en) Method and system for managing categories of an electronic commerce website
US11704219B1 (en) Performance monitoring of distributed ledger nodes
WO2014056145A1 (en) Method and system for making web application obtain database change
US20140122186A1 (en) Use of video to manage process quality
CN110704486A (en) Data processing method, device, system, storage medium and server