JSON serialization method and system for table-based marketing components

Through the JSON serialization method of table-type marketing components, the problems of low collaboration efficiency and high cost of table-type marketing components are solved, efficient processing and cross-regional data processing are achieved, integration costs and transmission frequency are reduced, and system stability is improved.

CN114997128BActive Publication Date: 2025-10-03HANGZHOU HUMPBACK WHALE TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210692260.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-17
Publication Date
2025-10-03
Estimated Expiration
2042-06-17

AI Technical Summary

Technical Problem

Existing technologies are inefficient and costly when processing unstructured data collaboration in table-based marketing components. Traditional online documents combined with OT algorithms cannot effectively solve collaboration problems in complex scenarios. API interface design and maintenance are time-consuming and unstable.

Method used

This system uses the JSON serialization method for table-type marketing components. It obtains the file package from the component server, parses the type attribute file, determines whether it contains table-type components, extracts table rows and converts them into key-value pairs, creates a JSON string, broadcasts and synchronizes it to the client, and uses Serverless containers and storage for data processing.

Benefits of technology

It achieves efficient processing of tabular unstructured data, reduces the integration cost of marketing components, provides cross-regional data processing solutions, reduces the frequency of complex data transmission, and improves work efficiency and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114997128B_ABST
    Figure CN114997128B_ABST
Patent Text Reader

Abstract

This application provides a JSON serialization method for tabular marketing components. This method can process unstructured tabular data, such as table components, leveraging JSON's superior performance processing and analysis capabilities. It also provides a solution for distributing data processing across regions, reducing the integration cost of marketing components and eliminating the need for frequent complex data transfer between different components and regions. When data processing is needed, the JSON parsing tool automatically locates and pulls the data locally.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data processing and management, and in particular to a JSON serialization method for a table-type marketing component. Background Art

[0002] A complete marketing campaign, from planning to implementation to review, involves collaboration among several users. The collaboration process not only uses structured data such as transaction orders and user information, but also unstructured data such as documents, tables, images, videos, and activity processes.

[0003] Existing storage solutions for structured data and unstructured data generally store and manage structured data and unstructured data separately.

[0004] Specifically, existing technologies typically model and store structured data in data warehouses. Data analysts then perform data mining using SQL statements and present the analysis results using independent BI tools. Unstructured data, on the other hand, is stored in DAM (Digital Asset Management) servers. This presents collaboration challenges. For example, changes to content require offline synchronization with relevant users. Multiple edits and synchronizations can lead to version errors, which is time-consuming and labor-intensive.

[0005] Traditional solutions typically use online documents combined with the OT algorithm to address collaboration difficulties. The essence of the OT algorithm is to convert each user-submitted action into a transformation function and send it to other users. For example, let's denote the action submitted by user K by k and the action submitted by user M by m. We define the OT algorithm's transformation function transform(k, m). After receiving k and m, the backend uses the transformation function transform(k, m) to calculate k' and m'. Then, k' and m' are forwarded to user B and user A, respectively, achieving collaboration.

[0006] For example, the original texts of users A and B are both aaab. User A submits action k = inserting a c after the third character, generating aaacb. User B submits action m = inserting a d after the third character, generating aaadb. After receiving the actions submitted by users A and B, the backend server uses the transformation function transform(k, m) to calculate and obtain k' = inserting a c after the third character, and m' = inserting a d after the fourth character. The backend server then notifies user B of k' and user A of m'. After receiving m', user A executes m', and finally generates aaacdb. After receiving k', user B executes k', and finally generates aaacdb. It can be seen that the results generated by the two users through this collaborative method remain consistent.

[0007] However, this approach of combining online documents with OT algorithms can only address real-time collaboration for text-formatted files. Real-time collaboration for complex unstructured data, such as spreadsheet marketing components, can only be achieved through specific API interfaces. For example, if user A and user B simultaneously request operations on the same table, user A wants to change the data in cell A in table A, and user B also wants to change the data in cell A in table A, how can this collaboration be achieved? However, API interfaces require a series of processes, including API definition, API design, technical review, code development, and front-end and back-end debugging. This is extremely time-consuming, costly, and inefficient. Furthermore, marketing campaigns can involve tens of thousands of different combinations, and API interfaces cannot cover all possibilities. System stability is also uncontrollable in complex situations, and manual maintenance costs are high. Summary of the Invention

[0008] Based on this, it is necessary to provide a json serialization method for table-type marketing components to address the collaboration problems of traditional table-type marketing components and the problem that the method of using online documents combined with OT algorithms to solve collaboration problems is extremely time-consuming, costly and inefficient.

[0009] This application provides a JSON serialization method for a table-based marketing component, including:

[0010] Obtain the marketing component file package from the component server, parse the marketing component file package to obtain the marketing component type attribute file;

[0011] According to the marketing component type attribute file, it is determined whether the marketing component includes a table component element;

[0012] If the marketing component includes a table-type component element, extract multiple table rows from the marketing component;

[0013] Convert each table row into a table row key-value pair;

[0014] Create a json string and write each table row key-value pair into the json string in sequence;

[0015] The json string is synchronized to each client in a broadcast manner.

[0016] This application also provides a JSON serialization system for table-based marketing components, including:

[0017] Multiple clients;

[0018] A serverless container, connected to each client for executing the JSON serialization method of the table marketing component according to any one of claims 1 to 9;

[0019] A component server, communicating with the serverless container;

[0020] At least one memory.

[0021] This application provides a JSON serialization method for tabular marketing components. This method can process unstructured tabular data, such as table components, leveraging JSON's superior performance processing and analysis capabilities. It also provides a solution for distributing data processing across regions, reducing the integration cost of marketing components and eliminating the need for frequent complex data transfer between different components and regions. When data processing is needed, the JSON parsing tool automatically locates and pulls the data locally. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A flowchart of a JSON serialization method for a table-based marketing component provided in an embodiment of the present application.

[0023] Figure 2 A schematic diagram of the structure of the JSON serialization system of the table-based marketing component provided in one embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0025] This application provides a JSON serialization method for a table-type marketing component. It should be noted that the JSON serialization method for a table-type marketing component provided in this application is applied to table-type marketing components, such as table components.

[0026] In addition, the JSON serialization method of the table-type marketing component provided in this application does not limit its execution entity.

[0027] Optionally, the JSON serialization method for the table-based marketing component provided herein may be executed by a JSON serialization system for the table-based marketing component. Specifically, the JSON serialization method for the table-based marketing component provided herein may be executed by a serverless container within the JSON serialization system for the table-based marketing component.

[0028] The unstructured data in the table-type components in this application can be stored in a local storage or an FTP server or a server equipped with a digital asset management system (DAM).

[0029] like Figure 1As shown, in one embodiment of the present application, the method includes the following S100 to S600:

[0030] S100: Obtain a marketing component file package from a component server, and parse the marketing component file package to obtain a marketing component type attribute file.

[0031] Specifically, a marketing component refers to a functional component required for use in a marketing campaign, including but not limited to one or more of a text component, a table component, an image component, a video component, a process canvas component, a data card component, and an approval flow component.

[0032] S200 , judging whether the marketing component includes a table component element based on the marketing component type attribute file.

[0033] Specifically, a marketing component is a binary object that exists in a marketing component file package. This package contains a marketing component type attribute file. This file identifies the component elements within the marketing component. These include different types of point and line components, table components, image components, and video components. A marketing component can contain either a single type of component element or multiple types.

[0034] For example, the process canvas component only includes point and line component elements, while the table component can include table component elements and image component elements because images can be inserted into the table.

[0035] S300: If the marketing component includes a table-type component element, extract multiple table rows from the marketing component.

[0036] Specifically, if a marketing component includes a table-type component element, it indicates that the marketing component contains a relationship consisting of multiple table rows. For example, a table component can be split into multiple table rows. Multiple table rows constitute the entire table. In a narrow sense, this means that the marketing component is a table-type marketing component. Later, we need to serialize this table-type marketing component into JSON.

[0037] S400: Convert each table row into a table row key-value pair.

[0038] Specifically, each table row can be converted into a key-value pair consisting of a key and a value.

[0039] S500: Create a json string, and write each table row key-value pair into the json string in sequence.

[0040] Specifically, by writing each table row key-value pair into the json string in sequence, a complete json string is generated, and the data information in each cell contained in the table-type marketing component, the row information and column information to which the cell belongs are cleverly written into the json string, and the json string is used to carry this information.

[0041] S600: Synchronize the json string to each client in a broadcast manner.

[0042] Specifically, before S600, the JSON serialization method of the point-line marketing component further includes:

[0043] S550: Parse the marketing component file package to obtain tabular unstructured data in the marketing component file package, and store the tabular unstructured data.

[0044] Tabular unstructured data can be stored in different storage spaces, either in the storage inside the Serverless container or in external storage or servers connected to the Serverless container.

[0045] JSON syntax originally supports data structures such as strings, numbers, arrays, Boolean values, and Null. However, it cannot handle unstructured data types such as tables, which may appear in marketing activities. The key-value pairs generated in this step, containing such unstructured data, enable JSON syntax to support such unstructured data, such as tables, used in marketing activities.

[0046] In this embodiment, the JSON serialization method for the table-based marketing component can process unstructured table-based data, such as table components, leveraging JSON's superior performance processing and analysis capabilities. It also provides a solution for distributed data processing across regions, reducing the integration cost of marketing components and eliminating the need for frequent complex data transfer between different components and regions. When data processing is needed, the JSON parsing tool automatically locates and pulls the data locally.

[0047] In one embodiment of the present application, the step S300 includes the following steps:

[0048] S310 , extracting the table row ID of each table row and the table row record data of each table row from the marketing component file package.

[0049] Specifically, a table is a two-dimensional array structure consisting of rows and columns. Each table row has a table row ID, which is a unique identification code used as an index for each table row.

[0050] The marketing component package contains table row data for each table row. This records the data recorded in each cell in the table row, as well as the row and column information to which the cell belongs. Later, we need to serialize the marketing component into JSON based on the table row data.

[0051] In one embodiment of the present application, the table row key-value pair includes a table row ID key-value pair and at least one table column key-value pair. The S400 includes the following S410 to S450:

[0052] S410, selecting a table row;

[0053] S420, generating a table row ID key-value pair of the table row according to the table row ID of the table row;

[0054] S430, splitting the table row into at least one table column;

[0055] S440, generating a table column key-value pair for each table column according to the table row record data of the table row, to obtain at least one table column key-value pair;

[0056] S450 , returning to S410 , until a table row ID key-value pair and at least one table column key-value pair are generated for each table row.

[0057] Specifically, a table column ID key-value pair consists of a key and a value. A table column key-value pair also consists of a key and a value.

[0058] Each table row has multiple table columns. Each table column can be understood as a cell. Each table column carries different data, which can be a string, a number, or an image.

[0059] In one embodiment of the present application, the S440 includes the following S441 to S446:

[0060] S441, select a table column.

[0061] S442 , generating one or more of a table column type key-value pair, a table column name key-value pair, a timestamp key-value pair, a string key-value pair, and a storage path key-value pair for the table column according to the table row record data of the table row.

[0062] S443: Use the serial number of the table column as the key of the table column key-value pair.

[0063] Specifically, each table row has multiple table columns, and each table column has a corresponding sequence number.

[0064] For example, table row A has three table columns, which are numbered 001, 002, and 003 respectively.

[0065] This step generates one or more of the following key-value pairs for each table column: column type, column name, timestamp, string, and storage path. The column's sequence number is then used as the key for each key-value pair.

[0066] S444 , combining one or more of the table column type key-value pair, table column name key-value pair, timestamp key-value pair, string key-value pair, and storage path key-value pair of the table column, and using the combined result as the value of the table column key-value pair.

[0067] S445 , combining the key of the table column key-value pair and the value of the table column key-value pair to generate a table column key-value pair for the table column.

[0068] S446 , returning to S441 , until a table column key-value pair is generated for each table column.

[0069] Specifically, the table column type may include one or more of a numeric type (int), a date type (int), a character string type (string), a user type (user), and a picture type (pic), but is certainly not limited to these types.

[0070] In one embodiment of the present application, the S442 includes the following S442a1 to S442a4:

[0071] S442a1 , classifying the table columns according to the table row record data of the table rows to obtain table column types of the table columns.

[0072] S442a2: Generate a table column type keyword, and use the table column type keyword as a key of a table column type key-value pair.

[0073] S442a3 , generating a table column type field of the table column according to the table column type of the table column, and using the table column type field of the table column as the value of the table column type key-value pair.

[0074] S442a4: Combine the key of the table column type key-value pair with the value of the table column type key-value pair to generate a table column type key-value pair for the table column.

[0075] Specifically, an example of a key-value pair for a date-type table column is:

[0076] "type":"data".

[0077] In this example, the table column type keyword is type and the table column type field is data.

[0078] In one embodiment of the present application, the S422 further includes the following S442b1 to S442b4:

[0079] S442b1, reading the table column name of the table column from the table row record data of the table row;

[0080] S442b2, generating a table column name keyword, and using the table column name keyword as the key of the table column name key-value pair;

[0081] S442b3, generating a table column name field of the table column according to the table column name of the table column, and using the table column name field of the table column as the value of the table column type key-value pair;

[0082] S442b4: Combine the key of the table column type key-value pair with the value of the table column type key-value pair to generate a table column name key-value pair for the table column.

[0083] Specifically, examples of table column name key-value pairs are:

[0084] "name":"time".

[0085] In this example, the table column name keyword is name and the table column name field is time.

[0086] This table column name key-value pair indicates that this table column requires time information to be entered. Therefore, the table column name key-value pair mainly reflects the overview of the input data of this table column.

[0087] In one embodiment of the present application, the S442 further includes the following S442c1 to S442c5:

[0088] S442c1, reading the date information required to be input for the table column from the table row record data of the table row.

[0089] S442c2, converting the required input date information into a Unix timestamp field.

[0090] S442c3, generate a table column timestamp keyword, and use the timestamp keyword as the key of the timestamp key-value pair.

[0091] S442c4, use the Unix timestamp field as the value of the timestamp key-value pair.

[0092] S442c5, combine the key of the timestamp key-value pair with the value of the timestamp key-value pair to generate a timestamp key-value pair.

[0093] Specifically, examples of timestamp key-value pairs are:

[0094] "unix": 1650781736. 1650781736 is the Unix representation of the date, which can be restored to a specific time.

[0095] When the table column type is date type, a timestamp key-value pair will be generated.

[0096] In one embodiment of the present application, the S442 further includes the following S442d1 to S442d5:

[0097] S442d1, reading the text document to be inserted into the table column from the table row record data of the table row.

[0098] S442d2, converting the text document to be inserted into the table column into a character string.

[0099] S442d3, generate a table column string keyword, and use the string keyword as the key of the string key-value pair.

[0100] S442d4, uses a string as the value of a string key-value pair.

[0101] S442d5, combines the key of the string key-value pair with the value of the string key-value pair to generate a string key-value pair.

[0102] Specifically, when data is stored in the database, it is presented as a text document. In this case, a string can be used in the JSON string to express the content of the text document, that is, the string format is used to correspond to the text document in the database.

[0103] Examples of string keys are as follows:

[0104] "text"="Currently, the service boundaries and depth of analytics involvement in business lines are vague and need to be clearly defined."

[0105] In this example, the table column string keyword is text, and the string is Currently, the service boundaries and depth of involvement of analytics in business lines are vague and need to be clearly defined.

[0106] After the string key-value pair is generated, it means that the input of this table column is text.

[0107] When the table column type is string, string key-value pairs will be generated.

[0108] In one embodiment of the present application, the S442 further includes the following S442e1 to S442e4:

[0109] S442e1, reading the storage path of the input image required for the table column from the table row record data of the table row.

[0110] S442e2: Generate a storage path keyword and use the storage path keyword as the key of the storage path key-value pair.

[0111] S442e3: Use the storage path of the input image required by the table column as the value of the storage path-value pair.

[0112] S442e4, combining the key of the storage path key-value pair with the value of the storage path key-value pair to generate a storage path key-value pair.

[0113] Specifically, an example of a storage path key-value pair is shown below:

[0114] "path": "http: / / dam.meetwhale.com / logo.jpg".

[0115] In this example, the storage path keyword is path, and the storage path of the input image required by the table column is http: / / dam.meetwhale.com / logo.jpg.

[0116] The storage path key-value pair indicates that the image is stored in the storage path http: / / dam.meetwhale.com / logo.jpg.

[0117] When the table column type is image type, the storage path key-value pair will be generated accordingly.

[0118] In one embodiment of the present application, when the table column type is user type, in addition to generating a table column name key-value pair, other key-value pairs that specifically describe the attributes of a user are also generated, including a user ID key-value pair whose key is user_id, a user email key-value pair whose key is mail, and a user phone number key-value pair whose key is phone.

[0119] In one embodiment of the present application, after executing S100 to S500, an example of the JSON string finally formed is as follows:

[0120] First table row:

[0121]

[0122]

[0123]

[0124] Second table row:

[0125]

[0126]

[0127] like Figure 2 As shown, in one embodiment of the present application, the JSON serialization system for the marketing component includes multiple clients 100, serverless containers 200, a component server 300, and at least one storage device 400. The serverless container 200 is communicatively connected to each client 100. The serverless container 200 is used to execute the JSON serialization method for the marketing component mentioned in the aforementioned embodiment. The component server 300 is communicatively connected to the serverless container 200.

[0128] Specifically, the memory 400 may include a memory embedded in the Serverless container, an external FTP server, and an external DAM server (a server of a digital asset management system).

[0129] It should be noted that, for the sake of brevity, all devices or modules are only numbered in the embodiment of the JSON serialization system of the table-type marketing component, and are no longer numbered in the aforementioned embodiment of the JSON serialization method of the table-type marketing component.

[0130] The various technical features of the above-described embodiments can be combined arbitrarily, and the execution order of the method steps is not restricted. In order to make the description concise, not all possible combinations of the various technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0131] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A JSON serialization method for a table-type marketing component, characterized in that: The method comprises: Obtain the marketing component file package from the component server, parse the marketing component file package to obtain the marketing component type attribute file; According to the marketing component type attribute file, determine whether the marketing component includes table-type component elements; If the marketing component includes a table component element, extracting the table row ID of each table row and the table row record data of each table row from the marketing component file package; Convert each table row into a table row key-value pair; Create a json string and write each table row key-value pair into the json string in sequence; Synchronize the json string to each client in a broadcast manner; The table row key-value pair includes a table row ID key-value pair and at least one table column key-value pair, and converting each table row into a table row key-value pair includes: Select a table row; Generate a table row ID key-value pair for the table row according to the table row ID of the table row; splitting the table row into at least one table column; generating a table column key-value pair for each table column according to the table row record data of the table row, to obtain at least one table column key-value pair; Returning to the step of selecting a table row until a table row ID key-value pair and at least one table column key-value pair are generated for each table row; Generating a table column key-value pair for each table column based on the table row record data of the table row to obtain at least one table column key-value pair includes: Select a table column; generating, based on the table row record data of the table row, a table column type key-value pair and a table column name key-value pair of the table column, and generating, based on the table column type of the table column, at least one of a timestamp key-value pair, a string key-value pair, and a storage path key-value pair; Use the serial number of the table column as the key of the table column key-value pair; Combine multiple of the table column type key-value pair, table column name key-value pair, timestamp key-value pair, string key-value pair, and storage path key-value pair of the table column, and use the combined result as the value of the table column key-value pair; Combining the key of the table column key-value pair with the value of the table column key-value pair to generate a table column key-value pair for the table column; Returning to the step of selecting a table column until a table column key-value pair is generated for each table column; The Serverless container is used to execute the JSON serialization method of the table-based marketing component; The generated table column type key-value pairs include: Classifying the table columns according to the table row record data of the table rows to obtain table column types of the table columns; Generate a table column type keyword, and use the table column type keyword as a key of a table column type key-value pair; Generate a table column type field of the table column according to the table column type of the table column, and use the table column type field of the table column as the value of the table column type key-value pair; Combine the key of the table column type key-value pair with the value of the table column type key-value pair to generate a table column type key-value pair for the table column; Generating string key-value pairs includes: Read the document to be inserted into the table column from the table row record data of the table row; Convert the document to be inserted into the table column into a string; Generate table column string keywords and use the string keywords as the key of the string key-value pair; Use the string as the value of the string key-value pair; Combine the key of a string key-value pair with the value of a string key-value pair to generate a string key-value pair.

2. The JSON serialization method of the table marketing component according to claim 1 is characterized in that: The step of generating a table column type key-value pair and a table column name key-value pair for the table column based on the table row record data of the table row, and generating at least one of a timestamp key-value pair, a string key-value pair, and a storage path key-value pair based on the table column type of the table column, wherein generating the table column name key-value pair includes: Reading a table column name of the table column from the table row record data of the table row; Generate a table column name keyword, and use the table column name keyword as the key of the table column name key-value pair; Generate a table column name field of the table column according to the table column name of the table column, and use the table column name field of the table column as the value of the table column name key-value pair; The key of the table column name key-value pair is combined with the value of the table column name key-value pair to generate a table column name key-value pair for the table column.

3. The JSON serialization method of the table marketing component according to claim 1 is characterized in that: The step of generating a table column type key-value pair and a table column name key-value pair for the table column based on the table row record data of the table row, and generating at least one of a timestamp key-value pair, a string key-value pair, and a storage path key-value pair according to the table column type of the table column, wherein generating the timestamp key-value pair includes: Read the date information required to be input for the table column from the table row record data of the table row; Convert the required input date information into a Unix timestamp field; Generate a timestamp keyword for the table column and use the timestamp keyword as the key of the timestamp key-value pair; Use the Unix timestamp field as the value of the timestamp key-value pair; Combine the key of a timestamp key-value pair with the value of a timestamp key-value pair to generate a timestamp key-value pair.

4. The JSON serialization method of the table marketing component according to claim 1 is characterized in that: The step of generating a table column type key-value pair and a table column name key-value pair for the table column based on the table row record data of the table row, and generating at least one of a timestamp key-value pair, a string key-value pair, and a storage path key-value pair according to the table column type of the table column, wherein generating the storage path key-value pair includes: Read the storage path of the input image required for the table column from the table row record data of the table row; Generate a storage path keyword and use the storage path keyword as the key of the storage path key-value pair; The storage path of the input image required by the table column is used as the value of the storage path value pair; Combine the key of the storage path key-value pair with the value of the storage path key-value pair to generate a storage path key-value pair.

5. A JSON serialization system for table-based marketing components, characterized by: include: Multiple clients; A serverless container, connected to each client for executing the JSON serialization method of the table marketing component according to any one of claims 1 to 4; A component server, communicating with the serverless container; At least one memory.

Citation Information

Patent Citations

  • Automatic table data synchronization method and device, computer equipment and storage medium

    CN111966756A