Data processing method and device and related equipment

By adopting a dual database architecture in the maintenance help system, leveraging the advantages of MySQL and MongoDB, the problem of insufficient data processing performance in the existing technology is solved, and more efficient and flexible data processing is achieved.

CN120104647APending Publication Date: 2025-06-06LAUNCH TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510156004.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The existing MySQL database-based repair help system has performance bottlenecks and user experience problems when processing large amounts of data, especially in data query and storage.

Method used

Using a dual database architecture, combining relational databases (such as MySQL) and non-relational databases (such as MongoDB), we use the flexibility and high scalability of non-relational databases to optimize data processing through data synchronization mechanisms.

Benefits of technology

Improves efficiency and flexibility when requesting maintenance help function, reduces database load, and improves user experience and system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120104647A_ABST
    Figure CN120104647A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and device and related equipment.The method is applied to a server, the server comprises a relational database and a non-relational database, data stored in the relational database and data stored in the non-relational database are synchronous, and the method comprises the steps that a query instruction is obtained, the query instruction carries a data type and a first key value of data needing to be queried; in the relational database, determining a target value according to the first data type and the first key value; determining a target index corresponding to the target value; the non-relational database comprises a plurality of indexes, and each index corresponds to one piece of data; the target index is one index in the plurality of indexes; and querying target data corresponding to the target index in the non-relational database. According to the method and the device, high flexibility and high efficiency can be realized when the user uses the maintenance help-seeking function request.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a data processing method, device and related equipment. Background Art

[0002] At present, in the field of automobile peripheral detection, repair help is a popular functional requirement. Usually, most automobile companies build repair help databases based on MySQL databases. They save the repair help result data in the database for users to query in order to realize the repair help function. However, MySQL database is a relational database, which is not suitable for large-scale data processing and has relatively insufficient scalability. Furthermore, for relational databases such as MySQL, data is stored on disks. If data needs to be operated, it needs to be subjected to various logical judgments and other operations, which affects the processing efficiency of the repair help function. In addition, in reality, automobile maintenance data is often complex, and the MySQL database cannot meet the needs of users.

[0003] As the content of the repair help function increases, the amount of data that needs to be collected and stored also increases accordingly. When making repair help inquiries, users will feel a lag, which affects the user experience. As the database capacity becomes larger and larger, the lag problem when users access it becomes more and more serious.

[0004] Therefore, how to improve the efficiency and flexibility of maintenance assistance function requests needs to be solved urgently. Summary of the invention

[0005] The embodiments of the present application provide a data processing method, apparatus and related equipment, which improve the flexibility and efficiency of users when using the maintenance help function request.

[0006] In a first aspect, an embodiment of the present application provides a data processing method, which is applied to a server, wherein the server includes a relational database and a non-relational database, and data stored in the relational database and data stored in the non-relational database are synchronized with each other, and the method includes:

[0007] Obtain a query instruction, wherein the query instruction carries the data type and the first key value of the data to be queried;

[0008] In the relational database, determining a target value according to the first data type and the first key value;

[0009] Determine a target index corresponding to the target value; the non-relational database includes multiple indexes, each index corresponds to one data; the target index is one of the multiple indexes;

[0010] The target data corresponding to the target index is queried in the non-relational database.

[0011] In a second aspect, an embodiment of the present application provides a data processing device, which is applied to a server, wherein the server includes a relational database and a non-relational database, and the data stored in the relational database and the data stored in the non-relational database are synchronized with each other, and the device includes an acquisition unit, a control unit, and a query unit, wherein:

[0012] The acquisition unit is used to acquire a query instruction, where the query instruction carries the data type and the first key value of the data to be queried;

[0013] The determining unit is used to determine a target value in the relational database according to the first data type and the first key value;

[0014] The control unit is further used to determine a target index corresponding to the target value; the non-relational database includes multiple indexes, each index corresponds to one data; the target index is one of the multiple indexes;

[0015] The query unit is used to query the non-relational database for target data corresponding to the target index.

[0016] In a third aspect, an embodiment of the present application provides a server, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps of any method in the first aspect of the embodiment of the present application.

[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps described in any method of the first aspect of the embodiment of the present application.

[0018] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in any method of the first aspect of the embodiment of the present application. The computer program product may be a software installation package.

[0019] By implementing the embodiments of the present application, the following beneficial effects are achieved:

[0020] A data processing method described in the present application is applied to a server, wherein the server includes a relational database and a non-relational database, and the data stored in the relational database and the data stored in the non-relational database assist and synchronize each other. By obtaining a query instruction, wherein the query instruction carries the data type and the first key value of the data to be queried, in the relational database, a target value is determined according to the first data type and the first key value, then, a target index corresponding to the target value is determined, the non-relational database includes multiple indexes, each index corresponds to a data, and the target index is an index in the multiple indexes, and finally, the target data corresponding to the target index is queried in the non-relational database. In this way, on the one hand, the server side of the server is optimized by the non-relational database, thereby improving the flexibility of the server in requesting the maintenance help function; on the other hand, by smoothly switching between the relational data area and the non-relational database, the data of the server is quickly accessed, the efficiency of the server in accessing data when requesting the maintenance help function is improved, and thus the efficiency of the server in requesting the maintenance help function is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0022] Figure 1 This is an architecture diagram of a maintenance help request data processing system provided by an embodiment of the present application;

[0023] Figure 2 It is a structural diagram of a server provided in an embodiment of the present application;

[0024] Figure 3 It is a flowchart of a data processing method provided in an embodiment of the present application;

[0025] Figure 4 It is a flowchart of another data processing method provided in an embodiment of the present application;

[0026] Figure 5 This is a schematic diagram of an application scenario of a maintenance assistance function provided in an embodiment of the present application;

[0027] Figure 6 It is a schematic diagram of an application scenario of a data processing method provided in an embodiment of the present application;

[0028] Figure 7 It is a schematic diagram of an application scenario of another data processing method provided in an embodiment of the present application;

[0029] Figure 8 It is a block diagram of the functional modules of a data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0031] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0032] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article indicates that the associated objects before and after are in an "or" relationship. The "plurality" appearing in the embodiments of the present application refers to two or more.

[0033] In the embodiments of the present application, "at least one item" or similar expressions refer to any combination of these items, including any combination of single items or plural items, and refer to one or more, and multiple refers to two or more. For example, at least one item of a, b, or c can represent the following seven situations: a, b, c, a and b, a and c, b and c, a, b, and c. Among them, each of a, b, and c can be an element or a set containing one or more elements.

[0034] The "connection" that appears in the embodiments of the present application refers to various connection methods such as direct connection or indirect connection to achieve communication between devices, and the embodiments of the present application do not impose any limitations on this.

[0035] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0036] The following is an explanation of the relevant terms involved in this application, as follows:

[0037] Relational database: A relational database is a database based on the relational model. It uses tables (i.e. relations) to store and manage data. Each table consists of rows (records) and columns (fields). Tables are associated with each other through relations (such as primary keys and foreign keys). MySQL is an open source relational database management system. It is one of the most popular relational databases and is widely used in Web applications, data storage, and enterprise systems.

[0038] Non-relational database: Non-relational database (Not Only SQL, NoSQL) is a data storage system different from traditional relational database, mainly used to process unstructured or semi-structured data. The design goal of non-relational database is to solve the needs of large-scale data storage, high concurrent access and flexible data model. MongoDB is an open source non-relational database, which is known for its flexible document model and high performance. It is widely used in modern Web applications, big data analysis and real-time data processing.

[0039] At present, most automobile companies build maintenance help databases based on MySQL databases. They save the maintenance help result data in the database for users to query in order to realize the maintenance help function. However, MySQL database is a relational database, which is not suitable for large-scale data processing and has relatively insufficient scalability. Furthermore, for relational databases such as MySQL, data is stored on disks. If data needs to be operated, it needs to be subjected to various logical judgments and other operations, which affects the processing efficiency of the maintenance help function. In addition, in reality, automobile maintenance data is often complex, and MySQL database cannot meet user needs. As the content of maintenance help functions increases, the amount of data that needs to be collected and stored also increases accordingly. When performing repair help inquiries, users will feel that there is a jamming phenomenon, which affects the user experience. As the capacity of the database increases, the jamming problem of users when accessing becomes more and more serious, which affects the efficiency and flexibility of maintenance help function requests. To solve the above problems, an embodiment of the present application provides a data processing method, an apparatus and related equipment, which are applied to a server, wherein the server includes a relational database and a non-relational database, and the data stored in the relational database is synchronized with the data stored in the non-relational database. The method includes: obtaining a query instruction, wherein the query instruction carries a data type and a first key value of the data to be queried; in the relational database, determining a target value according to the first data type and the first key value; determining a target index corresponding to the target value; the non-relational database includes multiple indexes, each index corresponds to one data; the target index is one of the multiple indexes; and querying the non-relational database for the target data corresponding to the target index, thereby improving the efficiency and flexibility of requesting a maintenance help function.

[0040] Combine the following Figure 1 A system architecture for processing maintenance help request data in an embodiment of the present application is described. Figure 1 1 is an architecture diagram of a maintenance help data processing system provided in an embodiment of the present application. The maintenance help data processing system 100 includes a database module 110 , a maintenance help module 120 , and a terminal module 130 , wherein the database module 110 includes a MySQL database 111 and a MongoDB database 112 .

[0041] Among them, MySQL database 111 is used to store maintenance help data, which includes user basic data, technician information, key data of maintenance cases, etc., wherein user basic data can be user's personal information, login credentials, etc., which are not limited here. MongoDB database 112 is mainly used to store technician's maintenance cases, user behavior logs and other document data, etc., which are not limited here. Unlike MySQL database 111, MongoDB database 112 adopts a flexible document model (such as BSON format), which can directly store complex nested data structures and unstructured data, such as multi-level titles, pictures, videos and other multimedia content in maintenance cases. In addition, the high scalability and distributed architecture characteristics of MongoDB database 112 enable it to effectively respond to the needs of maintenance help functions with high request volumes, as well as optimize data storage functions. When a technician logs in to use the maintenance help function, the maintenance help data processing system 100 reads basic data from MySQL database 111, and synchronously stores the maintenance help data in MongoDB database 112 to ensure redundant backup and fast access to data. Then, by using associated fields such as "technician_id", MongoDB database 112 can efficiently establish the relationship between user documents and maintenance case documents. The maintenance help data processing system 100 can quickly retrieve all maintenance cases posted by a technician through "technician_id", or analyze their preferences based on user behavior logs. In addition, during the operation of the maintenance help data processing system 100, MongoDB database 112 also includes the function of optimizing data storage. For example, the maintenance help data processing system 100 will regularly clean up zombie user data to reduce the storage resource occupation of invalid data. By migrating historical data from MySQL database 111 to MongoDB database 112, the load of MySQL database 111 can be effectively reduced, and long-term archiving and efficient management of data can be achieved.

[0042] Among them, the maintenance help module 120 is used to achieve maintenance demand docking between users and technicians, data storage and synchronization, and efficient management of maintenance cases. The core functions of this module include: structured storage of maintenance help data, establishment of association between users and technicians, implementation of data synchronization mechanism, and performance optimization in high-concurrency scenarios, etc., which are not limited here.

[0043] Specifically, the maintenance help module 120 effectively matches the maintenance requirements submitted by the user with the maintenance cases of the technician by constructing the structure and association relationship of the maintenance help data. For example, the maintenance request document submitted by the user may contain fields such as fault description, vehicle information, contact information, etc., while the maintenance case document of the technician contains multimedia content such as fault solution, maintenance steps, related pictures or videos. Through the association fields such as "technician_id", the module can logically associate the user document with the technician document, so as to achieve accurate matching and efficient retrieval of maintenance requirements. The maintenance help module 120 uses the MySQL database 111 to store structured data (such as user basic information, technician information, etc.), and stores the unstructured maintenance case data in the MongoDB database 112. When the user submits a maintenance request or the technician publishes a maintenance case, the maintenance help module 120 will trigger the data synchronization mechanism to synchronize the basic data in the MySQL database 111 to the MongoDB database 112 to ensure the consistency and availability of the data. In addition, the maintenance help module 120 also supports the archiving and cleaning of historical data, and regularly migrates "old" data from the MySQL database 111 to the MongoDB database 112, thereby reducing the storage pressure of the MySQL database 111 and optimizing system performance. In addition, the maintenance help module 120 also implements a cache mechanism to cache frequently accessed maintenance case data in memory to further improve data retrieval speed and system response efficiency. At the same time, the maintenance help module 120 module further optimizes the data storage structure and reduces the occupation of system resources by redundant data by regularly cleaning up zombie user data and invalid maintenance requests.

[0044] The terminal module 130 is used to realize data interaction, dynamic data management, and efficient data query and update operations between users and technicians in the maintenance help function. The terminal module 130 provides a flexible and efficient operation interface for users and technicians by integrating data query, data addition, and data modification functions, supporting the comprehensive realization and optimization of the maintenance help function.

[0045] Specifically, in terms of data query, the terminal module 130 can quickly retrieve the maintenance help data related to the user or technician through the document model and index mechanism of the MongoDB database 112. For example, when the technician logs in to the system, the module will quickly locate and return all the maintenance case documents published by the technician according to the "technician_id" field, thereby avoiding frequent form requests and complex data association queries. In terms of data addition, the terminal module 130 supports dynamic entry of new data, including maintenance requests submitted by users, maintenance cases of technicians, user comments and ratings, etc. Due to the flexible document structure of the MongoDB database 112, the terminal module 130 can directly add new fields or data types without modifying the database structured rule definition. For example, when the maintenance help function needs to add a new scoring function, the terminal module 130 can directly add a scoring field in the H5 page and store the relevant data in the MongoDB database 112, without the need for synchronous development of the server and the front end, which greatly simplifies the process of function expansion and provides convenience for subsequent data analysis and processing. In terms of data modification, the terminal module 130 allows users and technicians to update and modify the submitted data. For example, a technician can modify a fault solution in a maintenance case or add a new maintenance step, while a user can update a fault description or contact information in a maintenance request. The module ensures the accuracy and consistency of data modification through the atomic operation and version control mechanism of the MongoDB database 112, while avoiding data conflicts and loss problems.

[0046] It can be seen that through the architecture of the above-mentioned maintenance help data processing system, it is possible to achieve high efficiency and flexibility when making maintenance requests. The MySQL database 111 is used to store structured data (such as user information and technician basic data) to ensure the transactionality and consistency of the data; the MongoDB database 112 is used to store unstructured maintenance cases and user behavior data, giving full play to the flexibility and high concurrent processing capabilities of its document model. The maintenance help module 120 achieves accurate matching, efficient retrieval and dynamic synchronization of data through the collaborative work of dual databases, while supporting the archiving and cleaning of historical data and optimizing storage resources. The terminal module 130 provides users and technicians with convenient data query, addition and modification functions. Through the flexible document structure of the MongoDB database 112, it simplifies the function expansion process and improves the system's response speed and user experience. The overall architecture not only reduces the load pressure of the database, but also improves the performance and maintainability of the system, providing solid technical support for the efficient operation of the maintenance help function.

[0047] Combine the following Figure 2 The server in the embodiment of the present application is described. Figure 2 is a schematic diagram of the structure of a server provided in an embodiment of the present application, such as Figure 2 As shown, the server 200 includes one or more processors 210, a memory 220, a communication interface 230, and one or more programs 221. The processor 210 is communicatively connected with the memory 220 and the communication interface 230 via an internal communication bus.

[0048] Among them, the processor 210 can be, for example, a central processing unit (CPU), a general processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logic blocks, units and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication unit can be a communication interface, a transceiver, a transceiver circuit, etc., and the storage unit can be a memory.

[0049] The memory 220 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. The nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0050] The one or more programs 221 are stored in the memory 220 and are configured to be executed by the processor 210. The one or more programs 221 include instructions for executing any step in the following data processing method embodiment.

[0051] It is understandable that the server 200 may include more or fewer structural elements than those in the above structural block diagram, for example, including a power module, physical buttons, a Wi-Fi module, a speaker, a Bluetooth module, a sensor, a display module, etc., which are not limited here. It is understandable that the server may be equipped with Figure 1 The system architecture described.

[0052] After understanding the software and hardware architecture of this application, Figure 3 A data processing method in an embodiment of the present application is described. Figure 3The present invention provides a flow chart of a data processing method provided by an embodiment of the present invention. A data processing method is applied to a server, the server includes a relational database and a non-relational database, the data stored in the relational database and the data stored in the non-relational database are synchronized with each other, and the method specifically includes the following steps:

[0053] Step S310: Obtain a query instruction, where the query instruction carries the data type of data to be queried and a first key value.

[0054] The query instruction is a request initiated by the user to retrieve specific data. It can be a structured request for querying the database. The query instruction can be a structured query language (SQL) or a parameter of an interface call, which is not limited here. The purpose of the query instruction is to "tell" the database system what data to query and how to query the data.

[0055] Among them, through the data type and the first key value, the database management system can quickly locate the storage area or collection where the target data is located. Through the first key value and additional conditions, the database management system can narrow the query scope, avoid full table scanning or full collection traversal, and thus improve query efficiency.

[0056] Specifically, the query instruction is a query instruction for a relational database, and first receives a query request from a user. The query request can be transmitted in a variety of ways. For example, in a Web application, the query request is usually sent in the form of an HTTP GET or POST request, and the request parameter includes the data type and the first key value; in a MySQL database management system, the query request may be submitted in the form of an SQL statement, such as SELECT*FROM users WHERE id=1, where id=1 is the first key value, which is not limited here. After receiving the query request, the database management system parses the query instruction to extract the data type and the first key value, and converts it into a format that can be understood by the system. For example: if the query instruction is an HTTP request in JSON format, the database management system parses the JSON object and extracts the data_type and key_value fields; if the query instruction is an SQL statement, the system needs to parse the SQL syntax and extract the table name (data type) and the key-value pair (first key value) in the WHERE condition. Finally, the database management system verifies the data type and the first key value to ensure their legality and validity.

[0057] Step S320: In the relational database, determine a target value according to the first data type and the first key value.

[0058] Among them, the first data type is used to clarify the table where the target query data is located (data in relational databases are stored in the form of tables), so that the database can quickly locate the target table when querying, thereby narrowing the query scope. The first data type is usually closely related to business logic. For example, in a repair help data processing system, the tables that may be involved include user tables (user), technician tables (technician), repair case tables (repair_case), etc. Through the definition of the first data type, the relational database can determine the specific table that needs to be queried, avoiding unnecessary scanning across the entire database, thereby significantly improving query efficiency.

[0059] Among them, the first key value is the key field used to identify or filter the target record. In a relational database, the first key value is usually the primary key (Primary Key) or the unique index field (Unique Index). The primary key is the field that uniquely identifies a record in the table. It is unique and non-empty. For example, in the user table, the user_id field is usually defined as the primary key to uniquely identify each user. The unique index field is used to ensure that the value of a field is unique in the table. For example, in the technician table, the technician_id field can be used as a unique index field to quickly find the information of a specific technician.

[0060] Specifically, when querying for maintenance help, first, determine the target table to be queried based on the first data type in the user request. For example, when a user queries a technician's maintenance case, the first data type is repair_case, and the system will locate the repair_case table. Next, the system performs a precise query in the target table based on the first key value (such as technician_id). For example, if the user queries the maintenance case with a technician ID of 123, all records with technician_id = 123 are searched in the repair_case table. Because the technician_id field is indexed, the database management engine can quickly locate the relevant records without scanning the entire table. In addition, in order to improve query efficiency, query performance can also be optimized by combining composite indexes (CompositeIndex) or multi-column indexes (Multi-Column Index). For example, in the repair_case table, a composite index consisting of the technician_id and case_status fields can be created to support joint queries based on technician ID and case status.

[0061] In a possible embodiment, determining the target value according to the first data type and the first key value specifically includes the following steps:

[0062] 21. Obtain a field corresponding to the first key value from the relational database to obtain a target field;

[0063] 22. Process the target field based on the first data type to obtain a target data set;

[0064] 23. Determine the target value according to the first operator, the first data type and the target data set.

[0065] Among them, the first key value is the key identifier of the query, which usually corresponds to the primary key or unique index field in the database table. For example, if the first key value is technician_id, the maintenance help system will obtain the fields corresponding to the key value (such as name, technical level, etc.) from the technician table. In addition, the target field is also related to the data type and storage format of the field to ensure the accuracy of subsequent processing. For example, if the target field is of date type, it is necessary to ensure that its format is consistent with the query condition to avoid query failure due to format mismatch.

[0066] The first data type is used to specify the target table and its field structure for the query. The database will filter, sort, or aggregate the target field based on the first data type to generate a data set that meets the query conditions. For example, if a user queries a technician's repair case, the system will filter all records whose technician_id matches the first key value from the repair_case table, and arrange them by release time to generate a target data set (such as the technician's name, contact information, etc.).

[0067] In a possible embodiment, determining the target value according to the first operator, the first data type, and the target data set specifically includes the following steps:

[0068] 231. Determine a subset associated with the first operator in the target data set to obtain a plurality of associated subsets;

[0069] 232. Perform an operation on the associated subset based on the first operator to obtain a first operation result;

[0070] 233. Determine the target value according to the first data type and the first operation result.

[0071] Among them, the first operator is used to define the logical relationship of the query condition, such as equal to (=), greater than (>), less than (<), fuzzy match (LIKE) or range query (BETWEEN), etc., which are not limited here. The target data set is filtered according to the first operator to generate multiple associated subsets. For example, in the repair help system, if the first operator is =, and the first key value is technician_id=123, all records with technician_id equal to 123 will be filtered out from the target data set (such as the repair_case table) to generate an associated subset. If the first operator is BETWEEN, and the query condition is publish_date BETWEEN'2023-01-01'AND'2023-12-31', the system will filter out all records with a publishing time within 2023 to generate another associated subset. In addition, the first operator is not only used to filter data, but also can be used to aggregate, sort or calculate data. For example, in a maintenance help system, if the first operator is COUNT, the system will count the records in the associated subset to obtain the total number of maintenance cases; if the first operator is SUM, the system will sum a numeric field (such as repair_cost) in the associated subset to obtain the total maintenance cost.

[0072] Specifically, the first data type is used to clarify the format and purpose of the target value. For example, in a maintenance help system, if the first data type is statistics, the target value may be a statistical result (such as the total number of cases, average score, etc.). The first operation result is formatted according to the first data type to generate a target value that meets business needs. If the first operation result is the total number of maintenance cases for a technician, the system will combine the value with the technician's basic information (such as name, skill level, etc.) to generate a structured target value. In addition, the maintenance help data processing system also considers the consistency and integrity of the data. For example, before generating the target value, the system will check whether the first operation result contains null values ​​or abnormal values, and perform corresponding processing (such as filling in default values ​​or throwing exceptions) to ensure the accuracy and reliability of the target value.

[0073] Step S330, determining the target index corresponding to the target value; the non-relational database includes multiple indexes, each index corresponds to one data; the target index is one index among the multiple indexes.

[0074] The determination of the target index depends on the characteristics of the target value and the query requirements. In non-relational databases, indexes can be in various forms such as single-field indexes, composite indexes, or multi-key indexes. For example, in a maintenance help data processing system, if the target value is a technician's maintenance case, the system may create a single-field index based on the technician_id field to quickly locate all documents related to the technician; if the query requirements involve multiple fields (such as technician_id and publish_date), the system may create a composite index to support multi-condition queries.

[0075] When writing data, the system will automatically or manually create indexes for the target fields to speed up subsequent query operations. For example, in the maintenance help system, when a technician publishes a new maintenance case, the system will create indexes for the technician_id and publish_date fields so that relevant documents can be quickly located when the user queries. In addition, the system also needs to regularly optimize and maintain the index, such as deleting unused indexes or rebuilding fragmented indexes, to maintain the efficiency of the index.

[0076] In a possible embodiment, determining the target index corresponding to the target value specifically includes the following steps:

[0077] 31. Determine a target identifier according to the target value in the non-relational database;

[0078] 32. Perform a query in the non-relational database according to the target identifier to obtain additional data associated with the target identifier, wherein the additional data is pre-stored in the non-relational database and the additional data is not stored in the relational database;

[0079] 33. Determine the target index according to the target identifier and the additional data.

[0080] The target identifier is usually a unique identifier directly associated with the target value. For example, in a maintenance help system, if the target value is a technician's maintenance case, the target identifier may be technician_id or case_id. Non-relational databases extract target identifiers based on the characteristics of the target value and query requirements. For example, if the target value is the name of a technician, the corresponding technician_id will be queried in the technician collection based on the name, and then the technician_id will be used as the target identifier.

[0081] Among them, additional data refers to extended information associated with the target identifier but not stored in the relational database. For example, in a maintenance help system, additional data may include detailed descriptions of maintenance cases, pictures, videos, or other multimedia content. These data are usually stored in non-relational databases in the form of documents to support flexible data structures and efficient query operations. The maintenance help data processing system will query the non-relational database based on the target identifier to obtain the additional data associated with the target identifier.

[0082] Specifically, the target index is a logical structure used to quickly locate the target data, which is usually created based on the characteristics of the target identifier and the additional data. For example, in the maintenance help system, if the target identifier is technician_id, and the additional data includes publish_date and rating fields, the maintenance help data processing system will create a composite index (such as technician_id_1_publish_date_1) to support efficient query based on technician ID and publication time. In practical applications, the determination of the target index also needs to consider the query mode and data volume. For example, in a high-concurrency scenario, the system can store index data on multiple nodes through a distributed indexing strategy to improve query performance and system scalability. At the same time, in order to prevent the index data from being outdated or invalid, the system needs to update and maintain the index regularly. For example, when the additional data changes, the system will automatically or manually update the relevant index to ensure the accuracy and real-time performance of the index. In addition, the system can also combine a caching mechanism (such as Redis) to cache the index data of high-frequency queries into memory, thereby reducing direct access to non-relational databases and further improving system performance.

[0083] Step S340: query the non-relational database for target data corresponding to the target index.

[0084] Among them, the target index is a logical structure used to quickly locate the target data, which is usually created based on the characteristics of the target identifier and additional data. To give an example, in the maintenance help system, the target index is technician_id_1_publish_date_1. First, the relevant documents are located according to technician_id, and then the qualified documents are filtered out according to publish_date. This process achieves efficient retrieval through index scanning of non-relational databases, avoiding full collection scanning, thereby significantly improving query performance. In addition, the system can also combine the query optimizer to select the optimal query path, such as using a covered index to directly return the data in the index without accessing the original document, thereby further reducing query time and resource consumption.

[0085] Among them, non-relational databases support flexible document models, and the target data can contain various types of information, such as text, numbers, dates, pictures, videos, etc., which are not limited here. In the maintenance help data processing system, the target data may include the title, content, release time, technician information, and user rating of the maintenance case. When querying, the target data is filtered, sorted, or aggregated according to the query requirements to generate query results that meet user needs.

[0086] Specifically, first, query the non-relational database according to the target index to locate relevant documents. For example, if the target index is technician_id_1_publish_date_1, first locate the relevant documents according to technician_id, and then filter out the qualified documents according to publish_date. Next, the maintenance help data processing system formats the query results to generate target data that meets business needs. For example, if a user queries a technician's maintenance case, the system will return the case's title, content, release time, technician information, and user rating fields. Finally, the maintenance help data processing system verifies the consistency and integrity of the data. For example, before returning the target data, the system will check whether the data contains null values ​​or abnormal values, and perform corresponding processing (such as filling in default values ​​or throwing exceptions) to ensure the accuracy and reliability of the query results.

[0087] With the above Figure 3 For details on the embodiments shown in the drawings, please refer to Figure 4 , Figure 4 : is a flow chart of another data processing method provided in an embodiment of the present application, which is applied to a server. The specific steps of the data processing method include:

[0088] A1. Obtain data modification instructions, which include: data deletion instructions, data update instructions, and data addition instructions;

[0089] A2. When the data modification instruction is the data deletion instruction, extract the first field of the content to be deleted in the data deletion instruction;

[0090] A3. Determine a first document corresponding to the non-relational database according to the first field;

[0091] A4. Delete the first document to obtain a first non-relational database;

[0092] A5. Based on a preset mapping rule, the data in the first non-relational database is copied to the relational database to obtain a first relational database; the first non-relational database and the first relational database are synchronized to perform data association, and the stored data are consistent;

[0093] A6. When the data modification instruction is the data addition instruction, storing the data associated with the data addition instruction in the non-relational database to obtain a second non-relational database;

[0094] A7. Based on the preset mapping rule, the data in the second non-relational database is copied to the relational database to obtain a second relational database; the second non-relational database and the second relational database are synchronized to perform data association, and the stored data are consistent;

[0095] A8. When the second data instruction is the data update instruction, determining a second field corresponding to the update of the data update instruction;

[0096] A9. Determine a corresponding second document in the non-relational database according to the second field;

[0097] A10. Update the second document to the data associated with the data update instruction to obtain a third non-relational database;

[0098] A11. Based on the preset mapping rule, the data in the third non-relational database is copied to the relational database to obtain a third relational database; the third non-relational database and the third relational database are associated with each other through synchronization, and the stored data are consistent.

[0099] Among them, data deletion instructions are usually used to clean up invalid or outdated data, such as deleting a technician's zombie account or expired repair cases in a repair help data processing system. First, extract the first field in the data deletion instruction (such as technician_id or case_id), and locate the corresponding first document in the non-relational database based on the field (such as a record in the technician collection or a case in the repair_case collection). Then, delete the document and synchronize the updated non-relational database to the relational database to ensure data consistency. This process implements data consistency maintenance through transaction mechanisms and synchronization strategies to avoid data inconsistency problems.

[0100] The data addition instruction is used to add new data to the system, for example, in the repair help data processing system, a new repair case of a technician or a repair request submitted by a user is added. First, the new data is stored in a non-relational database, for example, a repair case document is inserted into the repair_case collection, and then the new data is synchronized to the relational database, for example, the basic information of the case (such as case_id, title, content, etc.) is inserted into the repair_case table to realize the addition of data.

[0101] Among them, the data update instruction is used to modify the existing data in the system, for example, in the maintenance help system, update the contact information of a technician or modify the content of a maintenance case. First, determine the second field that needs to be updated in the data update instruction (such as email or content), and locate the corresponding second document in the non-relational database based on the field (such as a record in the technician collection or a case in the repair_case collection). Then, the system updates the second document to the data associated with the data update instruction, and synchronizes the updated non-relational database to the relational database. For example, if the content of the maintenance case with case_id=101 is updated, the maintenance help data processing system will synchronously update the corresponding record in the repair_case table of the relational database.

[0102] In a possible embodiment, the method further includes the following steps:

[0103] B1. Determine a first keyword, a first identifier, and a first operator according to the query instruction;

[0104] B2. Determine the data type corresponding to the first keyword to obtain the first data type;

[0105] B3. Analyze the first identifier and the first keyword based on the first operator to obtain the first key value.

[0106] Among them, the query instruction is usually input by the user or generated by the system, and contains information such as query conditions, target fields and operation logic. The first keyword is the core content of the query instruction. The first keyword can be "maintenance case" or "technician information". The first identifier is a unique identifier used to locate the target data, such as technician_id or case_id. The first operator is used to define the logical relationship of the query condition, such as equal to (=), greater than (>), less than (<) or fuzzy match (LIKE). The maintenance help data processing system extracts the first keyword, the first identifier and the first operator by parsing the query instruction, providing a basis for subsequent data retrieval.

[0107] The first data type is used to clarify the data structure and storage location of the query target. For example, in a maintenance help system, the first data type may be repair_case or technician. The first data type is determined based on the characteristics of the first keyword and the business logic. For example, if the first keyword is "maintenance case", the maintenance help data processing system will determine that the first data type is repair_case and locate the repair_case collection in the non-relational database.

[0108] The first key value is a key field used to locate the target record, and is usually used in combination with the first identifier and the first operator. In a maintenance help system, if the first identifier is technician_id, the first operator is =, and the first keyword is "123", the system will generate a first key value of technician_id=123, which will be used to locate the target document in the non-relational database.

[0109] In a possible embodiment, the first operator includes one of the following: a comparison operator, a logical operator, or an arithmetic operator, and the analyzing the first identifier and the first keyword based on the first operator to obtain the first key value specifically includes the following steps:

[0110] B31. When the first operator is the comparison operator, determine the field value corresponding to the first keyword to obtain a first field value, and determine the first key value according to the first field value and the first keyword;

[0111] B32. When the first operator is the logical operator, the first keyword and the first identifier are operated based on the logical operator to obtain the first key value; the logical operator is a logical operation of AND, OR, or NOT;

[0112] B33. When the first operator is the arithmetic operator, determine a keyword corresponding to the first keyword according to the first identifier to obtain a plurality of keywords;

[0113] B34. Calculate the multiple keywords based on the operation operator to obtain a second value, and associate the second value with the first keyword to obtain the first key value.

[0114] Among them, the comparison operator is used to compare field values ​​and keywords, such as equal to (=), greater than (>), less than (<) or range query (BETWEEN), etc. The system first determines the field value corresponding to the first keyword (such as technician_id or publish_date), and generates the first key value according to the comparison operator. For example, if the first keyword is "123", the first identifier is technician_id, and the comparison operator is =, the system will generate the first key value technician_id = 123; if the comparison operator is BETWEEN, and the first keyword is "2023-01-01" and "2023-12-31", the system will generate the first key value publish_date BETWEEN'2023-01-01'AND'2023-12-31'.

[0115] The logical operator is used to perform logical operations on multiple conditions, such as AND, OR, NOT, etc. The system will combine the first keyword and the first identifier according to the logical operator to generate a complex first key value. For example, if the first keyword is "123" and "2023", the first identifier is technician_id and publish_date, and the logical operator is AND, the system will generate the first key value as technician_id=123AND publish_dateBETWEEN'2023-01-01'AND'2023-12-31'.

[0116] Among them, arithmetic operators are used to calculate numerical fields, such as addition (+), subtraction (-), multiplication (*), division ( / ), etc. The system first determines the keyword corresponding to the first keyword (such as repair_cost or rating) based on the first identifier, and extracts the values ​​of multiple keywords. Then, the system calculates these keywords based on the arithmetic operator to generate a second value. For example, if the first keyword is "average rating", the first identifier is rating, and the arithmetic operator is AVG, the system will calculate the average of all rating fields, and associate this value with the first keyword, generating a first key value of AVG (rating).

[0117] Specifically, in the maintenance help data processing system, first, the first operator, the first keyword and the first identifier are parsed according to the query instruction, then, the first key value is generated according to the type of the first operator, and finally, the system uses the generated first key value for data retrieval to locate the target document from the non-relational database.

[0118] It can be seen that in data deletion, addition and update operations, non-relational databases give priority to flexible document operations, and relational databases are updated synchronously through preset mapping rules to ensure transactional and structured data integrity. For example, when deleting a zombie account, the non-relational database quickly locates and deletes the document, and the relational database simultaneously removes the corresponding record to avoid the accumulation of redundant data; when adding or modifying data, the dynamic expansion capability of the non-relational database supports the efficient storage of complex data (such as multimedia attachments), and the relational database ensures the transaction security of basic data through precise mapping. Through version control and transaction mechanisms, the system takes into account both response speed and data reliability in high-concurrency scenarios, and ultimately achieves the stability and scalability of the maintenance assistance function, significantly improving data processing efficiency and user experience.

[0119] For easier understanding, see Figure 5 , Figure 5This is a maintenance help function application scenario diagram provided by the embodiment of the present application. Through the collaborative work of the user end, the technician end and the system backend, efficient docking and data management of maintenance needs are achieved. The maintenance help data processing system adopts a dual database (MySQL and MongoDB) architecture, combined with data synchronization and caching mechanisms, taking into account both transaction processing of structured data and flexible storage of unstructured data, significantly improving the performance and scalability of the system.

[0120] The user side and the technician side are the interactive entrances, respectively, and the differentiated design of functions is realized through the mobile side or the web side. The user side supports users to submit maintenance requests (including fields such as fault description and vehicle information), view the request processing status in real time, browse the technician's maintenance cases and solutions, and rate and comment on the services. The technician side provides technicians with the functions of viewing user requests, publishing or modifying maintenance cases (including multimedia content such as pictures, texts, videos, etc.), and receiving user feedback, forming a complete service closed loop.

[0121] The backend uses the MySQL database to manage highly transactional structured data, such as basic user data (user ID, name, contact information) and technician basic data (technician ID, skill level, etc.), to ensure data consistency and complex query efficiency. The MongoDB database focuses on the storage of unstructured data, including maintenance cases (case ID, title, content, multimedia attachments) and user behavior data (ratings, comments, access logs). The flexibility of its document model supports dynamic field expansion and high concurrent access.

[0122] Among them, the data synchronization module is responsible for achieving data consistency between the two databases. For example, when a user or technician logs in, the system synchronizes the basic data in MySQL (such as user ID, technician ID) to MongoDB in real time to support related queries of subsequent documents. In addition, the module regularly cleans up zombie user data and optimizes storage resources. The cache module caches frequently accessed maintenance case data in memory (such as Redis), reducing direct access to the database and further improving response speed.

[0123] Specifically, the maintenance request submitted by the user is first stored in MySQL and written to MongoDB through a synchronization mechanism to ensure redundant data backup. After the technician logs in, he can quickly retrieve and publish the maintenance case based on MongoDB. The user can view the case details in real time through document association (such as technician_id). User ratings and comments are directly written to MongoDB to form feedback. In addition, the maintenance request data processing system maintains the efficient operation of the database by regularly cleaning up invalid data (such as expired cases) and optimizing index strategies.

[0124] See also Figure 6 , Figure 6 This is an application scenario diagram of a data processing method provided in an embodiment of the present application. The data processing method realizes efficient docking and data management of maintenance needs through the architecture of the user end, the technician end and the system backend.

[0125] The user side supports functions such as user case query and case details, and the technician side supports functions such as querying comments and filtering release time. The server manages highly transactional structured data through the MySQL database, such as user permission verification, user basic data (user ID, name, contact information) and technician basic data (technician ID, skill level, etc.), ensuring data consistency and complex query efficiency.

[0126] Among them, the MongoDB database focuses on the storage and query of unstructured data, including maintenance cases (case ID, title, content, multimedia attachments) and user behavior data (ratings, comments, access logs). For example, there is no need to modify the table structure when adding a "maintenance tool list" or "fault video" field. MongoDB achieves horizontal expansion through sharding technology, distributing data to multiple nodes to cope with high concurrency scenarios. For example, when users access popular maintenance cases concurrently, the system distributes requests to different shards through hash sharding keys (such as case_id) to avoid excessive load on a single node. In addition, MongoDB's aggregation framework (Aggregation Pipeline) supports multi-stage data processing. For example, when counting the case scores of a technician, the system uses $match to filter records and $group to calculate the average value, and finally generates real-time statistical results.

[0127] Among them, the data synchronization module achieves real-time consistency of dual databases through event-driven architecture. The system uses MySQL's binary log (Binlog) to capture data change events (such as insert, update, and delete), and asynchronously pushes events to the MongoDB synchronization service through a message queue (such as Kafka). For example, when a user updates contact information, MySQL generates a Binlog event, and the synchronization service parses the event and converts it into a MongoDB document operation instruction (such as updateOne) to ensure that data changes are synchronized within 200ms. For conflict scenarios (such as modifying the same data in two databases at the same time), the system uses an optimistic locking mechanism to achieve conflict detection and automatic rollback through version number (version field) comparison.

[0128] The cache module uses Redis as the in-memory database and manages high-frequency data through the LRU (least recently used) elimination strategy. When a user first accesses a popular case, the complete document (including text and graphics) is cached in Redis to avoid cache pressure.

[0129] Specifically, the repair request submitted by the user first passes through the API gateway for identity authentication and current limiting, and then is written to the MySQL repair_request table, and triggers the Binlog event to be synchronized to the MongoDB repair_case collection. After the technician logs in, he quickly retrieves pending requests based on MongoDB's technician_id index, and updates the case status through transaction locks. User ratings and comments are written to MongoDB through asynchronous message queues to ensure write throughput in high-concurrency scenarios. The system cleans up expired cases and zombie accounts through scheduled tasks (such as early morning every day), and automatically deletes overdue logs in combination with MongoDB's TTL index to maintain storage efficiency.

[0130] See also Figure 7 , Figure 7 This is a schematic diagram of an application scenario of another data processing method provided in an embodiment of the present application. This scenario focuses on the real-time data synchronization and consistency assurance mechanism between dual databases (MySQL and MongoDB). Through event-driven architecture and transaction management strategies, it ensures efficient collaboration of structured and unstructured data, thereby supporting the stability and scalability of the maintenance help data processing system.

[0131] Among them, the data synchronization module is responsible for monitoring database change events and realizing two-way data conversion. For example, when a user submits a maintenance request through a mobile terminal, the data is first written to the repair_request table of MySQL. The synchronization module captures the insertion event by parsing the binary log (Binlog) of MySQL, converts it into the document format of MongoDB (such as JSON), and writes it to the repair_case collection. Conversely, when the technician updates the case content in MongoDB, the system monitors the document change event through ChangeStream, extracts key fields (such as case_id, status) and writes them back to the repair_case table of MySQL. This two-way synchronization mechanism eliminates data silos and ensures real-time consistency of dual database data.

[0132] Specifically, MySQL records data changes through Binlog, MongoDB listens to document operations through Change Stream, and event data is encapsulated into standardized messages (such as Avro format) and transmitted asynchronously through message queues (such as Kafka) to avoid synchronous blocking of the main business thread. Then, structured data (such as MySQL table records) and unstructured data (such as MongoDB documents) are converted bidirectionally. For example, the case_id and title fields in MySQL's repair_request table are mapped to the root nodes of MongoDB documents, while multimedia attachments (such as image URLs) are stored as nested objects. The atomicity of cross-database operations is ensured by a distributed transaction manager (such as Seata). For example, when a deletion operation involves two databases, the transaction manager coordinates MySQL's DELETE and MongoDB's deleteOne commands. If any operation fails, a global rollback is triggered to prevent data inconsistency. In one possible embodiment, in terms of user submission of requests, first, data is written to MySQL and a Binlog event is generated. Then, the synchronization service parses the event, extracts fields such as case_id and fault_description, constructs a MongoDB document and inserts it into the repair_case collection, and uploads the picture attachment to the object storage. Finally, a document storage attachment URL is generated. In terms of technicians updating case content, first, the technician modifies the repair steps of the case in MongoDB, and Change Stream captures the update event. Then, the case_id and steps fields are extracted, and the corresponding records in the repair_case table of MySQL are updated. If the MySQL update fails (such as a primary key conflict), the transaction manager rolls back the MongoDB operation and notifies the technician to resubmit. In terms of zombie data cleaning, cases that have not been updated for more than 6 months in MySQL will be scanned regularly, records will be deleted and synchronization events will be triggered, and the corresponding documents in MongoDB will be automatically expired and deleted through the TTL index to release storage resources.

[0133] It can be seen that through the above-mentioned data processing method, efficient collaboration between relational and non-relational databases can be achieved, significantly improving the data processing capabilities of the maintenance assistance function. On the one hand, relational databases support the precise positioning of basic data (such as user / technician information) through transactional guarantees and structured queries to ensure data consistency; on the other hand, non-relational databases use flexible document models and indexing mechanisms to quickly retrieve complex data (such as maintenance cases, user behaviors) to cope with high-concurrency scenarios. The dual databases achieve smooth data switching through a dynamic synchronization strategy, which not only retains the transactional advantages of relational databases, but also gives full play to the scalability of non-relational databases. This ensures data integrity while comprehensively improving system response speed and resource utilization, ultimately achieving efficient and stable maintenance assistance service support, thereby improving the efficiency and flexibility of maintenance assistance function requests.

[0134] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that, in order to realize the above functions, the server includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0135] The embodiment of the present application can divide the server into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.

[0136] In the case of dividing each functional module into corresponding functional modules, Figure 8 1 is a functional module composition block diagram of a data processing device provided in an embodiment of the present application. The data processing device 800 is applied to a server. The server includes a relational database and a non-relational database. The data stored in the relational database and the data stored in the non-relational database are synchronized with each other. The data processing device 800 includes:

[0137] An acquisition unit 810 is used to acquire a query instruction, where the query instruction carries a data type and a first key value of the data to be queried;

[0138] A control unit 820 is configured to determine a target value in the relational database according to the first data type and the first key value;

[0139] The control unit 820 is further configured to determine a target index corresponding to the target value; the non-relational database includes a plurality of indexes, each index corresponding to a piece of data; the target index is one of the plurality of indexes;

[0140] The query unit 830 is used to query the non-relational database for target data corresponding to the target index.

[0141] In a possible embodiment, the control unit 820 is specifically configured to:

[0142] Obtaining data modification instructions, wherein the data modification instructions include: data deletion instructions, data update instructions, and data addition instructions;

[0143] When the data modification instruction is the data deletion instruction, extracting the first field of the content to be deleted in the data deletion instruction;

[0144] Determine a first document corresponding to the non-relational database according to the first field;

[0145] Deleting the first document to obtain a first non-relational database;

[0146] Based on a preset mapping rule, the data in the first non-relational database is copied to the relational database to obtain a first relational database; the first non-relational database and the first relational database are synchronized to perform data association, and the stored data are consistent;

[0147] When the data modification instruction is the data adding instruction, storing the data associated with the data adding instruction in the non-relational database to obtain a second non-relational database;

[0148] Based on the preset mapping rule, the data in the second non-relational database is copied to the relational database to obtain a second relational database; the second non-relational database and the second relational database are synchronized to perform data association, and the stored data are consistent;

[0149] When the second data instruction is the data update instruction, determining a second field corresponding to the update of the data update instruction;

[0150] Determine a corresponding second document in the non-relational database according to the second field;

[0151] Updating the second document to the data associated with the data update instruction to obtain a third non-relational database;

[0152] Based on the preset mapping rule, the data in the third non-relational database is copied to the relational database to obtain a third relational database; the third non-relational database and the third relational database are synchronized to perform data association, and the stored data are consistent.

[0153] In a possible embodiment, the control unit 820 is further configured to:

[0154] Determine a first keyword, a first identifier, and a first operator according to the query instruction;

[0155] Determine the data type corresponding to the first keyword to obtain the first data type;

[0156] The first identifier and the first keyword are analyzed based on the first operator to obtain the first key value.

[0157] In a possible embodiment, the first operator includes one of the following: a comparison operator, a logical operator, or an arithmetic operator, and the control unit 820 analyzes the first identifier and the first keyword based on the first operator to obtain the first key value, specifically for:

[0158] When the first operator is the comparison operator, determining a field value corresponding to the first keyword to obtain a first field value, and determining the first key value according to the first field value and the first keyword;

[0159] When the first operator is the logical operator, the first keyword and the first identifier are operated based on the logical operator to obtain the first key value; the logical operator is a logical operation of AND, OR, and NOT;

[0160] When the first operator is the arithmetic operator, determining a keyword corresponding to the first keyword according to the first identifier to obtain a plurality of keywords;

[0161] The multiple keywords are calculated based on the operation operator to obtain a second value, and the second value is associated with the first keyword to obtain the first key value.

[0162] In a possible embodiment, the control unit 820 determines the target value according to the first data type and the first key value, specifically for:

[0163] Acquire the field corresponding to the first key value from the relational database to obtain a target field;

[0164] Processing the target field based on the first data type to obtain a target data set;

[0165] The target value is determined according to the first operator, the first data type, and the target data set.

[0166] In a possible embodiment, the control unit 820 determines the target value according to the first operator, the first data type and the target data set, specifically for:

[0167] Determine a subset associated with the first operator in the target data set to obtain a plurality of associated subsets;

[0168] Performing an operation on the associated subset based on the first operator to obtain a first operation result;

[0169] The target value is determined according to the first data type and the first operation result.

[0170] In a possible embodiment, the query unit 830, when determining the target index corresponding to the target value, is specifically configured to:

[0171] Determining a target identifier in the non-relational database according to the target value;

[0172] Performing a query in the non-relational database according to the target identifier to obtain additional data associated with the target identifier, wherein the additional data is pre-stored in the non-relational database and is not stored in the relational database;

[0173] The target index is determined according to the target identifier and the additional data.

[0174] It should be noted that the specific functional implementation of a data processing device 800 is shown in the above Figure 3 The description of the vehicle fault remote repair diagnosis method shown, for example, the acquisition unit 810 is used to implement the relevant content of executing S310, which will not be repeated. Each unit or module in a data processing device 800 can be separately or completely combined into one or several other units or modules to constitute, or one (some) of the units or modules can be further divided into multiple functionally smaller units or modules to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present invention. The above-mentioned units or modules are divided based on logical functions. In actual applications, the function of one unit (or module) is implemented by multiple units (or modules), or the functions of multiple units (or modules) are implemented by one unit (or module).

[0175] It can be seen that a data processing device described in the embodiment of the present application obtains a query instruction, wherein the query instruction carries the data type and the first key value of the data to be queried, determines the target value in the relational database according to the first data type and the first key value, then determines the target index corresponding to the target value, and the non-relational database includes multiple indexes, each index corresponds to one data, and the target index is one of the multiple indexes, and finally, queries the target data corresponding to the target index in the non-relational database. In this way, on the one hand, the server side of the server is optimized by the non-relational database, thereby improving the flexibility of the server in responding to maintenance assistance function requests; on the other hand, by smoothly switching between the relational data area and the non-relational database, the server data is quickly accessed, which improves the efficiency of the server in accessing data when responding to maintenance assistance function requests, thereby improving the efficiency of the server in responding to maintenance assistance function requests.

[0176] An embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps of any method recorded in the above method embodiments, and the above computer includes a server.

[0177] The present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps of any method described in the method embodiment. The computer program product may be a software installation package, and the computer includes a server.

[0178] It should be noted that, for the above-mentioned various embodiments, for the sake of simple description, they are all expressed as a series of action combinations. Those skilled in the art should be aware that the present application is not limited by the described order of actions, because some steps in the embodiments of the present application can be performed in other orders or simultaneously. In addition, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions, steps, modules or units involved are not necessarily required by the embodiments of the present application.

[0179] In the above embodiments, the embodiments of the present application have different focuses on the description of each embodiment. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0180] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

[0181] The steps of the method or algorithm described in the embodiments of the present application can be implemented in hardware or by executing software instructions by a processor. The software instructions can be composed of corresponding software modules, and the software modules can be stored in RAM, flash memory, ROM, EPROM, electrically erasable programmable read-only memory (electrically EPROM, EEPROM), registers, hard disks, mobile hard disks, read-only compact disks (CD-ROMs) or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a terminal device or a management device. Of course, the processor and the storage medium can also be present in a terminal device or a management device as discrete components.

[0182] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiments of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server, or data center to another website site, computer, server, or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital video disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0183] The modules / units included in the devices and products described in the above embodiments may be software modules / units or hardware modules / units, or may be partially software modules / units and partially hardware modules / units. For example, for the devices and products applied to or integrated in the chip, the modules / units included therein may all be implemented in the form of hardware such as circuits, or at least some of the modules / units may be implemented in the form of software programs, which run on the processor integrated inside the chip, and the remaining (if any) modules / units may be implemented in the form of hardware such as circuits; for the devices and products applied to or integrated in the chip module, the modules / units included therein may all be implemented in the form of hardware such as circuits, and different modules / units may be located in the same component (such as a chip, circuit module, etc.) or in different components of the chip module, or at least some of the modules / units may be implemented in the form of software programs. The software programs run on the processor integrated inside the chip, and the remaining (if any) modules / units may be implemented in the form of hardware such as circuits. It is implemented in the form of a software program, which runs on a processor integrated inside the chip module, and the remaining (if any) modules / units can be implemented in hardware such as circuits; for various devices and products applied to or integrated in the terminal equipment, the various modules / units contained therein can be implemented in hardware such as circuits, and different modules / units can be located in the same component (for example, chip, circuit module, etc.) or in different components in the terminal equipment, or, at least some modules / units can be implemented in the form of a software program, which runs on a processor integrated inside the terminal equipment, and the remaining (if any) modules / units can be implemented in hardware such as circuits.

[0184] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the embodiments of the present application. It should be understood that the above description is only the specific implementation method of the embodiments of the present application and is not intended to limit the protection scope of the embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the embodiments of the present application should be included in the protection scope of the embodiments of the present application.

Claims

1. A data processing method, characterized in that: Applied to a server, the server includes a relational database and a non-relational database, the data stored in the relational database and the data stored in the non-relational database are synchronized with each other, the method includes: Obtain a query instruction, wherein the query instruction carries the data type and the first key value of the data to be queried; In the relational database, determining a target value according to the first data type and the first key value; Determine a target index corresponding to the target value; the non-relational database includes multiple indexes, each index corresponds to one data; the target index is one of the multiple indexes; The target data corresponding to the target index is queried in the non-relational database.

2. The method according to claim 1, characterized in that The method further comprises: Acquire data modification instructions, wherein the data modification instructions include: data deletion instructions, data update instructions and data addition instructions; When the data modification instruction is the data deletion instruction, extracting the first field of the content to be deleted in the data deletion instruction; Determine a first document corresponding to the non-relational database according to the first field; Deleting the first document to obtain a first non-relational database; Based on a preset mapping rule, the data in the first non-relational database is copied to the relational database to obtain a first relational database; the first non-relational database and the first relational database are synchronized to perform data association, and the stored data are consistent; When the data modification instruction is the data adding instruction, storing the data associated with the data adding instruction in the non-relational database to obtain a second non-relational database; Based on the preset mapping rule, the data in the second non-relational database is copied to the relational database to obtain a second relational database; the second non-relational database and the second relational database are synchronized to perform data association, and the stored data are consistent; When the second data instruction is the data update instruction, determining a second field corresponding to the update of the data update instruction; Determine a corresponding second document in the non-relational database according to the second field; Updating the second document to the data associated with the data update instruction to obtain a third non-relational database; Based on the preset mapping rule, the data in the third non-relational database is copied to the relational database to obtain a third relational database; the third non-relational database and the third relational database are synchronized to perform data association, and the stored data are consistent.

3. The method according to claim 1, characterized in that The method further comprises: Determine a first keyword, a first identifier, and a first operator according to the query instruction; Determine the data type corresponding to the first keyword to obtain the first data type; The first identifier and the first keyword are analyzed based on the first operator to obtain the first key value.

4. The method according to claim 3, characterized in that The first operator includes one of the following: a comparison operator, a logical operator, or an arithmetic operator, and the analyzing the first identifier and the first keyword based on the first operator to obtain the first key value includes: When the first operator is the comparison operator, determining a field value corresponding to the first keyword to obtain a first field value, and determining the first key value according to the first field value and the first keyword; When the first operator is the logical operator, the first keyword and the first identifier are operated based on the logical operator to obtain the first key value; the logical operator is a logical operation of AND, OR, and NOT; When the first operator is the arithmetic operator, determining a keyword corresponding to the first keyword according to the first identifier to obtain a plurality of keywords; The multiple keywords are calculated based on the operation operator to obtain a second value, and the second value is associated with the first keyword to obtain the first key value.

5. The method according to any one of claims 1 to 4, characterized in that: The determining a target value according to the first data type and the first key value includes: Acquire the field corresponding to the first key value from the relational database to obtain a target field; Processing the target field based on the first data type to obtain a target data set; The target value is determined according to the first operator, the first data type, and the target data set.

6. The method according to claim 5, characterized in that The determining a target value according to the first operator, the first data type and the target data set includes: Determine a subset associated with the first operator in the target data set to obtain a plurality of associated subsets; Performing an operation on the associated subset based on the first operator to obtain a first operation result; The target value is determined according to the first data type and the first operation result.

7. The method according to any one of claims 1 to 3, characterized in that: The determining the target index corresponding to the target value includes: Determining a target identifier in the non-relational database according to the target value; Performing a query in the non-relational database according to the target identifier to obtain additional data associated with the target identifier, wherein the additional data is pre-stored in the non-relational database and is not stored in the relational database; The target index is determined according to the target identifier and the additional data.

8. A data processing device, characterized in that: The device is applied to a server, the server includes a relational database and a non-relational database, the data stored in the relational database and the data stored in the non-relational database are synchronized with each other, the device includes an acquisition unit, a control unit and a query unit, wherein: The acquisition unit is used to acquire a query instruction, where the query instruction carries the data type and the first key value of the data to be queried; The control unit is used to determine a target value in the relational database according to the first data type and the first key value; The control unit is further used to determine a target index corresponding to the target value; the non-relational database includes multiple indexes, each index corresponds to one data; the target index is one of the multiple indexes; The query unit is used to query the non-relational database for target data corresponding to the target index.

9. A server, characterized in that: include: A processor, a memory, a communication interface, and one or more programs; The one or more programs are stored in the memory and configured to be executed by the processor, the programs comprising instructions for executing the steps in the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Data bidirectional synchronization method based on MongoDB and computer program product

    CN121681686A