E-commerce data storage method and system
By calculating the frequency coefficient and call probability of the associated event of e-commerce data, combining the data feature evaluation model, and optimizing the data storage strategy, the high cost of the e-commerce system and the inability to query historical data is solved, and low-cost and efficient data storage and fast access are achieved.
Patent Information
- Application Number
- CN202510581045.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-08-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, e-commerce systems have high cost problems in data storage, and users cannot query historical data.
By calculating the normalized frequency coefficient of the associated event corresponding to the data type to be stored, obtain the call data of the associated object, extract data characteristics, build an input data sequence and input a call probability evaluation model, and execute data storage strategies based on the evaluation results, including strategies such as high-rate read and write, low-cost storage, and low-cache compression.
It realizes the availability of e-commerce data while storing at low cost, ensuring fast data access and queryability of historical data.
Smart Images

Figure CN120492457A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of e-commerce, and in particular to an e-commerce data storage method and system. Background Art
[0002] E-commerce generally refers to a business model in which buyers and sellers conduct various commercial activities online, within the open internet environment, based on a client / server communication architecture. This model enables online shopping for consumers, online transactions between merchants, online electronic payments, and various other business, trading, financial, and related integrated service activities. These online interactions and transactions between consumers and merchants are facilitated by e-commerce systems. Over time, as the number of products and users reaches a certain scale, e-commerce systems generate enormous amounts of data daily. These include product information and images, user registration, login, chat, search, viewing, favorites, and purchase additions, as well as extensive order, payment, logistics, and review data.
[0003] The existing technology uses distributed storage, horizontal database and table sharding, and regular automatic archiving of expired data to reduce the data storage pressure of e-commerce systems, improve data reading and writing efficiency, and data storage reliability. Among them, the regular automatic archiving mechanism is an important mechanism to alleviate the data storage pressure of e-commerce systems, avoiding the problem of increasing data storage costs of e-commerce systems caused by the continuous growth of data volume, but it also leads to the problem that users cannot query historical data from a period of time. Summary of the Invention
[0004] Based on the above problems, the present invention proposes an e-commerce data storage method and system, which can effectively improve the availability of e-commerce data while achieving low-cost storage.
[0005] In view of this, a first aspect of the present invention provides an e-commerce data storage method, comprising:
[0006] Receiving or generating data to be stored, wherein the data to be stored is data input by a user received by the e-commerce system, or data generated by the e-commerce system in response to an internal event or an external event;
[0007] Calculating a normalized frequency coefficient of an associated event corresponding to the data type of the data to be stored;
[0008] Acquire call data of an associated object of the data to be stored, wherein the call data is data of the same type as the data to be stored that is called by the associated object of the data to be stored within a preset time range;
[0009] extracting a first data feature from the call data;
[0010] constructing a first input data sequence using the normalized frequency coefficients and the first data features;
[0011] Inputting the first input data sequence into a pre-trained call probability evaluation model to evaluate the call probability of the data to be stored;
[0012] A corresponding data storage strategy is executed on the data to be stored according to the call probability evaluation result of the data to be stored.
[0013] Furthermore, the step of calculating the normalized frequency coefficient of the associated event corresponding to the data type of the data to be stored specifically includes:
[0014] extracting a second data feature of the data to be stored, where the second data feature includes an associated object of the data to be stored;
[0015] constructing a second input data sequence using the second data feature;
[0016] Inputting the second input data sequence into a pre-trained data classification model to identify the data type of the data to be stored;
[0017] According to the occurrence frequency of the associated event corresponding to the data type of the data to be stored, a normalized frequency coefficient corresponding to the occurrence frequency is calculated.
[0018] Furthermore, the step of extracting the second data feature of the data to be stored specifically includes:
[0019] Identifying an associated object of the data to be stored;
[0020] Loading a structure of the associated object to instantiate the associated object of the stored data using the structure, wherein the structure includes a property list and an action list of the associated object;
[0021] matching the attribute features and action features of the associated object in the data to be stored based on the attribute list and action list of the structure;
[0022] The associated object and its attribute characteristics and action characteristics are determined as the second data characteristics of the data to be stored.
[0023] Furthermore, the step of calculating a normalized frequency coefficient corresponding to the occurrence frequency of the associated event corresponding to the data type of the data to be stored specifically includes:
[0024] Determine the statistical period for the frequency of event occurrence;
[0025] Counting the occurrence frequency f0 of the associated events corresponding to the data type of the data to be stored within the event occurrence frequency statistics period;
[0026] Obtain the occurrence frequency f of other event types in the e-commerce system within the event occurrence frequency statistical period i , where i is 1 to n e - a positive integer between t and n e is the number of event types in the e-commerce system;
[0027] Calculate the normalized frequency coefficient corresponding to the occurrence frequency:
[0028]
[0029] Furthermore, the step of extracting the first data feature from the call data specifically includes:
[0030] Traversing each call information in the call data, the call information including the calling program and the calling time of the call;
[0031] Obtaining a calling program code and a calling time code from the calling information;
[0032] Generate a call feature for each call information, wherein the call feature is composed of the call program code and the call time code;
[0033] The call features of each call information are merged into the first data features in chronological order.
[0034] Furthermore, the step of constructing a first input data sequence using the normalized frequency coefficient and the first data feature specifically includes:
[0035] Obtaining an associated object code of the associated object and a data type code of the data type;
[0036] The first input data sequence is constructed based on the associated object code, the data type code, the normalized frequency coefficient, and the first data feature.
[0037] Furthermore, the data storage strategy includes a first storage strategy with high-speed read and write characteristics, and the step of executing the corresponding data storage strategy on the data to be stored according to the call probability evaluation result of the data to be stored specifically includes:
[0038] Determining whether the probability of calling the data to be stored is greater than a preset probability threshold;
[0039] When the call probability of the data to be stored is greater than a preset probability threshold, determining a first target database and a first target data table for storing the data to be stored in the first storage space according to the data type of the data to be stored, the first storage space being a high-speed storage space, and the first target database being a distributed database in the first storage space;
[0040] The data to be stored is written into the corresponding first target data table in the distributed database according to the preset library and table sharding rules.
[0041] Furthermore, the data storage strategy includes a second storage strategy with a low-cost storage characteristic, and after the step of determining whether the call probability of the data to be stored is greater than a preset probability threshold, further includes:
[0042] When the call probability of the data to be stored is less than a preset probability threshold, determining a second target database and a second target data table for storing the data to be stored in the second storage space according to the data type of the data to be stored, wherein the second storage space is a low-speed storage space;
[0043] The data to be stored is written into the corresponding second target data table in the second target database.
[0044] Furthermore, the data storage strategy includes a third storage strategy having a low-cost storage characteristic and an inaccessible characteristic, and after the step of writing the data to be stored into the corresponding second target data table in the second target database, further includes:
[0045] Get the pre-configured slow cache period;
[0046] Determining whether a storage time of the data to be stored in the second storage space is greater than the low-speed cache period;
[0047] When the storage time of the data to be stored in the second storage space is longer than the low-speed cache cycle, and the data to be stored is not called during the storage period in the second storage space, the data to be stored is compressed using a preset compression algorithm and then written into the third storage space, and the third storage space is a low-speed storage space.
[0048] The second aspect of the present invention proposes an e-commerce system, including a client and a server. A user establishes a communication connection with the server through the client to access the e-commerce system. The server is configured to implement the e-commerce data storage method described in any one of the first aspects of the present invention.
[0049] The present invention proposes an e-commerce data storage method and system, which obtains call data of associated objects of the data to be stored by calculating the normalized frequency coefficient of associated events corresponding to the data type of the data to be stored, wherein the call data is data with the same data type as the data to be stored when the associated objects of the data to be stored are called within a preset time range, extracts a first data feature from the call data, constructs a first input data sequence using the normalized frequency coefficient and the first data feature, inputs the first input data sequence into a pre-trained call probability evaluation model to evaluate the call probability of the data to be stored, and executes a corresponding data storage strategy for the data to be stored according to the call probability evaluation result of the data to be stored, which can effectively improve the availability of e-commerce data while achieving low-cost storage. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 This is a flowchart of an e-commerce data storage method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the absence of conflict, the embodiments of the present application and the features therein can be combined with each other.
[0052] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present invention is not limited to the specific embodiments disclosed below.
[0053] In the description of the present invention, the term "plurality" refers to two or more. Unless otherwise specified, the terms "upper" and "lower" are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have a specific orientation, be constructed, or operate in a specific manner. Therefore, they should not be construed as limiting the present invention. The terms "connected," "mounted," and "fixed," etc., should be interpreted broadly. For example, "connected" can refer to fixed, removable, or integral connections; directly or indirectly through an intermediary. A person of ordinary skill in the art will understand the specific meanings of these terms in the present invention based on the specific circumstances. Furthermore, the terms "first," "second," etc., etc., are used for descriptive purposes only and should not be construed to indicate or imply relative importance or to implicitly specify the number of the technical features indicated. Therefore, a feature designated "first," "second," etc., may explicitly or implicitly include one or more of such features. In the description of the present invention, unless otherwise specified, "plurality" means two or more.
[0054] Throughout this specification, terms such as "one embodiment," "some implementations," and "specific examples" indicate that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example are included in at least one embodiment or example of the present invention. In this specification, schematic representations of these terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0055] An e-commerce data storage method and system provided by some embodiments of the present invention will be described below with reference to the accompanying drawings.
[0056] like Figure 1 In view of this, a first aspect of the present invention provides an e-commerce data storage method, comprising:
[0057] Receiving or generating data to be stored, wherein the data to be stored is data input by a user received by the e-commerce system, or data generated by the e-commerce system in response to an internal event or an external event;
[0058] Calculating a normalized frequency coefficient of an associated event corresponding to the data type of the data to be stored;
[0059] Acquire call data of an associated object of the data to be stored, wherein the call data is data of the same type as the data to be stored that is called by the associated object of the data to be stored within a preset time range;
[0060] extracting a first data feature from the call data;
[0061] constructing a first input data sequence using the normalized frequency coefficients and the first data features;
[0062] Inputting the first input data sequence into a pre-trained call probability evaluation model to evaluate the call probability of the data to be stored;
[0063] A corresponding data storage strategy is executed on the data to be stored according to the call probability evaluation result of the data to be stored.
[0064] Specifically, the users referred to in the present invention generally refer to various types of users in the e-commerce system, including but not limited to consumer users, merchant users and backend administrator users in the e-commerce system. The data input by the user is the data that the user actively adds to the e-commerce system, which includes data directly entered by the user through an input device, and also includes data input by the user through batch import, such as user data, product data or product evaluation data. In addition to the data input by the user, the data to be stored also includes data automatically generated by the e-commerce system in response to various internal and external events. The external events include user operation events (such as search, view, favorite, purchase of products, or operations to generate statistical charts), network environment change events (such as network attack events, traffic bandwidth change events), etc. The internal events include program state change events, scheduled tasks or conditional task triggering events, etc. Correspondingly, the data generated by the e-commerce system in response to internal events or external events include but are not limited to user behavior data, statistical chart data and system log data.
[0065] Different types of data often have different access methods, procedures, and reasons for access, resulting in varying probabilities of access. For example, the probability of accessing data due to user operations, such as queries, is related to the user's behavior and habits. However, the probability of accessing data due to internal or external events in the e-commerce system, such as order status updates, is related to the system's programmatic rules or the dynamics of external events. Data access includes, but is not limited to, operations such as reading, writing, modifying, and deleting data.
[0066] In the technical solutions of some embodiments of the present invention, the data types have a corresponding relationship with the associated events, that is, the data types are classified based on the associated events that generate the corresponding data to be stored. For example, the data to be stored may include user login data generated based on user login events, commodity search data generated based on user search events, security log data generated based on system security events, etc. Similarly, the associated event corresponding to the data type refers to an event that causes the e-commerce system to generate the data to be stored corresponding to the data type in response to the event. According to actual application needs, the data type and the associated event can be configured as a one-to-one correspondence, or a one-to-many, or many-to-one correspondence, and the present invention is not limited to this.
[0067] The normalized frequency coefficient is a normalized coefficient that is positively correlated with the occurrence frequency of the associated event, and its value range is between 0 and 1. The higher the occurrence frequency of the associated event, the larger the normalized frequency coefficient. In the technical solutions of some embodiments of the present invention, the occurrence frequency of the associated event is linearly correlated with the normalized frequency coefficient.
[0068] The associated object of the data to be stored is the physical object or virtual object described by the data to be stored. The associated object includes physical objects such as goods, users, etc., and the associated object also includes virtual objects such as specific files or non-file data, etc. For example, a picture file, a notification message or a piece of evaluation text can all be identified as a virtual object.
[0069] The first input data sequence is a data sequence obtained by normalizing the data in the first data feature. The normalization includes performing dimensional normalization, data normalization, and abnormal data removal on each data item in the first data feature. The first input data sequence includes data in two dimensions associated with the data to be stored. One of the associated dimensions is the associated events of the data to be stored, which is reflected in the first input data sequence in the form of the normalized frequency coefficient; the other associated dimension is the associated objects of the data to be stored, which is reflected in the first input data sequence in the form of the first data feature.
[0070] In the technical solutions of some embodiments of the present invention, the call probability assessment model is a convolutional neural network model obtained by training pre-constructed sample data using a deep learning method, and is used to assess the call probability of the data to be stored. The call probability assessment model can be a supervised learning model or an unsupervised learning model. Preferably, the call probability assessment model is an unsupervised learning model.
[0071] Furthermore, the step of calculating the normalized frequency coefficient of the associated event corresponding to the data type of the data to be stored specifically includes:
[0072] extracting a second data feature of the data to be stored, where the second data feature includes an associated object of the data to be stored;
[0073] constructing a second input data sequence using the second data feature;
[0074] Inputting the second input data sequence into a pre-trained data classification model to identify the data type of the data to be stored;
[0075] According to the occurrence frequency of the associated event corresponding to the data type of the data to be stored, a normalized frequency coefficient corresponding to the occurrence frequency is calculated.
[0076] In the technical solution of the above embodiment, the second data feature is a data feature that reflects the data type of the data to be stored, which includes but is not limited to the attribute features and action features corresponding to the association of the data to be stored.
[0077] The second input data sequence is a data sequence obtained by standardizing the data in the second data feature, where the standardization includes performing dimensional standardization, data normalization, and abnormal data elimination on each data item in the second data feature.
[0078] In the technical solutions of some embodiments of the present invention, the data classification model is a convolutional neural network model obtained by training pre-constructed sample data using a deep learning method, and is used to identify the data type of the data to be stored.
[0079] Furthermore, the step of extracting the second data feature of the data to be stored specifically includes:
[0080] Identifying an associated object of the data to be stored;
[0081] Loading a structure of the associated object to instantiate the associated object of the stored data using the structure, wherein the structure includes a property list and an action list of the associated object;
[0082] matching the attribute features and action features of the associated object in the data to be stored based on the attribute list and action list of the structure;
[0083] The associated object and its attribute characteristics and action characteristics are determined as the second data characteristics of the data to be stored.
[0084] In a structure, the attribute list of the associated object is represented as a list of member variables of the structure, and the action list of the associated object is represented as a list of member functions of the structure. After being instantiated by the structure, the associated object uses the attribute list to store the attribute characteristics of the data to be stored, and uses the member functions in the action list as the action characteristics of the data to be stored, for performing operations on the data to be stored.
[0085] It should be known that the data to be stored does not contain all the attribute characteristics of the associated object, nor does it contain all the action characteristics of the associated object. Therefore, in the technical solution of the above-mentioned embodiment, by executing the step of matching the attribute characteristics and action characteristics of the associated object in the data to be stored based on the attribute list and action list of the structure, the attribute characteristics and action characteristics of the data to be stored contained in the data to be stored are determined in the form of feature matching, and the matched attribute characteristics and action characteristics of the data to be stored are determined as the first data characteristics.
[0086] Furthermore, the step of calculating a normalized frequency coefficient corresponding to the occurrence frequency of the associated event corresponding to the data type of the data to be stored specifically includes:
[0087] Determine the statistical period for the frequency of event occurrence;
[0088] Counting the occurrence frequency f0 of the associated events corresponding to the data type of the data to be stored within the event occurrence frequency statistics period;
[0089] Obtain the occurrence frequency f of other event types in the e-commerce system within the event occurrence frequency statistical period i , where i is 1 to n e - a positive integer between t and n e is the number of event types in the e-commerce system;
[0090] Calculate the normalized frequency coefficient corresponding to the occurrence frequency:
[0091]
[0092] Preferably, the event occurrence frequency statistics period can be configured as a time period corresponding to a preset time length before the step of calculating the normalized frequency coefficient of the associated event corresponding to the data type of the data to be stored is performed. The time length for counting the occurrence frequency of the associated event can be adaptively configured according to actual implementation needs.
[0093] In the step of counting the occurrence frequency of associated events corresponding to the data type of the data to be stored within the event occurrence frequency statistical period, it is specifically to count the average number of times this type of associated events occur per unit time in the e-commerce system within the event occurrence frequency statistical period.
[0094] The other event types in the e-commerce system refer to all event types in the e-commerce system, except for the type of associated event corresponding to the data type of the data to be stored.
[0095] Furthermore, the step of extracting the first data feature from the call data specifically includes:
[0096] Traversing each call information in the call data, the call information including the calling program and the calling time of the call;
[0097] Obtaining a calling program code and a calling time code from the calling information;
[0098] Generate a call feature for each call information, wherein the call feature is composed of the call program code and the call time code;
[0099] The call features of each call information are merged into the first data features in chronological order.
[0100] Specifically, the calling program code is a unique code assigned to the calling program in the e-commerce system. The time code can be a structured time code containing year, month, day, hour, minute, and second, or a timestamp code accurate to millisecond level.
[0101] In the technical solution of the above embodiment, the first data feature is a collection of call features in the call data, that is, a time data sequence composed of the calling program code and the calling time code in the multiple call information of the first data feature.
[0102] In the technical solutions of other embodiments of the present invention, the first data feature can also be a feature obtained by statistics based on the calling program code, a feature of the number of calls or a feature of the calling frequency of each calling program in the calling data.
[0103] Furthermore, the step of constructing a first input data sequence using the normalized frequency coefficient and the first data feature specifically includes:
[0104] Obtaining an associated object code of the associated object and a data type code of the data type;
[0105] The first input data sequence is constructed based on the associated object code, the data type code, the normalized frequency coefficient, and the first data feature.
[0106] Likewise, the associated object code and the data type code are unique codes assigned to the associated object and the data type in the e-commerce system, respectively.
[0107] The step of constructing the first input data sequence based on the associated object code, the data type code, the normalized frequency coefficient, and the first data feature also includes the step of normalizing each data item constituting the first input data sequence. Similarly, the normalization process includes performing dimensional normalization, data normalization, and abnormal data removal on each data item in the first input data sequence.
[0108] Furthermore, the data storage strategy includes a first storage strategy with high-speed read and write characteristics, and the step of executing the corresponding data storage strategy on the data to be stored according to the call probability evaluation result of the data to be stored specifically includes:
[0109] Determining whether the probability of calling the data to be stored is greater than a preset probability threshold;
[0110] When the call probability of the data to be stored is greater than a preset probability threshold, determining a first target database and a first target data table for storing the data to be stored in the first storage space according to the data type of the data to be stored, the first storage space being a high-speed storage space, and the first target database being a distributed database in the first storage space;
[0111] The data to be stored is written into the corresponding first target data table in the distributed database according to the preset library and table sharding rules.
[0112] For data to be stored whose call probability evaluation result is a high call probability, that is, data to be stored whose call probability is greater than a preset probability threshold, a first storage strategy with high-speed read and write characteristics is adopted to store it. More specifically, the data to be stored using the first storage strategy is stored in a distributed database that can read and write in real time at high speed, so that the data to be stored can quickly perform read and write operations when called. Preferably, the high-speed storage space includes a high-frequency access data storage space constructed using a high-speed solid-state hard drive, and a high-frequency access data backup space constructed using a low-speed mechanical hard drive.
[0113] Furthermore, the data storage strategy includes a second storage strategy with a low-cost storage characteristic, and after the step of determining whether the call probability of the data to be stored is greater than a preset probability threshold, further includes:
[0114] When the call probability of the data to be stored is less than a preset probability threshold, determining a second target database and a second target data table for storing the data to be stored in the second storage space according to the data type of the data to be stored, wherein the second storage space is a low-speed storage space;
[0115] The data to be stored is written into the corresponding second target data table in the second target database.
[0116] Furthermore, the low-speed storage space is a low-frequency access data storage space constructed using a low-speed mechanical hard disk, and the second target database is a traditional centralized database. The low-speed storage space has a lower storage cost, and the centralized database has a lower deployment cost, so that the adoption of the second storage strategy has a clear cost advantage.
[0117] Furthermore, the data storage strategy includes a third storage strategy having a low-cost storage characteristic and an inaccessible characteristic, and after the step of writing the data to be stored into the corresponding second target data table in the second target database, further includes:
[0118] Get the pre-configured slow cache period;
[0119] Determining whether a storage time of the data to be stored in the second storage space is greater than the low-speed cache period;
[0120] When the storage time of the data to be stored in the second storage space is longer than the low-speed cache cycle, and the data to be stored is not called during the storage period in the second storage space, the data to be stored is compressed using a preset compression algorithm and then written into the third storage space, and the third storage space is a low-speed storage space.
[0121] In the technical solution of the above-mentioned embodiment, the data stored using the third storage strategy has the characteristic of being inaccessible, that is, after the data to be stored is compressed and stored in the third storage space, any application or service program in the e-commerce system can no longer directly call the data to be stored.
[0122] Furthermore, after the step of determining whether the probability of calling the data to be stored is greater than a preset probability threshold, the method further includes:
[0123] When the call probability of the data to be stored is greater than a preset probability threshold, determining the associated object of the data to be stored as the target object;
[0124] determining whether there is first associated data of the target object in the third storage space, where the first associated data is data to be stored with the target object as an associated object when storing;
[0125] When the first associated data of the target object exists in the third storage space, the storage policy of the first associated data is changed to the second storage policy, and the first associated data is decompressed and released to the second storage space.
[0126] Furthermore, after the step of determining whether the probability of calling the data to be stored is greater than a preset probability threshold, the method further includes:
[0127] Get the pre-configured normalized frequency threshold;
[0128] When the call probability of the data to be stored is greater than a preset probability threshold, determining the associated object of the data to be stored as the target object;
[0129] determining whether second associated data of the target object exists in the second storage space, where the second associated data is data to be stored with the target object as an associated object when the data is stored;
[0130] When the second associated data of the target object exists in the second storage space, calculating a normalized frequency coefficient of an associated event corresponding to a data type of the second associated data;
[0131] Determining whether the normalized frequency coefficient of the associated event is greater than the normalized frequency threshold;
[0132] When the normalized frequency coefficient of the associated event is greater than the normalized frequency threshold, the storage strategy of the second associated data is changed to the first storage strategy,
[0133] The second aspect of the present invention proposes an e-commerce system, including a client and a server. A user establishes a communication connection with the server through the client to access the e-commerce system. The server is configured to implement the e-commerce data storage method described in any one of the first aspects of the present invention.
[0134] As previously mentioned, the term "user" in the present invention broadly refers to various types of users in an e-commerce system, including but not limited to consumer users, merchant users, and backend administrator users. The client can be an application or web browser running on a user device such as a personal computer or mobile terminal. The server is a service program running on a server that implements the various functions of the e-commerce system.
[0135] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
[0136] While embodiments of the present invention have been described above, these embodiments do not exhaustively describe all details and do not limit the invention to the specific embodiments described. Obviously, many modifications and variations are possible based on the above description. These embodiments are selected and described in detail in this specification in order to better explain the principles and practical applications of the present invention, thereby enabling those skilled in the art to better utilize the present invention and its modifications. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. An e-commerce data storage method, characterized in that: include: Receiving or generating data to be stored, wherein the data to be stored is data input by a user received by the e-commerce system, or data generated by the e-commerce system in response to an internal event or an external event; Calculating a normalized frequency coefficient of an associated event corresponding to the data type of the data to be stored; Acquire call data of an associated object of the data to be stored, wherein the call data is data of the same type as the data to be stored that is called by the associated object of the data to be stored within a preset time range; extracting a first data feature from the call data; constructing a first input data sequence using the normalized frequency coefficients and the first data features; Inputting the first input data sequence into a pre-trained call probability evaluation model to evaluate the call probability of the data to be stored; A corresponding data storage strategy is executed on the data to be stored according to the call probability evaluation result of the data to be stored.
2. The e-commerce data storage method according to claim 1, characterized in that: The step of calculating the normalized frequency coefficient of the associated event corresponding to the data type of the data to be stored specifically includes: extracting a second data feature of the data to be stored, where the second data feature includes an associated object of the data to be stored; constructing a second input data sequence using the second data feature; Inputting the second input data sequence into a pre-trained data classification model to identify the data type of the data to be stored; According to the occurrence frequency of the associated event corresponding to the data type of the data to be stored, a normalized frequency coefficient corresponding to the occurrence frequency is calculated.
3. The e-commerce data storage method according to claim 2, characterized in that: The step of extracting the second data feature of the data to be stored specifically includes: Identifying an associated object of the data to be stored; Loading a structure of the associated object to instantiate the associated object of the stored data using the structure, wherein the structure includes a property list and an action list of the associated object; matching the attribute features and action features of the associated object in the data to be stored based on the attribute list and action list of the structure; The associated object and its attribute characteristics and action characteristics are determined as the second data characteristics of the data to be stored.
4. The e-commerce data storage method according to claim 2, characterized in that: The step of calculating the normalized frequency coefficient corresponding to the occurrence frequency of the associated event corresponding to the data type of the data to be stored specifically includes: Determine the statistical period for the frequency of event occurrence; Counting the occurrence frequency f0 of the associated events corresponding to the data type of the data to be stored within the event occurrence frequency statistics period; Obtain the occurrence frequency f of other event types in the e-commerce system within the event occurrence frequency statistical period i , where i is 1 to n e - a positive integer between t and n e is the number of event types in the e-commerce system; Calculate the normalized frequency coefficient corresponding to the occurrence frequency:
5. The e-commerce data storage method according to claim 1, characterized in that: The step of extracting the first data feature from the call data specifically includes: Traversing each call information in the call data, the call information including the calling program and the calling time of the call; Obtaining a calling program code and a calling time code from the calling information; Generate a call feature for each call information, wherein the call feature is composed of the call program code and the call time code; The call features of each call information are merged into the first data features in chronological order.
6. The e-commerce data storage method according to claim 5, characterized in that: The step of constructing a first input data sequence using the normalized frequency coefficient and the first data feature specifically includes: Obtaining an associated object code of the associated object and a data type code of the data type; The first input data sequence is constructed based on the associated object code, the data type code, the normalized frequency coefficient, and the first data feature.
7. The e-commerce data storage method according to claim 1, characterized in that: The data storage strategy includes a first storage strategy with a high-speed read and write characteristic, and the step of executing the corresponding data storage strategy on the data to be stored according to the call probability evaluation result of the data to be stored specifically includes: Determining whether the probability of calling the data to be stored is greater than a preset probability threshold; When the call probability of the data to be stored is greater than a preset probability threshold, determining a first target database and a first target data table for storing the data to be stored in the first storage space according to the data type of the data to be stored, the first storage space being a high-speed storage space, and the first target database being a distributed database in the first storage space; The data to be stored is written into the corresponding first target data table in the distributed database according to the preset library and table sharding rules.
8. The e-commerce data storage method according to claim 7, characterized in that: The data storage strategy includes a second storage strategy with a low-cost storage characteristic, and after the step of determining whether the probability of calling the data to be stored is greater than a preset probability threshold, further includes: When the call probability of the data to be stored is less than a preset probability threshold, determining a second target database and a second target data table for storing the data to be stored in the second storage space according to the data type of the data to be stored, wherein the second storage space is a low-speed storage space; The data to be stored is written into the corresponding second target data table in the second target database.
9. The e-commerce data storage method according to claim 8, characterized in that: The data storage strategy includes a third storage strategy with low-cost storage characteristics and inaccessible characteristics, and after the step of writing the data to be stored into the corresponding second target data table in the second target database, further includes: Get the pre-configured slow cache period; Determining whether a storage time of the data to be stored in the second storage space is greater than the low-speed cache period; When the storage time of the data to be stored in the second storage space is longer than the low-speed cache cycle, and the data to be stored is not called during the storage period in the second storage space, the data to be stored is compressed using a preset compression algorithm and then written into the third storage space, and the third storage space is a low-speed storage space.
10. An e-commerce system, characterized in that: The system comprises a client and a server, wherein a user establishes a communication connection with the server through the client to access the e-commerce system, and the server is configured to implement the e-commerce data storage method according to any one of claims 1 to 9.