Table synchronization method and device, storage medium and product
The table synchronization method addresses inefficiencies and errors in data synchronization by establishing a mapping relationship and performing attribute verification, ensuring accurate and efficient synchronization of data from diverse channels to a standard table.
Patent Information
- Application Number
- CN202411260413.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2025-01-03
AI Technical Summary
In today's diversified information environment, enterprises face inefficiencies and high error rates when manually synchronizing data from tables with differing field names and orders across multiple channels.
A table synchronization method that involves obtaining a mapping relationship between table fields and standard fields, performing attribute verification on field contents, and synchronizing data to a standard table, ensuring accuracy and efficiency by eliminating the need for personalized processing for each channel.
Ensures synchronization accuracy and improves efficiency by directly mapping and verifying field contents, allowing for unified management of data from different channels without requiring individual processing for each table.
Smart Images

Figure CN119248773A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of table synchronization, and in particular to a table synchronization method, device, storage medium and product. Background Art
[0002] In today's diversified information environment, enterprises need to collect data from multiple channels to support their business operations. This data is usually collected in the form of tables, but because the fields in the tables of different channels may differ in naming and order, manually entering the field contents in the tables of each channel is inefficient and has a high error rate. Summary of the invention
[0003] The embodiments of the present application provide a table synchronization method, apparatus, device, storage medium and product, which can not only ensure synchronization accuracy but also improve synchronization efficiency when synchronizing different tables to be synchronized to the same table.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] The present application provides a table synchronization method, the method comprising:
[0006] In response to a synchronization request for a first table, obtain table fields of the first table and field contents of the table fields; obtain a mapping relationship between table fields of a table to be synchronized, standard fields of a standard table, and annotation attributes of the standard fields, wherein the table to be synchronized includes the first table; based on the mapping relationship, determine a first standard field and a first annotation attribute that match the table field of the first table; perform attribute verification on the field content based on the first annotation attribute, and if the attribute verification passes, synchronize the field content to the first standard field of the standard table.
[0007] The embodiment of the present application provides a table synchronization device, including:
[0008] A first acquisition module, configured to acquire, in response to a synchronization request for a first table, table fields of the first table and field contents of the table fields;
[0009] The second acquisition module is used to acquire the mapping relationship between the table fields of the table to be synchronized, the standard fields of the standard table, and the annotation attributes of the standard fields; the table to be synchronized includes the first table
[0010] a determination module, configured to determine, based on the mapping relationship, a first standard field and a first annotation attribute that match a table field of the first table;
[0011] A synchronization module is used to perform attribute verification on the field content based on the first annotation attribute, and if the attribute verification passes, synchronize the field content to the first standard field of the standard form.
[0012] An embodiment of the present application provides an electronic device, the electronic device comprising:
[0013] A memory for storing computer executable instructions;
[0014] The processor is used to implement the method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.
[0015] An embodiment of the present application provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the table synchronization method provided in the embodiment of the present application when executed by a processor.
[0016] An embodiment of the present application provides a computer program product, including a computer program or a computer executable instruction. When the computer program or the computer executable instruction is executed by a processor, the table synchronization method provided in the embodiment of the present application is implemented.
[0017] The embodiments of the present application have the following beneficial effects:
[0018] Applying the above embodiment, in response to a synchronization request for the first table, the table fields in the first table and the field contents under the table fields are extracted, and based on the pre-constructed mapping relationship, the first standard field and the first annotation attribute in the standard table that match the table field of the first table are determined, and when the attribute verification of the field content under the table field based on the first annotation attribute is passed, the field content is synchronized to the first standard field of the standard table. In this way, when it is necessary to synchronize the data of the first table in the table to be synchronized to the standard table for unified management, the mapping between the table fields of the first table and the standard fields of the standard table can be directly realized through the mapping relationship, and the accuracy of the synchronization of the table data is guaranteed by the attribute verification process of the first annotation attribute before synchronization, so that when the table is synchronized, there is no need to perform personalized processing for different tables to be synchronized, thereby improving data processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flowchart of a table import method in the related art provided by an embodiment of the present application;
[0020] Figure 2 It is a structural diagram of the table synchronization system architecture provided in an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0022] Figure 4A It is a first flow chart of the table synchronization method provided in an embodiment of the present application;
[0023] Figure 4B It is a first flow chart of the method for constructing a mapping relationship provided in an embodiment of the present application;
[0024] Figure 4C It is a flowchart of field content synchronization provided by an embodiment of the present application;
[0025] Figure 4D It is a second flow chart of the table synchronization method provided in an embodiment of the present application;
[0026] Figure 5A It is a second flow chart of the method for constructing a mapping relationship provided in an embodiment of the present application;
[0027] Figure 5B It is a flowchart of automatically establishing a feedback case provided by an embodiment of the present application;
[0028] Figure 5C It is a flowchart of the attribute verification method provided in an embodiment of the present application.
[0029] It should be pointed out that the above-mentioned "first" and "second" are only used to distinguish different solutions, and do not represent the degree of superiority or inferiority of the solutions or the priority in the implementation process. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0031] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0032] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0033] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0034] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0035] The relevant data collection and processing in the embodiments of this application should be strictly in accordance with the requirements of relevant laws and regulations when applied in examples, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of authorization of laws and regulations and the personal information subject.
[0036] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0037] 1) Table field is a basic concept in databases. It refers to a column in a data table. Each field defines a type and attribute of data stored in a data table. In a relational database, table fields usually correspond to columns in the table structure, and each row corresponds to a record or tuple.
[0038] 2) Annotation attributes: In database management and data processing, annotation attributes usually refer to additional descriptions or definitions of table fields during database table structure design or data processing. These annotation attributes can help developers or database administrators better understand the purpose, data type, constraints, etc. of table fields.
[0039] In today's diversified information environment, enterprises need to collect data from multiple channels to support their business operations. For example, when an e-commerce platform sells products, it needs to synchronize inventory information from different warehouses to the inventory management system; customer data collected by a multi-channel marketing platform needs to be synchronized to the customer database for unified customer analysis and personalized marketing; a customer feedback management platform needs to receive customer feedback data from different channels to create customer feedback cases for customers who initiate feedback, so as to uniformly process the feedback content.
[0040] These data are usually collected in the form of tables, but because the fields in the tables of different channels may differ in naming and order, manually entering the field contents in the tables of each channel is inefficient and has a high error rate. Therefore, a solution for batch importing tables from different channels is proposed in the related art. The solution is to develop personalized tables for different channels and build different table entities for tables of different channels. The "entity" in building different entities for different tables here refers to the class or object used to represent and store data in the programming language. "Building different entities" means mapping the data (field content) in the table to different data structures (entities) according to the structure and content of different tables.
[0041] Figure 1 A flowchart of a table import method in the related art provided in the embodiment of the present application is shown in FIG. Figure 1 , its table import methods include:
[0042] Step 101, receiving an imported table to be processed.
[0043] Step 102, read the table fields and field contents of the table to be processed, and store the table fields and field contents separately.
[0044] Step 103: Convert the field content into a table entity.
[0045] Step 104, looping to verify the table entity.
[0046] Step 105: When the verification is passed, the entity instance in the table entity is used to perform subsequent business processing.
[0047] However, in this method of related technology, the personalized developed code is easy to expand and is not conducive to maintenance. In addition, when it is necessary to integrate tables from different channels, this method also requires conversion between table entities. The processing flow is complicated and the efficiency needs to be improved.
[0048] In addition, in the related technology, the starting row of the tables of different channels needs to be fixed. If there is a change, the code of the table entity needs to be modified accordingly so that the field content of the table can be written into the table entity; the naming of the table fields of the table also needs to be consistent with the field naming of the table entity. If the tables of different channels contain fields with the same meaning, they cannot be mapped to the same field of the same table entity.
[0049] The embodiments of the present application provide a table synchronization method, apparatus, device, storage medium and program product, which can not only ensure synchronization accuracy but also improve synchronization efficiency when synchronizing different tables to be synchronized to the same table.
[0050] See also Figure 2 , Figure 2 It is an architectural diagram of the table synchronization system 100 provided in an embodiment of the present application. To support a table synchronization application, the terminal (terminal 400-1 and terminal 400-2 are shown as examples) is connected to the server 200 via the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.
[0051] In an embodiment of the present application, different terminals (such as terminal 400-1 and terminal 400-2) are equivalent to initiators corresponding to different channels. The fields of the tables to be synchronized configured by different terminals (such as terminal 400-1 and terminal 400-2) are different in naming. The field contents recorded by the tables to be synchronized configured by the terminals (such as terminal 400-1 and terminal 400-2) need to be synchronized to the standard table on the server 200 so as to manage the table data in a unified manner.
[0052] The terminal (such as terminal 400-1 and terminal 400-2) is used to initiate a synchronization request for a first table to the server 200, and the synchronization request carries the first table, which is a table to be synchronized configured by the terminal (such as terminal 400-1 and terminal 400-2). When the server 200 receives the synchronization request for the first table, it responds to the synchronization request for the first table to obtain the table fields of the first table and the field contents of the table fields; obtain the mapping relationship between the table fields of the table to be synchronized, the standard fields of the standard table, and the annotation attributes of the standard fields, and the table to be synchronized includes the first table; based on the mapping relationship, determine the first standard field and the first annotation attribute that match the table field of the first table; perform attribute verification on the field content based on the first annotation attribute, and if the attribute verification passes, synchronize the field content to the first standard field of the standard table.
[0053] It should be noted that there is no limit on the time for different terminals (such as terminal 400-1 and terminal 400-2) to initiate a synchronization request to server 200. A synchronization request can be initiated to server 200 when the field content in the table to be synchronized of the terminal (such as terminal 400-1 and terminal 400-2) is updated, or a synchronization request can be initiated to server 200 at a set time point.
[0054] In some embodiments, the above-mentioned terminals (such as terminal 400-1 and terminal 400-2) can be implemented as various types of terminals such as laptop computers, tablet computers, desktop computers, set-top boxes, smart phones, smart speakers, smart watches, smart TVs, and car terminals, and can also be implemented as servers.
[0055] In some embodiments, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal (such as terminal 400-1, terminal 400-2) and the server 200 can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.
[0056] See also Figure 3 , Figure 3 is a schematic diagram of the structure of an electronic device 400 provided in an embodiment of the present application, Figure 3 The electronic device 400 shown includes: at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the electronic device 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 440 is not described in detail. Figure 3 Various buses are labeled as bus system 440 .
[0057] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0058] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0059] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.
[0060] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.
[0061] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0062] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0063] A network communication module 452, used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB), etc.;
[0064] a presentation module 453 for enabling presentation of information via one or more output devices 431 (e.g., display screen, speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripherals and displaying content and information);
[0065] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.
[0066] In some embodiments, the table synchronization device provided in the embodiments of the present application can be implemented in software. Figure 3 The table synchronization device 455 stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, etc., and includes the following software modules: a first acquisition module 4551, a second acquisition module 4552, a determination module 4553, and a synchronization module 4554. These modules are logical, and therefore can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.
[0067] In other embodiments, the table synchronization device provided in the embodiments of the present application can be implemented in hardware. As an example, the table synchronization device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the table synchronization method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application specific integrated circuits (Application Specific Integrated Circuit, ASIC), digital signal processors (Digital Signal Processor, DSP), programmable logic devices (Programmable Logic Device, PLD), complex programmable logic devices (Complex Programmable Logic Device, CPLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other electronic components.
[0068] Below, the table synchronization method provided by the embodiment of the present application will be described in conjunction with the accompanying drawings. As mentioned above, the electronic device that implements the table synchronization method of the embodiment of the present application can be a terminal (such as terminal 400-1, terminal 400-2), server 200, or a combination of the two. When the electronic device that implements the table synchronization method is terminal 400-1, other terminals (such as terminal 400-2) can send their tables to be synchronized to terminal 400-1 and initiate a synchronization request to terminal 400-1. Therefore, the execution subject of each step will not be repeated below.
[0069] The table synchronization method of the embodiment of the present application is described by taking the execution subject as the server 200 as an example. Figure 4A , Figure 4A This is a first flow chart of the table synchronization method provided in the embodiment of the present application, which will be combined with Figure 4A The steps shown are explained.
[0070] In step 201 , in response to a synchronization request for a first table, table fields and field contents of the table fields of the first table are acquired.
[0071] In actual implementation, the synchronization request for the first table may be initiated by the terminal corresponding to the first table (such as terminal 400-1, terminal 400-2). When the server 200 receives the synchronization request for the first table, in response to the synchronization request for the first table, the table fields of the first table and the field contents corresponding to the table fields are extracted from the first table. The field contents of the table fields refer to the specific data stored in the table fields in the first table. Each table field has certain data types and attributes, and the field contents are the specific information stored according to these attributes and types.
[0072] As an example, if the first table is a table storing user information, its table fields and field contents may include: user ID, 12345; user name, Xiaoming; email, XXXX@qq.com; registration date, 2021-05-25. Among them, user ID, user name, email, and registration date are the table fields of the first table, and 12345, Xiaoming, XXXX@qq.com, and 2021-05-25 are the field contents corresponding to the table fields.
[0073] In step 202, a mapping relationship between the table fields of the table to be synchronized, the standard fields of the standard table, and the annotation attributes of the standard fields is obtained.
[0074] The table to be synchronized includes the first table.
[0075] Although the table fields in the tables to be synchronized in different channels are named differently, they actually represent the same meaning. For example, the table to be synchronized in channel A includes the table field "name", while the table to be synchronized in channel B includes the table field "name", and the table to be synchronized in channel C includes the table field "name". These three table fields actually indicate the name of an object, but due to different table building habits, different naming methods appear. Therefore, in the embodiment of the present application, a standard table is constructed for such situations, and corresponding table entities are constructed only for the standard table, and mapping relationships are pre-configured for the standard fields in the standard table, the annotation attributes corresponding to the standard fields, and the table fields of the tables to be synchronized in each channel.
[0076] The first table is one of the tables to be synchronized. When a synchronization request for the first table is received, the mapping relationship is directly obtained, and the mapping between the table fields and the standard fields in the first table is determined through the mapping relationship.
[0077] In some embodiments, see Figure 4B ,exist Figure 4A Before step 202 shown, the mapping relationship in step 202 may be constructed by following steps 205 to 207 .
[0078] In step 205, the annotation attributes of the standard fields are constructed according to the attribute constraint information of the standard fields in the standard table.
[0079] In step 206, among the table fields of the table to be synchronized, table fields having the same meaning as the standard fields are determined.
[0080] In step 207, a mapping relationship is constructed among the standard field, the annotation attribute of the standard field, and the table field having the same meaning as the standard field.
[0081] Since different fields correspond to specific attributes of the data in the table, such as data type (integer, string, date, etc.), length, number of decimal places, etc. Fields are a very critical part of table structure design, and they determine how data is stored and retrieved. Therefore, when creating or modifying standard tables, it is necessary to reasonably define the standard fields in the standard tables to ensure the accuracy and integrity of the data. The definition of field content needs to follow the data type and attribute constraints of the standard fields. For example, if a standard field is defined as an integer type, it can only store integer type field content; if a standard field is defined as a string type, it can only store string type field content.
[0082] Therefore, in actual implementation, in order to ensure the accuracy of the field content when the first table is synchronized, the annotation attributes corresponding to the standard fields can be constructed according to the attribute constraint information of the standard fields in the standard table, so that the corresponding field contents in the first table can be verified when the first table is synchronized.
[0083] As an example, the annotation attributes of a standard field include at least attribute constraint information of the standard field in terms of attribute constraints. The attribute constraint information may refer to various restrictive conditions set when defining the standard field, which ensure the integrity and consistency of the data under the standard field. For example, the attribute constraint information may include data types, enumeration attributes, dictionary attributes, etc., and may also include general attribute information of the standard field. Among them, enumeration attributes refer to a field that can only take a limited number of predefined values, which are usually defined by a set of enumeration types. Enumeration attributes can be used to limit the value of the field to ensure the consistency and accuracy of the data. For example, when representing gender, an enumeration attribute can be used, and its value can only be "male" or "female". Dictionary attributes usually refer to associating an externally defined data dictionary or value set with a standard field in the data model to limit the value range of the standard field and provide it with a corresponding description or label.
[0084] As examples, here are some common annotation properties and their meanings: Field Name: The name of the standard field in the standard table, used to identify the standard field during query and operation; Data Type: Defines the type of data that the standard field can store, such as integer (INT), floating point number (FLOAT), string (VARCHAR), etc.; Length: For standard fields of string type, defines the maximum number of characters that the standard field can store; Decimal Places: For standard fields of numeric type, defines the precision of the numeric value, that is, the number of decimal places that can be stored; Default Value: The value that is automatically filled in if the value of the field is not specified when inserting data; Not Empty: Indicates that the standard field cannot be empty when inserting or updating records; Unique: Indicates that the value in the standard field must be unique in the standard table; Primary Key: A standard field that uniquely identifies each row in the standard table, which cannot be empty and must be unique; Comment: Descriptive text for the standard field or standard table, providing additional information about the standard field or standard table.
[0085] Next, the tables to be synchronized of different channels are read to obtain the table fields configured in the tables to be synchronized of different channels, and the table fields in each table to be synchronized that have the same meaning as the standard fields are determined.
[0086] As an example, assuming that a standard field of the standard form is "name", then in the table fields of the table to be synchronized in channel A, the table field with the same meaning as "name" is determined to be "name"; in the table fields of the table to be synchronized in channel B, the table field with the same meaning as "name" is determined to be "name"; in the table fields of the table to be synchronized in channel C, the table field with the same meaning as "name" is determined to be "name".
[0087] Based on this, a mapping relationship can be established between the standard field, the annotation attribute of the standard field, and the table field with the same meaning as the standard field. As an example, a mapping relationship is established between the standard field "Name" of the standard table, the annotation attribute corresponding to the standard field "Name", the table field "Name" of the table to be synchronized in channel A, the table field "Name" of the table to be synchronized in channel B, and the table field "Name" of the table to be synchronized in channel C. The mapping relationship can be expressed as {standard field: "Name"; annotation attribute: XXXX; table field: "Name"; table field: "Name"; table field: "Name"}. Here, the annotation attribute is schematically described using XXX. In this way, a mapping relationship can be established between each standard field in the standard table and its corresponding annotation attribute and the table field with the same meaning.
[0088] In some embodiments, the channels corresponding to each table field can also be configured in the mapping relationship. As an example, the mapping relationship of the standard field "name" can be expressed as {standard field: "name"; annotation attribute: XXXX; channel A-table field: "name"; channel B-table field: "name"; channel C-table field: "name"}.
[0089] Through the above embodiments, since a mapping relationship is constructed for the tables to be synchronized and the standard tables of each channel, when the first table in the tables to be synchronized is synchronized, the table fields with the same meaning in the tables of different channels can be mapped to the same field in the standard table through the mapping relationship. In this way, the tables to be synchronized in each channel do not need to use a fixed table starting row, and the field order or field name in the tables to be synchronized can also be configured according to actual needs, thereby improving the scalability of the tables to be synchronized.
[0090] Continue reading Figure 4A , and the description will continue with the above step 202.
[0091] In step 203 , based on the mapping relationship, a first standard field and a first annotation attribute matching the table field of the first table are determined.
[0092] In actual implementation, after obtaining the mapping relationship, for each table field in the first table, a match is performed in the mapping relationship to determine the first standard field matching each table field and the first annotation attribute corresponding to the first standard field, wherein the first annotation attribute is used to indicate the attribute constraint information of the first standard field.
[0093] In step 204, attribute verification is performed on the field content based on the first annotation attribute, and if the attribute verification passes, the field content is synchronized to the first standard field of the standard form.
[0094] In actual implementation, for each table field in the first table, the field content corresponding to each table field is extracted, and the field content under the table field is attribute verified based on the first annotation attribute corresponding to each table field. When the attribute verification result indicates that the field content complies with the attribute constraint information represented by the first annotation attribute, the field content is synchronized to the first standard field corresponding to the table field in the standard table.
[0095] In some embodiments, the “attribute verification of the field content based on the first annotation attribute” in step 204 may be implemented in the following manner.
[0096] Based on the attribute constraint information indicated by the first annotation attribute, attribute validation of a first validation type is performed on the field content; wherein the first validation type includes at least one of the following: enumeration type validation, numeric type validation, format validation, and range validation.
[0097] In actual implementation, different standard fields correspond to different annotation attributes, and the attribute verification of the corresponding first verification type is performed on the field content according to the attribute constraint information of each standard field.
[0098] As an example, numerical type verification may include: if the first annotation attribute indicates that the field type of the first standard field is a date, if the imported field content is a date, it means that the type verification of the field content has passed; enumeration type verification may include: if the enumeration value of the first standard field configured in the first annotation attribute is [male, female], then it is determined whether the imported field content is "male" or "female", if it is one of them, the enumeration type verification has passed; format verification may include: if the first annotation attribute is configured with a mobile phone number regular expression for the first standard field, then a regular expression match may be performed on the imported field content, if the regular expression match is successful, it means that the format verification has passed; range verification may include: if the numerical range of the first standard field configured in the first annotation attribute is [50-100], then it is determined whether the imported field content is a number and is within the range of 50 to 100, if the imported field content is a number and is within the range of 50 to 100, it means that the range verification has passed.
[0099] In some embodiments, “synchronizing the field content to the first standard field of the standard table” in step 204 may be implemented in the following manner.
[0100] A table entity of the standard table is determined, and an entity instance of the table entity corresponding to the first standard field is constructed based on the field content.
[0101] In an embodiment of the present application, since the field contents in the tables to be synchronized in different channels will be synchronized to the standard table, it is only necessary to build a corresponding table entity for the standard table. When the first table is synchronized, each table field in the first table is mapped to the corresponding standard field in the standard table through a mapping relationship, and then the field content under each table field in the first table is used as the field content under the standard table corresponding to each table field. Based on the field content, an entity instance is constructed in the table entity of the standard table, and each entity instance represents a row of data in the standard table (that is, a row of field content).
[0102] In some embodiments, see Figure 4C , the "synchronizing the field content to the first standard field of the standard form" in step 204 can also be implemented through steps 2041 to 2043.
[0103] In step 2041, when there is a synchronization request of the second table within the response time period of the synchronization request of the first table, object detection is performed on the field contents of the first table and the second table to obtain a first detection result.
[0104] In some cases, if a synchronization request for a second table from another channel is received within a time period in response to a synchronization request for a first table, object detection may be performed on the field contents of the first table and the second table to determine whether field contents for the same object exist in multiple tables.
[0105] As an example, the scenario of the customer feedback management platform is used as an example. The customer feedback management platform collects feedback data from different feedback channels, that is, when the to-be-synchronized tables of different feedback channels generate feedback data updates, they will initiate synchronization requests to the customer feedback management platform to uniformly process the customer's feedback data on the customer feedback management platform. Here, the customer's feedback data can be positive feedback information (referred to as positive feedback) proposed by the customer to the enterprise, or it can be negative feedback information (referred to as negative feedback). In this scenario, if customer A initiates negative feedback on event 1 by email within a certain period of time, and also initiates negative feedback on event 1 through the customer service phone, then the feedback content described by customer A in the negative feedback email is added to the to-be-synchronized table corresponding to the feedback channel of the email, and the feedback content described by customer A on the phone is added to the to-be-synchronized table corresponding to the feedback channel of the phone. Here, the to-be-synchronized table of the feedback channel of the email and the to-be-synchronized table of the feedback channel of the phone both include field content for describing the negative feedback situation of customer A (object) on event 1. If the manager of the email feedback channel initiates a synchronization request to the customer feedback management platform, then the table to be synchronized corresponding to the email feedback channel is the first table. During the response time period of the customer management platform for the synchronization request of the first table, the manager of the telephone feedback channel also initiates a synchronization request to the customer feedback management platform. Then the table to be synchronized corresponding to the telephone feedback channel is the second table. In this case, object detection can be performed on the field contents in the first table and the second table to obtain a first detection result, which is used to indicate whether field contents for the first object (here, customer A) exist in both the first table and the second table.
[0106] In step 2042, when the first detection result indicates that field content for the first object exists in both the first table and the second table, the field content for the first object in the first table and the second table is merged to obtain merged field content for the first object.
[0107] In some embodiments, the step 2042 of “merging the field contents of the first table and the second table for the first object” may be implemented in the following manner.
[0108] Whether there is a conflict between the field contents for the first object in the first table and the second table is detected to obtain a second detection result; if the second detection result indicates that there is no conflict, the field contents for the first object in the first table and the second table are merged.
[0109] In actual implementation, if the first detection result indicates that the field content for the first object exists in both the first table and the second table, it means that the first table and the second table both contain relevant information generated by the first object, and the first object refers to the same object or the same object existing in the first table and the second table. At this time, it is also possible to detect whether the field content for the first object in the first table and the second table conflicts, and obtain a second detection result. When the second detection result indicates that there is no conflict, the field content for the first object in the first table and the second table is merged.
[0110] However, since both the first table and the second table contain field content for the first object, the field content in the first table and the field content in the second table may point to different information of the first object. In this case, the second detection result will indicate that there is a conflict between the field content for the first object in the first table and the second table. In this case, the field content for the first object in the first table and the second table cannot be merged.
[0111] As an example, continuing with the example of step 2041, if both the first table of the email feedback channel and the second table of the telephone feedback channel contain field content regarding customer A (the first object)'s feedback on event 1, and the second detection result indicates that there is no conflict between the field content regarding the first object in the first table and the second table, then the field content regarding customer A's feedback on event 1 in the first table and the field content regarding customer A's feedback on event 1 in the second table may be merged.
[0112] As an example, if the first table contains field content for customer A's feedback on event 1, and the second table contains field content for customer A's feedback on event 2, in this case, although both tables contain field content for customer A, the actual situations indicated by the field contents are conflicting. The second detection result will indicate that there is a conflict between the field content for the first object in the first table and the second table, and the field content for the first object in the first table and the second table cannot be merged.
[0113] As an example, the field contents for the first object in the first table and the second table can be detected by means of semantic similarity, vector similarity, etc. If the vector similarity between the field contents of the first table and the field contents of the second table exceeds a preset similarity threshold, it can be determined that the second detection result indicates that there is no conflict. On the contrary, if the vector similarity between the field contents of the first table and the field contents of the second table does not exceed the preset similarity threshold, it can be determined that the second detection result indicates that there is a conflict.
[0114] In step 2043, the merge field content is synchronized to the first standard field of the standard form.
[0115] When the second detection result indicates that there is no conflict, the field contents for the first object in the first table and the second table are merged to obtain the merged field contents for the first object, and the merged field contents are used as the field contents under the corresponding first standard field in the standard table, and the merged field contents corresponding to the first object are used as a piece of data to generate a corresponding entity instance in the table entity of the standard table.
[0116] In some embodiments, “synchronizing the field content to the first standard field of the standard table” in step 204 may also be implemented in the following manner.
[0117] When the second detection result indicates that there is a conflict, determine the synchronization priority of the first initiator of the first table and the second initiator of the second table; detect the synchronization priority of the first initiator and the second initiator to obtain a third detection result; when the third detection result indicates that the synchronization priority of the first initiator is higher than the synchronization priority of the second initiator, synchronize the field content of the first table to the first standard field of the standard table.
[0118] In actual implementation, if the second detection result indicates that there is a conflict between the field content of the first table and the second table for the first object, then the first table and the second table need to be synchronized separately. In this case, the priority of the initiators of the first table and the second table can be used to determine which table to synchronize first.
[0119] As an example, different channels correspond to different initiators. Since different initiators have different importance in business processing, corresponding priorities can be pre-configured for different initiators. For example, in a customer feedback scenario, telephone feedback is generally more appealing than email feedback. Therefore, the priority of the email feedback channel can be set lower than that of the telephone feedback channel.
[0120] As an example, when the second detection result indicates that there is a conflict between the field contents for the first object in the first table and the second table, the first initiator that sends the synchronization request for the first table and the second initiator that sends the synchronization request for the second table are determined, and the synchronization priority of the first initiator and the synchronization priority of the second initiator are determined. According to the priority order pre-set for different initiators, the synchronization priorities of the first initiator and the second initiator are detected to obtain a third detection result. In the case where the third detection result indicates that the synchronization priority of the first initiator is higher than the synchronization priority of the second initiator, the field contents of the first table are synchronized to the first standard field of the standard table in priority. In the case where the third detection result indicates that the synchronization priority of the first initiator is lower than the synchronization priority of the second initiator, the field contents of the second table are synchronized to the first standard field of the standard table in priority.
[0121] Through the above embodiment, in response to a synchronization request for the first table, the table fields in the first table and the field contents under the table fields are extracted, and based on the pre-constructed mapping relationship, the first standard field and the first annotation attribute in the standard table that match the table field of the first table are determined, and when the attribute verification of the field content under the table field is passed based on the first annotation attribute, the field content is synchronized to the first standard field of the standard table. In this way, when it is necessary to uniformly manage the table data of different channels, the tables of different channels can be synchronized to the standard table directly through the mapping relationship, without the need to personalize the tables of different channels, thereby improving data processing efficiency, and the accuracy of table data synchronization is ensured through the attribute verification process of the first annotation attribute.
[0122] In some embodiments, see Figure 4D ,exist Figure 4A After step 202 , the table synchronization method may further include steps 208 to 212 .
[0123] In step 208 , when the first standard field and the first annotation attribute are not determined based on the mapping relationship, semantic recognition is performed on the table field of the first table and the standard field of the standard table to obtain table field semantic features and standard field semantic features.
[0124] In step 209, semantic matching is performed on the semantic features of the table fields and the semantic features of the standard fields to obtain a semantic matching degree.
[0125] In step 210, second standard fields whose semantic matching degree exceeds a preset matching threshold are screened out from the standard fields of the standard table.
[0126] In step 211 , based on the mapping relationship, a second annotation attribute corresponding to the second standard field is determined.
[0127] In step 212, attribute verification is performed on the field content based on the second annotation attribute, and if the attribute verification passes, the field content is synchronized to the second standard field of the standard form.
[0128] In some cases, after the mapping relationship is built, the administrator of the designated channel modifies the name of a table field in the corresponding table to be synchronized. When the designated channel synchronizes the table, the mapping relationship has not been updated in time, and the first standard field and the first annotation attribute corresponding to the modified table field in the first table of the designated channel may not be determined based on the mapping relationship. In this case, in order to prevent the synchronization process of the first table from being interrupted, the standard field corresponding to the table field can be determined in the standard table by semantic recognition.
[0129] As an example, semantic recognition is performed on each table field in the first table to obtain the table field semantic features corresponding to each table field; semantic recognition is performed on each standard field in the standard table to obtain the standard field semantic features corresponding to each standard field. Then, for each table field, the table field semantic features of the table field are semantically matched with the standard field semantic features of all standard fields to obtain the semantic matching degree between the table field semantic features and the semantic features of each standard field. Based on a preset matching threshold, a second standard field whose semantic matching degree exceeds the preset matching threshold is screened out from the standard fields of the standard table. Subsequently, a second annotation attribute corresponding to the second standard field is determined in the mapping relationship, attribute verification is performed on the field content based on the second annotation attribute, and if the attribute verification passes, the field content is synchronized to the second standard field of the standard table. The second annotation attribute is used to indicate the attribute constraint information corresponding to the second standard field.
[0130] As an example, the process of semantic recognition and semantic matching of table fields and standard fields can be achieved in any of the following ways: based on a similarity method, the vector representations of the table fields and the standard fields are calculated respectively, and then the similarity between the vector representations is compared using methods such as cosine similarity and Euclidean distance to obtain the semantic matching degree; or, based on a machine learning method, a model is trained using machine learning algorithms such as classification and regression to predict the degree of semantic matching between the table fields and the standard fields to obtain the semantic matching degree.
[0131] In some embodiments, the above mapping relationship may also be updated in the following manner.
[0132] In the case where the second standard field is not filtered out from the standard fields of the standard table, a second standard field corresponding to the table field of the first table is constructed in the standard table; based on the attribute constraint information corresponding to the table field of the first table, a second annotation attribute of the second standard field is constructed; and the correspondence between the second standard field, the second annotation attribute and the table field of the first table is added to the mapping relationship.
[0133] In some cases, if the first standard field that matches the table field of the first table is not determined through the mapping relationship, and the second standard field is not screened out in the standard field of the standard table through semantic recognition and semantic matching, it indicates that there is no standard field corresponding to the table field in the standard table, and the table field in the first table may be a field that is subsequently expanded. In this case, the standard table and the mapping relationship can be updated according to the table field of the first table.
[0134] As an example, when the first standard field that matches the table field of the first table is not determined through the mapping relationship, and the second standard field is not screened out in the standard field of the standard table through semantic recognition and semantic matching, a second standard field corresponding to the table field of the first table is added to the standard table, and properties and methods corresponding to the second standard field are added to the table entity of the standard table. The attribute constraint information corresponding to the table field of the first table is obtained, and the attribute constraint information corresponding to the table field is used as the attribute constraint information of the newly added second standard field, and the second annotation attribute corresponding to the second standard field is constructed. At the same time, the corresponding relationship between the second standard field, the second annotation attribute, and the table field of the first table is established, and updated to the mapping relationship.
[0135] As an example, during the subsequent synchronization process for the second table, if there is a table field in the second table that semantically matches the second standard field, the correspondence between the table field of the second table and the second standard field is updated into the mapping relationship.
[0136] Through the above embodiments, since the mapping relationship and standard form in the embodiment of the present application support updating and modification, this dynamic adjustment method supports the scalability of the to-be-synchronized forms of different channels. When the table fields in the to-be-synchronized forms are updated, the corresponding updating of the mapping relationship and the standard form can ensure the normal synchronization of the form. This method is conducive to subsequent maintenance and expansion, and in the embodiment of the present application, only the corresponding table entity needs to be constructed for the standard form, and there is no need to carry out personalized development for the to-be-synchronized forms of each channel, which reduces the development and testing costs, and also reduces the risk of online failures.
[0137] In a specific embodiment, taking the customer feedback scenario as an example, after receiving customer feedback, the customer feedback management team needs to create a corresponding feedback case based on the customer feedback information, and then process the feedback case. In addition to the necessary data validity checks such as required fields, formats, and enumerations, business checks and data processing of various data dimensions are also required, and the system's process for creating feedback cases is relatively complicated. As the number of customer feedback channels and the amount of customer feedback carried by the customer feedback management platform increases, customer feedback data from different channels are collected through forms, and the table headers of the forms of each channel are different (that is, the field naming and field order are different); in order to improve the operational efficiency of the feedback business, the customer feedback management platform needs to support dynamic import of forms from different channels and automatically create feedback cases based on the field content of the imported forms.
[0138] As an example, Figure 5A A second flow chart of the method for constructing a mapping relationship provided in the embodiment of the present application is shown in FIG. Figure 5A Before importing tables from different channels, a mapping relationship may be pre-built through steps 301 to 303 .
[0139] In step 301, a corresponding custom annotation attribute is added based on each standard field in the standard table corresponding to the table entity. The annotation attribute is used to indicate the attribute constraint information of the standard field.
[0140] As an example, the annotation attributes of each standard field may include attribute information such as the name, dictionary attributes, enumeration attributes, data type attributes (for example: mobile phone number, landline number, ID number, date, time, etc.) used to describe the standard field.
[0141] In step 302, the correspondence between the table fields of the tables of each channel, the standard fields of the standard tables, and the annotation attributes of the standard fields is configured.
[0142] As an example, the correspondence between the channel name, the table field of the table corresponding to the channel name, the standard field, and the annotation attribute of the standard field can be configured.
[0143] In step 303, the configured corresponding relationship is written into the configuration table to obtain a mapping relationship. The mapping relationship is used to indicate the corresponding relationship between the table fields of each channel, the standard fields of the standard table, and the annotation attributes of the standard fields.
[0144] For example, see Figure 5B After the mapping relationship is configured, the process of automatically creating feedback cases for the feedback data of each channel can be implemented through steps 401 to 405.
[0145] In step 401, a synchronization request for a first table of any channel is received.
[0146] In step 402, in response to a synchronization request for a first table, table fields and field contents of the first table are obtained.
[0147] In step 403, a mapping relationship is obtained, and a first standard field and a first annotation attribute corresponding to a table field of the first table are determined based on the mapping relationship.
[0148] As an example, read each table field of the first table, determine the first standard field and the first annotation attribute corresponding to the table field in the mapping relationship, and encapsulate the first annotation attribute and the table field and store them in map[Map<Integer,FieldAttr> heads; key is the table field, value is the first annotation attribute].
[0149] In step 404, attribute verification is performed on the field content based on the first annotation attribute.
[0150] As an example, the field content corresponding to the table field is obtained, the encapsulated first annotation attribute is taken out based on the function heads.get(index), and the first annotation attribute is used to pre-verify the legality and validity of the field content.
[0151] In step 405, when the attribute verification passes, the field content is written into the first standard field of the standard form, and a corresponding feedback case is automatically created based on the written field content.
[0152] As an example, after the attribute verification is passed, the field content is written to the table entity of the standard table through the reflection function, and the case creation function is called to automatically create a corresponding feedback case based on the written field content.
[0153] For example, see Figure 5C , Figure 5B Step 404 in the embodiment can be implemented through steps 501 to 502.
[0154] In step 501, the field content corresponding to the table field is obtained, and the first annotation attribute of the package is retrieved based on the specified function.
[0155] In step 502, attribute verification of a first verification type is performed on the field content based on the attribute constraint information indicated by the first annotation attribute.
[0156] The first verification type includes at least one of the following: enumeration type verification, numerical type verification, format verification, and range verification.
[0157] The following is a description of an exemplary structure of the table synchronization device 455 provided in the embodiment of the present application implemented as a software module. In some embodiments, Figure 3As shown, the software modules stored in the table synchronization device 455 of the memory 440 may include:
[0158] The first acquisition module 4551 is used to acquire the table fields and field contents of the table fields of the first table in response to a synchronization request for the first table.
[0159] The second acquisition module 4552 is used to acquire the mapping relationship between the table fields of the table to be synchronized, the standard fields of the standard table, and the annotation attributes of the standard fields. The table to be synchronized includes a first table.
[0160] The determination module 4553 is used to determine the first standard field and the first annotation attribute that match the table field of the first table based on the mapping relationship.
[0161] The synchronization module 4554 is used to perform attribute verification on the field content based on the first annotation attribute, and if the attribute verification passes, synchronize the field content to the first standard field of the standard form.
[0162] In some embodiments, the table synchronization device 455 also includes a mapping relationship construction module, which is used to construct the annotation attributes of the standard field according to the attribute constraint information of the standard field in the standard table; determine the table field with the same meaning as the standard field in the table field of the table to be synchronized; and construct a mapping relationship between the standard field, the annotation attributes of the standard field and the table field with the same meaning as the standard field.
[0163] In some embodiments, the first annotation attribute is used to indicate the attribute constraint information of the first standard field; the synchronization module 4554 is also used to perform attribute verification of the first verification type on the field content based on the attribute constraint information indicated by the first annotation attribute; wherein the first verification type includes at least one of the following: enumeration type verification, numerical type verification, format verification, and range verification.
[0164] In some embodiments, the synchronization module 4554 is further used to determine a table entity of a standard table, and construct an entity instance of the table entity corresponding to a first standard field based on the field content.
[0165] In some embodiments, the synchronization module 4554 is also used to perform object detection on the field contents of the first table and the second table to obtain a first detection result when there is a synchronization request for the second table within the response time period of the synchronization request of the first table; when the first detection result indicates that there is field content for the first object in both the first table and the second table, merge the field contents for the first object in the first table and the second table to obtain merged field content for the first object; and synchronize the merged field content to the first standard field of the standard table.
[0166] In some embodiments, the synchronization module 4554 is also used to detect whether there is a conflict between the field content for the first object in the first table and the second table, and obtain a second detection result; when the second detection result indicates that there is no conflict, the field content for the first object in the first table and the second table is merged.
[0167] In some embodiments, the synchronization module 4554 is also used to determine the synchronization priority of the first initiator of the first table and the second initiator of the second table when the second detection result indicates that there is a conflict; detect the synchronization priority of the first initiator and the second initiator to obtain a third detection result; when the third detection result indicates that the synchronization priority of the first initiator is higher than the synchronization priority of the second initiator, synchronize the field content of the first table to the first standard field of the standard table.
[0168] In some embodiments, the table synchronization device 455 also includes a semantic synchronization module, which is used to perform semantic recognition on the table fields of the first table and the standard fields of the standard table to obtain table field semantic features and standard field semantic features when the first standard field and the first annotation attribute are not determined based on the mapping relationship; perform semantic matching on the table field semantic features and the standard field semantic features to obtain a semantic matching degree; filter out a second standard field whose semantic matching degree exceeds a preset matching threshold from the standard fields of the standard table; determine a second annotation attribute corresponding to the second standard field based on the mapping relationship; perform attribute verification on the field content based on the second annotation attribute, and if the attribute verification passes, synchronize the field content to the second standard field of the standard table.
[0169] In some embodiments, the table synchronization device 455 also includes a mapping relationship update module, which is used to construct a second standard field corresponding to the table field of the first table in the standard table without filtering out the second standard field from the standard field of the standard table; construct a second annotation attribute of the second standard field based on the attribute constraint information corresponding to the table field of the first table; and add the correspondence between the second standard field, the second annotation attribute and the table field of the first table to the mapping relationship.
[0170] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer readable storage medium. The processor of the electronic device reads the computer executable instruction from the computer readable storage medium, and the processor executes the computer executable instruction, so that the electronic device executes the table synchronization method described in the embodiment of the present application.
[0171] The present application embodiment provides a computer-readable storage medium, in which computer executable instructions or computer programs are stored. When the computer executable instructions or computer programs are executed by a processor, the processor will execute the table synchronization method provided by the present application embodiment, for example, Figure 4A The table synchronization method is shown.
[0172] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
[0173] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0174] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0175] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0176] In summary, through the embodiment of the present application, when responding to a synchronization request for the first table, the table fields in the first table and the field contents under the table fields are extracted, and based on the pre-constructed mapping relationship, the first standard field and the first annotation attribute that match the table field of the first table in the standard table are determined, and when the attribute verification of the field content under the table field based on the first annotation attribute is passed, the field content is synchronized to the first standard field of the standard table. In this way, when it is necessary to uniformly manage the table data of different channels, the tables of different channels can be synchronized to the standard table directly through the mapping relationship, and the accuracy of the table data synchronization is ensured by the attribute verification process of the first annotation attribute before synchronization, so that there is no need to personalize the tables of different channels when synchronizing the tables, thereby improving the data processing efficiency.
[0177] Furthermore, since a mapping relationship is constructed for the tables to be synchronized and the standard tables of each channel, when the first table in the tables to be synchronized is synchronized, the table fields with the same meaning in the tables of different channels can be mapped to the same field in the standard table through the mapping relationship. In this way, the tables to be synchronized in each channel do not need to use a fixed table start row, and the field order or field name in the tables to be synchronized can be configured according to actual needs, thereby improving the scalability of the tables to be synchronized. In the event that the table fields in the tables to be synchronized are updated, the corresponding updates to the mapping relationship and the standard table can ensure the normal synchronization of the table. This method is conducive to subsequent maintenance and expansion, and in the embodiment of the present application, only the corresponding table entity needs to be constructed for the standard table, and there is no need to carry out personalized development for the tables to be synchronized in each channel, which reduces the development and testing costs, and also reduces the risk of online failures.
[0178] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A table synchronization method, characterized in that: The method comprises: In response to a synchronization request for a first table, obtaining table fields of the first table and field contents of the table fields; Acquire a mapping relationship between table fields of a table to be synchronized, standard fields of a standard table, and annotation attributes of the standard fields, wherein the table to be synchronized includes the first table; Based on the mapping relationship, determining a first standard field and a first annotation attribute that match a table field of the first table; The field content is attribute-verified based on the first annotation attribute, and if the attribute-verification passes, the field content is synchronized to the first standard field of the standard form.
2. The method according to claim 1, characterized in that Before acquiring the mapping relationship between the table fields of the table to be synchronized, the standard fields of the standard table, and the annotation attributes of the standard fields, the method further includes: Constructing annotation attributes of the standard field according to the attribute constraint information of the standard field in the standard table; Determine, among the table fields of the table to be synchronized, a table field having the same meaning as the standard field; A mapping relationship is constructed among the standard field, the annotation attribute of the standard field, and the table field having the same meaning as the standard field.
3. The method according to claim 1, characterized in that The first annotation attribute is used to indicate the attribute constraint information of the first standard field; and the attribute verification of the field content based on the first annotation attribute includes: Based on the attribute constraint information indicated by the first annotation attribute, perform attribute verification of a first verification type on the field content; The first verification type includes at least one of the following: enumeration type verification, numerical type verification, format verification, and range verification.
4. The method according to claim 1, characterized in that: The step of synchronizing the field content to the first standard field of the standard form includes: A table entity of the standard table is determined, and an entity instance of the table entity corresponding to the first standard field is constructed based on the field content.
5. The method according to claim 1, characterized in that The step of synchronizing the field content to the first standard field of the standard form includes: In the case that there is a synchronization request of the second table within the response time period of the synchronization request of the first table, performing object detection on the field contents of the first table and the second table to obtain a first detection result; When the first detection result indicates that both the first table and the second table contain field contents for the first object, merging the field contents for the first object in the first table and the second table to obtain merged field contents for the first object; The merged field content is synchronized to the first standard field of the standard form.
6. The method according to claim 5, characterized in that The merging of the field contents of the first table and the second table for the first object includes: Detecting whether there is a conflict between the field contents of the first object in the first table and the second table, and obtaining a second detection result; When the second detection result indicates that there is no conflict, the field contents for the first object in the first table and the second table are merged.
7. The method according to claim 6, characterized in that The step of synchronizing the field content to the first standard field of the standard form includes: If the second detection result indicates that there is a conflict, determining the synchronization priority of the first initiator of the first table and the second initiator of the second table; Detecting the synchronization priorities of the first initiator and the second initiator to obtain a third detection result; When the third detection result indicates that the synchronization priority of the first initiator is higher than the synchronization priority of the second initiator, the field content of the first table is synchronized to the first standard field of the standard table.
8. The method according to claim 1, characterized in that The method further comprises: In the case that the first standard field and the first annotation attribute are not determined based on the mapping relationship, semantic recognition is performed on the table field of the first table and the standard field of the standard table to obtain table field semantic features and standard field semantic features; Performing semantic matching on the semantic features of the table fields and the semantic features of the standard fields to obtain a semantic matching degree; Filtering out, from the standard fields of the standard table, a second standard field whose semantic matching degree exceeds a preset matching threshold; Based on the mapping relationship, determining a second annotation attribute corresponding to the second standard field; The field content is attribute-verified based on the second annotation attribute, and if the attribute-verification passes, the field content is synchronized to the second standard field of the standard form.
9. The method according to claim 8, characterized in that The method further comprises: In the case where the second standard field is not screened out from the standard fields of the standard form, constructing a second standard field corresponding to the table field of the first table in the standard form; constructing a second annotation attribute of the second standard field based on the attribute constraint information corresponding to the table field of the first table; The correspondence between the second standard field, the second annotation attribute, and the table field of the first table is added to the mapping relationship.
10. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer executable instructions or computer programs; The processor is used to implement the table synchronization method described in any one of claims 1 to 9 when executing the computer executable instructions or computer programs stored in the memory.
11. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that: When the computer executable instructions or computer program are executed by a processor, the table synchronization method according to any one of claims 1 to 9 is implemented.
12. A computer program product comprising computer executable instructions or a computer program, characterized in that: When the computer executable instructions or computer program are executed by a processor, the table synchronization method according to any one of claims 1 to 9 is implemented.
