CN117131121A - Data processing method, device, computer equipment and storage medium - Google Patents

Data processing method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN117131121A
CN117131121A CN202311161311.1A CN202311161311A CN117131121A CN 117131121 A CN117131121 A CN 117131121A CN 202311161311 A CN202311161311 A CN 202311161311A CN 117131121 A CN117131121 A CN 117131121A
Authority
CN
China
Prior art keywords
data
service
layer
sub
response
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311161311.1A
Other languages
Chinese (zh)
Inventor
甘世俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuming Technology Hangzhou Co ltd
Original Assignee
Wuming Technology Hangzhou Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuming Technology Hangzhou Co ltd filed Critical Wuming Technology Hangzhou Co ltd
Priority to CN202311161311.1A priority Critical patent/CN117131121A/en
Publication of CN117131121A publication Critical patent/CN117131121A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data processing method, a data processing device, computer equipment and a storage medium, and belongs to the technical field of computers. The method comprises the following steps: acquiring service data based on an interaction layer of a target application, wherein the interaction layer is used for receiving operation, and the service data is data generated based on the operation on an application interface of the target application; splitting the service data according to service logic of a service associated with the service data based on a conversion layer of the target application to obtain a plurality of service sub-data, wherein the conversion layer is used for carrying out data transfer, and the service logic of the plurality of service sub-data are mutually independent; and based on the engine layer of the target application, carrying out parallel processing on the plurality of business sub-data through multithreading to obtain a plurality of response sub-data of the business data. According to the technical scheme, the plurality of business sub-data are processed in parallel through the multithreading, so that the problem of data collision can be avoided.

Description

Data processing method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data processing method, a data processing device, a computer device, and a storage medium.
Background
With the development of computer technology, the data processing efficiency can be greatly improved by performing read-write operation on the data under multithreading. However, in a multithreading environment, when multiple threads access the same data resource at the same time, a problem of data collision may be caused. Therefore, how to avoid data collision under multithreading is a technical problem to be solved.
In the related art, when multiple threads access the same data resource at the same time, the data resource is usually locked, so that only one thread can access the data resource, and other threads can perform the next operation only after waiting for the release of the thread. Therefore, the problem of data collision caused by the fact that a plurality of threads operate the same resource at the same time can be effectively avoided.
However, in the above scheme, when the data resource is locked, other threads can only access the data resource after the locked thread releases the data resource, which results in reduced data processing efficiency.
Disclosure of Invention
The embodiment of the application provides a data processing method, a device, computer equipment and a storage medium, which can simplify the execution logic of a service and avoid the problem of data collision by carrying out parallel processing on a plurality of service sub-data through multithreading. The technical scheme is as follows:
In one aspect, a data processing method is provided, the method including:
acquiring service data based on an interaction layer of a target application, wherein the target application is any application in a terminal, the interaction layer is used for receiving operation, and the service data is data generated based on the operation on an application interface of the target application;
splitting the service data according to service logic of a service associated with the service data based on a conversion layer of the target application to obtain a plurality of service sub-data, wherein the conversion layer is used for carrying out data transfer, and the service logic of the plurality of service sub-data are mutually independent;
and based on an engine layer of the target application, carrying out parallel processing on the plurality of service sub-data through multithreading to obtain a plurality of response sub-data of the service data, wherein the engine layer is used for carrying out logic processing on the data, and the plurality of response sub-data are in one-to-one correspondence with the plurality of service sub-data.
In another aspect, there is provided a data processing apparatus, the apparatus comprising:
the system comprises an acquisition module, a storage module and a control module, wherein the acquisition module is used for acquiring service data based on an interaction layer of a target application, the target application is any application in a terminal, the interaction layer is used for receiving operation, and the service data is data generated based on the operation on an application interface of the target application;
The splitting module is used for splitting the service data according to the service logic of the service related to the service data based on the conversion layer of the target application to obtain a plurality of service sub-data, wherein the conversion layer is used for carrying out data transfer, and the service logic of the plurality of service sub-data are mutually independent;
the processing module is used for carrying out parallel processing on the plurality of business sub-data through multithreading based on an engine layer of the target application to obtain a plurality of response sub-data of the business data, the engine layer is used for carrying out logic processing on the data, and the plurality of response sub-data are in one-to-one correspondence with the plurality of business sub-data.
In some embodiments, the splitting module comprises:
a first determining unit, configured to determine, based on the conversion layer, the number of service logics included in the service data from service logics of a service associated with the service data;
and the splitting unit is used for splitting the service data to obtain the plurality of service sub-data under the condition that the number is larger than a number threshold value.
In some embodiments, the first determining unit is further configured to determine a data type of the service data based on the conversion layer;
The splitting unit is further configured to split the service data according to the service logic to obtain the plurality of service sub-data when the data type is a preset data type.
In some embodiments, the apparatus further comprises:
the determining module is used for determining a data synchronization mode of the plurality of response sub-data based on the real-time requirement of the service data, wherein the data synchronization mode comprises a first data synchronization mode and a second data synchronization mode, the first data synchronization mode is used for synchronizing data with high real-time requirement, and the second data synchronization mode is used for synchronizing data with low real-time requirement;
and the synchronization module is used for synchronizing the response sub-data from the engine layer to the interaction layer in the data synchronization mode based on the conversion layer.
In some embodiments, the synchronization module comprises:
a second determining unit, configured to determine a data amount of the service data when the data synchronization manner is the first data synchronization manner;
an obtaining unit, configured to obtain, based on the conversion layer, the plurality of response sub-data from the engine layer, in a case where the data amount is not greater than a quantity threshold;
The merging unit is used for merging the plurality of response sub-data according to the service logic of the service related to the service data based on the conversion layer to obtain response data of the service data;
and the synchronizing unit is used for synchronizing the response data to the interaction layer based on the conversion layer.
In some embodiments, the second determining unit is further configured to determine, based on the engine layer, at least one target response sub-data from the plurality of response sub-data, where the target response sub-data is data to be synchronized to the interaction layer in the plurality of response data, if the data amount is greater than the number threshold;
the obtaining unit is further configured to obtain the at least one target response sub-data from the engine layer based on the conversion layer;
the merging unit is further configured to merge the at least one target response sub-data according to service logic of a service associated with the service data based on the conversion layer, so as to obtain response data of the service data;
the synchronization unit is further configured to synchronize the response data to the interaction layer based on the conversion layer.
In some embodiments, the acquisition unit comprises:
the first acquisition subunit is used for acquiring at least one data identifier from the engine layer based on the conversion layer, wherein the data identifier is used for indicating data to be synchronized to the interaction layer;
and a second obtaining subunit, configured to obtain, from the plurality of response sub-data, the at least one target response sub-data indicated by the at least one data identifier.
In some embodiments, the obtaining unit is further configured to obtain, based on the conversion layer, a target number of response sub-data from the engine layer every X seconds, where X is a positive number, when the data synchronization manner is the second data synchronization manner;
the merging unit is further configured to, in response to the completion of the acquisition of the plurality of response sub-data, merge the plurality of response sub-data according to service logic of a service associated with the service data based on the conversion layer, to obtain response data of the service data;
the synchronization unit is further configured to synchronize the response data to the interaction layer based on the conversion layer.
In some embodiments, the synchronization unit comprises:
A conversion subunit, configured to convert, based on the conversion layer, a data type of the response data into a target data type, where the target data type is a data type of data in the interaction layer;
and the synchronization subunit is used for synchronizing the response data to the interaction layer based on the conversion layer.
In another aspect, a computer device is provided, the computer device including a processor and a memory for storing at least one segment of a computer program, the at least one segment of a computer program being loaded and executed by the processor to implement a data processing method in an embodiment of the application.
In another aspect, a computer readable storage medium having stored therein at least one segment of a computer program that is loaded and executed by a processor to implement a data processing method as in an embodiment of the present application is provided.
In another aspect, a computer program product is provided, comprising a computer program stored in a computer readable storage medium, the computer program being read from the computer readable storage medium by a processor of a computer device, the computer program being executed by the processor to cause the computer device to perform the data processing method provided in each of the above aspects or in various alternative implementations of each of the aspects.
The embodiment of the application provides a data processing method, which is based on a conversion layer of a target application, and can split service data acquired by an interaction layer of the target application to obtain a plurality of service sub-data with mutually independent service logics. Based on the engine layer of the target application, the multi-threading is used for carrying out parallel processing on a plurality of business sub-data, so that the execution logic of the business can be simplified, and the processing efficiency of the business data can be improved. And because the business logic associated with each business sub-data is mutually independent, a data competition phenomenon does not occur in a plurality of threads for processing a plurality of business sub-data in parallel, so that the problem of data collision can be avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an implementation environment of a data processing method according to an embodiment of the present application;
FIG. 2 is a flow chart of a data processing method provided according to an embodiment of the present application;
FIG. 3 is a flow chart of another data processing method provided in accordance with an embodiment of the present application;
FIG. 4 is a flow chart of a data synchronization process provided in accordance with an embodiment of the present application;
FIG. 5 is a block diagram of a data processing apparatus provided in accordance with an embodiment of the present application;
FIG. 6 is a block diagram of another data processing apparatus provided in accordance with an embodiment of the present application;
fig. 7 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
The terms "first," "second," and the like in this disclosure are used for distinguishing between similar elements or items having substantially the same function and function, and it should be understood that there is no logical or chronological dependency between the terms "first," "second," and "n," and that there is no limitation on the amount and order of execution.
The term "at least one" in the present application means one or more, and the meaning of "a plurality of" means two or more.
It should be noted that, the information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data for analysis, stored data, presented data, etc.), and signals related to the present application are all authorized by the user or are fully authorized by the parties, and the collection, use, and processing of the related data is required to comply with the relevant laws and regulations and standards of the relevant countries and regions. For example, the service data involved in the present application are all acquired with sufficient authorization.
The data processing method provided by the embodiment of the application can be executed by the terminal. In some embodiments, the computer device is a terminal. In the following, taking a computer device as an example, an implementation environment of a data processing method provided by an embodiment of the present application is introduced, and fig. 1 is a schematic diagram of an implementation environment of a data processing method provided by an embodiment of the present application. Referring to fig. 1, the implementation environment includes a terminal 101 and a server 102. The terminal 101 and the server 102 can be directly or indirectly connected through wired or wireless communication, and the present application is not limited herein.
In some embodiments, terminal 101 is, but is not limited to, a smart phone, tablet, notebook, desktop, smart speaker, smart watch, smart voice-interactive device, smart home appliance, vehicle-mounted terminal, etc. The terminal 101 installs and runs a targeted application. Illustratively, the terminal 101 is a terminal used by a user, and the user can perform various operations on an application interface of a target application based on the target application installed on the terminal 101. The terminal 101 is capable of processing various data in response to a user-triggered operation.
In some embodiments, the server 102 is a stand-alone physical server, can be a server cluster or a distributed system formed by a plurality of physical servers, and can also be a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (Content Delivery Network, content delivery networks), basic cloud computing services such as big data and artificial intelligence platforms, and the like. The server 102 is used to provide background services for the target application.
In some embodiments, the server 102 takes on primary computing work and the terminal 101 takes on secondary computing work; alternatively, the server 102 takes on secondary computing work and the terminal 101 takes on primary computing work; alternatively, a distributed computing architecture is used for collaborative computing between the server 102 and the terminal 101.
Fig. 2 is a flowchart of a data processing method according to an embodiment of the present application, and referring to fig. 2, in an embodiment of the present application, an example of the method is described as being performed by a terminal. The data processing method comprises the following steps:
201. based on an interaction layer of a target application, collecting service data, wherein the target application is any application in a terminal, the interaction layer is used for receiving operation, and the service data is data generated based on the operation on an application interface of the target application.
In the embodiment of the present application, the target application is any application in the terminal, and the target application may be a social application, a shopping application, a game application, or the like, which is not limited in the embodiment of the present application. The target application includes an interaction layer, a conversion layer, and an engine layer. The terminal can collect service data generated based on the operation of the user on the application interface of the target application based on the interaction layer. The interaction layer mainly refers to an interface which is interacted with a user in the target application, namely an application interface of the target application. The interaction layer can be used for receiving operation of a user, and can also be used for receiving data input by the user and displaying data required by the user after processing. The conversion layer is used for carrying out data transfer, namely, the terminal needs to pass through the conversion layer to realize data interaction between the interaction layer and the engine layer. The engine layer is used for carrying out logic processing on the service data transmitted by the conversion layer to obtain response data of the service data.
202. Based on a conversion layer of the target application, splitting the service data according to service logic of a service associated with the service data to obtain a plurality of service sub-data, wherein the conversion layer is used for carrying out data transfer, and the service logic of the plurality of service sub-data are mutually independent.
In the embodiment of the application, the conversion layer is used for data transfer, namely, the terminal is based on the interaction layer, the collected service data can be synchronized to the engine layer after being processed by the conversion layer, and the response data obtained by processing the service data by the terminal is based on the engine layer and can be synchronized to the interaction layer after being processed by the conversion layer, so that the response data is displayed to a user by the interaction layer. After receiving the service data collected in the interaction layer based on the conversion layer, the terminal can split the service data based on the conversion layer according to service logic of a service associated with the service data to obtain a plurality of data blocks with proper sizes, namely a plurality of service sub-data with mutually independent service logic. Then, the terminal can issue a plurality of service sub-data to the engine layer based on the conversion layer, and the engine layer carries out logic processing on the plurality of service sub-data.
203. And the engine layer is used for carrying out logic processing on the data, and the plurality of response sub-data are in one-to-one correspondence with the plurality of service sub-data.
In the embodiment of the application, the engine layer is used for receiving the service data transmitted by the conversion layer and carrying out logic processing on the service data to obtain response data. After receiving the plurality of service sub-data sent by the conversion layer based on the engine layer, the terminal can process the plurality of service sub-data in parallel through multithreading based on the engine layer to obtain a plurality of response sub-data corresponding to the plurality of service sub-data one by one.
The embodiment of the application provides a data processing method, which is based on a conversion layer of a target application, and can split service data acquired by an interaction layer of the target application to obtain a plurality of service sub-data with mutually independent service logics. Based on the engine layer of the target application, the multi-threading is used for carrying out parallel processing on a plurality of business sub-data, so that the execution logic of the business can be simplified, and the processing efficiency of the business data can be improved. And because the business logic associated with each business sub-data is mutually independent, a data competition phenomenon does not occur in a plurality of threads for processing a plurality of business sub-data in parallel, so that the problem of data collision can be avoided.
Fig. 3 is a flowchart of another data processing method according to an embodiment of the present application, and referring to fig. 3, in an embodiment of the present application, an example of the method is described as being performed by a terminal. The data processing method comprises the following steps:
301. Based on an interaction layer of a target application, collecting service data, wherein the target application is any application in a terminal, the interaction layer is used for receiving operation, and the service data is data generated based on the operation on an application interface of the target application.
In the embodiment of the present application, the target application is any application in the terminal, and the target application may be a social application, a shopping application, a game application, or the like, which is not limited in the embodiment of the present application. The target application includes an interaction layer, a conversion layer, and an engine layer. The terminal can collect service data generated based on the operation of the user on the application interface of the target application based on the interaction layer. The interaction layer mainly refers to an interface which is interacted with a user in the target application, namely an application interface of the target application. The interaction layer can be used for receiving operation of a user, and can also be used for receiving data input by the user and displaying data required by the user after processing. The conversion layer is used for carrying out data transfer, namely, the terminal needs to pass through the conversion layer to realize data interaction between the interaction layer and the engine layer. The engine layer is used for carrying out logic processing on the service data transmitted by the conversion layer to obtain response data of the service data.
302. Based on a conversion layer of the target application, splitting the service data according to service logic of a service associated with the service data to obtain a plurality of service sub-data, wherein the conversion layer is used for carrying out data transfer, and the service logic of the plurality of service sub-data are mutually independent.
In the embodiment of the application, the conversion layer is used for data transfer, namely, the terminal is based on the interaction layer, the collected service data can be synchronized to the engine layer after being processed by the conversion layer, and the response data obtained by processing the service data by the terminal is based on the engine layer and can be synchronized to the interaction layer after being processed by the conversion layer, so that the response data is displayed to a user by the interaction layer. After receiving the service data collected in the interaction layer based on the conversion layer, the terminal can split the service data based on the conversion layer according to service logic of a service associated with the service data to obtain a plurality of data blocks with proper sizes, namely a plurality of service sub-data with mutually independent service logic. Then, the terminal can issue a plurality of service sub-data to the engine layer based on the conversion layer, and the engine layer carries out logic processing on the plurality of service sub-data.
In some embodiments, the terminal can split the service data based on the conversion layer of the target application in two ways.
Mode one: the terminal determines whether to split the service data based on the number of service logics included in the service data. Correspondingly, the terminal determines the number of service logics contained in the service data from the service logics of the service associated with the service data based on the conversion layer; and splitting the service data to obtain a plurality of service sub-data under the condition that the number is larger than the number threshold. The terminal can determine service logic of the service associated with the service data based on the conversion layer. Since the service data may relate to only a part of service logic of the service associated with the service data, the terminal is able to determine the number of service logic included in the service data, that is, the number of service logic that needs to be executed when the terminal processes the service data based on the engine layer, from the service logic of the service. Under the condition that the number of the business logics is larger than the number threshold value, the number of the business logics contained in the business data is larger, the business logics needed to be executed when the terminal processes the business data are more complex based on the engine layer, and at the moment, the terminal obtains a plurality of business sub-data by splitting the business data, so that the business logics needed to be executed when the business data are processed can be simplified, and the processing efficiency of the data is improved.
Mode two: the terminal determines whether to split the service data based on the data type of the service data. Correspondingly, the terminal determines the data type of the service data based on the conversion layer; and splitting the service data according to service logic under the condition that the data type is the preset data type to obtain a plurality of service sub-data. The terminal is based on the conversion layer, after receiving the service data, the terminal can detect the data type of the service data, and under the condition that the data type of the service data is a preset data type, the terminal indicates that the data volume of the service data is larger, or the real-time requirement of the service data is higher, so that the terminal can split the service data based on the conversion layer according to the service logic of the service related to the service data to obtain a plurality of service sub-data with mutually independent service logic. By determining the data type of the service data, the service data can be split when the service data meets certain conditions, and the data processing efficiency is improved.
303. And the engine layer is used for carrying out logic processing on the data, and the plurality of response sub-data are in one-to-one correspondence with the plurality of service sub-data.
In the embodiment of the application, the engine layer is used for receiving the service data transmitted by the conversion layer and carrying out logic processing on the service data to obtain response data. After receiving the plurality of service sub-data sent by the conversion layer based on the engine layer, the terminal can process the plurality of service sub-data in parallel through multithreading based on the engine layer to obtain a plurality of response sub-data corresponding to the plurality of service sub-data one by one.
304. Based on the real-time requirement of the service data, determining a data synchronization mode of a plurality of response sub-data, wherein the data synchronization mode comprises a first data synchronization mode and a second data synchronization mode, the first data synchronization mode is used for synchronizing the data with high real-time requirement, and the second data synchronization mode is used for synchronizing the data with low real-time requirement.
In the embodiment of the application, the terminal can determine the data synchronization mode for synchronizing the plurality of response sub-data from the engine layer to the interaction layer based on the real-time requirement of the service data. The data synchronization modes comprise a first data synchronization mode and a second data synchronization mode. The first data synchronization mode is used for synchronizing data with high real-time requirements, and the second data synchronization mode is used for synchronizing data with low real-time requirements. Based on the data characteristics of the service data, the terminal adopts different data synchronization modes to synchronize the response sub-data to the interactive interface, so that the operation efficiency of data synchronization is improved.
305. Based on the conversion layer, a plurality of response sub-data are synchronized from the engine layer to the interaction layer in a data synchronization mode.
In the embodiment of the application, the terminal needs to synchronize the response data obtained by processing the service data based on the engine layer to the interaction layer through the conversion layer, so the terminal can acquire a plurality of response sub-data obtained by processing a plurality of service sub-data in parallel from the engine layer based on the conversion layer, combine the plurality of response sub-data and synchronize the combined response data to the interaction layer.
In some embodiments, in the case that the data synchronization manner is the first data synchronization manner, the terminal synchronizes the plurality of response sub-data from the engine layer to the interaction layer by the first manner; when the data synchronization method is the second data synchronization method, the terminal synchronizes the plurality of response sub-data from the engine layer to the interaction layer by the following method two.
Mode one: under the condition that the service data is data with high real-time requirement, the terminal can synchronize a plurality of response sub-data from an engine layer to an interaction layer through a first data synchronization mode. Correspondingly, under the condition that the data synchronization mode is a first data synchronization mode, the terminal determines the data quantity of the service data; acquiring a plurality of response sub-data from the engine layer based on the conversion layer under the condition that the data quantity is not greater than the quantity threshold; based on the conversion layer, combining the plurality of response sub-data according to the service logic of the service associated with the service data to obtain response data of the service data; based on the translation layer, the response data is synchronized to the interaction layer. Under the condition that the data synchronization mode is the first data synchronization mode, the real-time requirement of the service data is high, at the moment, the terminal needs to synchronize the response data of the service data from the engine layer to the interaction layer immediately, and the response data is displayed to the user by the interaction layer. The terminal can determine the service data as a small amount of data with high real-time requirements by determining the data amount of the service data under the condition that the data amount is not more than the quantity threshold value. For such data, after processing multiple response sub-data of such data, the terminal can send a data synchronization task to the conversion layer based on the engine layer. After receiving the data synchronization task, the conversion layer can immediately acquire a plurality of response sub-data of the service data from the engine layer, and combine the plurality of response sub-data based on rules according to which the service data is split, namely service logic of a service associated with the service data, so as to obtain response data of the service data. The terminal transmits the response data to the interaction layer through the conversion layer, so that the data synchronization of the response data between the engine layer and the interaction layer is realized.
In some embodiments, the terminal is able to synchronize the partial response sub-data to the interaction layer when the traffic data is a large amount of data with high real-time requirements. Correspondingly, under the condition that the data quantity is larger than the quantity threshold value, the terminal determines at least one target response sub-data from a plurality of response sub-data based on the engine layer, wherein the target response sub-data is data to be synchronized to the interaction layer in the plurality of response data; based on the conversion layer, acquiring at least one target response sub-data from the engine layer; based on the conversion layer, merging at least one target response sub-data according to the service logic of the service associated with the service data to obtain response data of the service data; based on the translation layer, the response data is synchronized to the interaction layer. When the data amount is larger than the quantity threshold, the terminal can determine the service data as a large amount of data with high real-time requirements. For such data, after processing to obtain multiple response sub-data of such data, the terminal can determine, based on the engine layer, response sub-data to be synchronized to the interaction layer, that is, target response sub-data, from the multiple response sub-data. And then the terminal sends a data synchronization task to the conversion layer based on the engine layer. After receiving the data synchronization task, the conversion layer can acquire target response sub-data in the plurality of response sub-data from the engine layer, and combine at least one target response sub-data based on rules according to which the service data is split, namely service logic of a service associated with the service data, so as to obtain response data of the service data. The terminal is based on the conversion layer, and partial response sub-data of the service data are acquired from the engine layer, so that when the data volume of the service data is large, the partial response sub-data which really needs to be synchronized to the interaction layer in the plurality of response sub-data are synchronized to the interaction layer, and the operation efficiency of data synchronization is improved.
In some embodiments, the translation layer can obtain response sub-data to be synchronized to the interaction layer from the engine layer according to the data identification. Correspondingly, the terminal acquires at least one data identifier from the engine layer based on the conversion layer, wherein the data identifier is used for indicating data to be synchronized to the interaction layer; at least one target response sub-data indicated by at least one data identifier is obtained from the plurality of response sub-data. The terminal can determine response sub-data to be synchronized to the interaction layer in a plurality of response sub-data of the service data based on the engine layer, and send the response sub-data identifications to the conversion layer. That is, the terminal can send the data synchronization task carrying at least one data identifier to the conversion layer based on the engine layer. After receiving the data synchronization task, the conversion layer can acquire the at least one data identifier, and acquire target response sub-data indicated by the data identifier from a plurality of response sub-data of the engine layer based on the data identifier. The terminal is based on the conversion layer, and the target response sub-data indicated by the data identification is obtained from the engine layer, so that when the data volume of the service data is large, the target response sub-data which really needs to be synchronized to the interaction layer in the plurality of response sub-data is synchronized to the interaction layer, and the operation efficiency of data synchronization is improved.
Mode two: under the condition that the service data are data with high and low real-time requirements, the terminal can synchronize a plurality of response sub-data from an engine layer to an interaction layer in a second data synchronization mode. Correspondingly, under the condition that the data synchronization mode is a second data synchronization mode, the terminal acquires target number of response sub-data from the engine layer every X seconds based on the conversion layer, wherein X is a positive number; in response to the completion of the acquisition of the plurality of response sub-data, merging the plurality of response sub-data according to service logic of a service associated with the service data based on the conversion layer to obtain response data of the service data; based on the translation layer, the response data is synchronized to the interaction layer. Under the condition that the data synchronization mode is the second data synchronization mode, the real-time requirement of the service data is not high, at the moment, the terminal does not need to synchronize the response data of the service data from the engine layer to the interaction layer immediately, and the interaction layer displays the response data to the user. Therefore, the terminal can acquire the target number of response sub-data from the engine layer every interval of X seconds based on the conversion layer until the plurality of response sub-data of the service data are all acquired. And then, the terminal combines the plurality of response sub-data according to the rule based on the split service data, namely the service logic of the service associated with the service data, so as to obtain the response data of the service data. And finally, transmitting the response data to the interaction layer through the conversion layer, so that the data synchronization of the response data between the engine layer and the interaction layer is realized. When the real-time requirement of the service data is not high, the terminal can reduce the performance consumption of the terminal during data synchronization and improve the stability of data synchronization between the interaction layer and the engine layer by acquiring response sub-data of the service data from the engine layer in a timed batch mode.
In some embodiments, the terminal can be capable of synchronizing response data to the interaction layer after converting the response data to data required by the interaction layer based on the conversion layer prior to synchronizing the response data to the interaction layer. Correspondingly, the terminal converts the data type of the response data into a target data type based on the conversion layer, wherein the target data type is the data type of the data in the interaction layer; based on the translation layer, the response data is synchronized to the interaction layer. The terminal is based on the conversion layer, the data type of the response data acquired from the engine layer is the data type of the data in the engine layer, and the data type of the response data can be an integer type. Therefore, when the terminal synchronizes the response data obtained after combination to the interaction layer based on the conversion layer, the terminal needs to convert the data type of the response data. That is, the terminal can convert the data type of the data in the data type conversion layer interaction layer of the response data, that is, the target data type, which may be a character string type, based on the conversion layer. The terminal then synchronizes the response data to the interaction layer based on the translation layer.
Fig. 4 is a flowchart of a data synchronization process according to an embodiment of the present application. Referring to fig. 4, a target application is exemplified as a Sequencer (nonlinear animation editor). Firstly, the terminal can collect interaction layer data based on the interaction layer of the Sequencer, namely, service data generated based on the operation of a user on an application interface of the Sequencer. And then, the terminal sends the interaction layer data to a conversion layer, and the terminal converts the data type of the interaction layer data into the data type of the data in the conversion layer based on the conversion layer to obtain the conversion layer data. Then, the terminal judges whether to split the service data based on the data characteristics of the service data. For example, when the data volume of the service data is large or the real-time performance of the service data is high, the terminal splits the service data. Under the condition of splitting the service data, the terminal splits the service data according to the service logic of the service associated with the service data based on the conversion layer to obtain a plurality of service sub-data with the service logic independent of each other. And then, the split multiple business sub-data are issued to the data synchronization task of the engine layer, and the multiple business sub-data can be synchronized to the engine layer when the engine executes the data synchronization task. If the service data is not split, the terminal can directly issue the service data to the data synchronization task based on the conversion layer. After the service sub-data are acquired, the terminal can process the service sub-data in parallel through multithreading based on the engine layer to obtain a plurality of response sub-data corresponding to the service sub-data one by one. Then, under the condition that the service data is data with high real-time requirement, the terminal can determine the data volume of the service data, and when the service data is a small amount of data, the terminal sends a data synchronization task to the conversion layer based on the engine layer. After receiving the data synchronization task, the conversion layer can acquire engine layer data, namely, acquire a plurality of response sub-data of the service data from the engine layer, combine the plurality of response sub-data to obtain response data of the service data, and then convert the response data into interaction layer data to be synchronized to the interaction layer. And when the service data is not a small amount of data, the terminal determines target response sub-data to be synchronized to the interaction layer from the plurality of response sub-data based on the engine layer. And then the terminal sends a data synchronization task carrying a data identifier to the conversion layer based on the engine layer. After receiving the data synchronization task, the conversion layer can acquire the at least one data identifier, and acquire target response sub-data indicated by the data identifier from a plurality of response sub-data of the engine layer based on the data identifier. And then merging at least one target response sub-data to obtain response data of the service data, and converting the response data into interaction layer data and synchronizing the interaction layer data to the interaction layer. Under the condition that the service data is the data with low real-time requirement, the terminal periodically and batchs to acquire the target number of response sub-data from the engine layer based on the conversion layer until the plurality of response sub-data of the service data are all acquired. And then, the terminal combines the plurality of response sub-data to obtain response data of the service data. And finally, converting the response data into interaction layer data through a conversion layer and synchronizing the interaction layer data to the interaction layer.
The embodiment of the application provides a data processing method, which is based on a conversion layer of a target application, and can split service data acquired by an interaction layer of the target application to obtain a plurality of service sub-data with mutually independent service logics. Based on the engine layer of the target application, the multi-threading is used for carrying out parallel processing on a plurality of business sub-data, so that the execution logic of the business can be simplified, and the processing efficiency of the business data can be improved. And because the business logic associated with each business sub-data is mutually independent, a data competition phenomenon does not occur in a plurality of threads for processing a plurality of business sub-data in parallel, so that the problem of data collision can be avoided.
Fig. 5 is a block diagram of a data processing apparatus according to an embodiment of the present application. The apparatus is for performing the steps when the above data processing method is performed, and referring to fig. 5, the data processing apparatus includes: acquisition module 501, splitting module 502 and processing module 503.
The acquisition module 501 is configured to acquire service data based on an interaction layer of a target application, where the target application is any application in a terminal, the interaction layer is configured to receive an operation, and the service data is data generated by an operation on an application interface based on the target application;
The splitting module 502 is configured to split service data according to service logic of a service associated with the service data based on a conversion layer of the target application, so as to obtain a plurality of service sub-data, where the conversion layer is used for performing data transfer, and the service logic of the plurality of service sub-data is mutually independent;
the processing module 503 is configured to perform parallel processing on the multiple service sub-data through multithreading based on an engine layer of the target application, to obtain multiple response sub-data of the service data, where the engine layer is configured to perform logic processing on the data, and the multiple response sub-data corresponds to the multiple service sub-data one by one.
In some embodiments, FIG. 6 is a block diagram of another data processing apparatus provided in accordance with an embodiment of the present application. Referring to fig. 6, the splitting module 502 includes:
a first determining unit 601, configured to determine, based on the conversion layer, the number of service logics included in the service data from service logics of the service associated with the service data;
and the splitting unit 602 is configured to split the service data to obtain a plurality of service sub-data when the number is greater than the number threshold.
In some embodiments, the first determining unit 601 is further configured to determine a data type of the service data based on the conversion layer;
The splitting unit 602 is further configured to split the service data according to the service logic to obtain a plurality of service sub-data when the data type is a preset data type.
In some embodiments, with continued reference to fig. 6, the apparatus further comprises:
the determining module 504 is configured to determine, based on the real-time requirement of the service data, a data synchronization manner of the plurality of response sub-data, where the data synchronization manner includes a first data synchronization manner and a second data synchronization manner, where the first data synchronization manner is used to synchronize data with high real-time requirement, and the second data synchronization manner is used to synchronize data with low real-time requirement;
the synchronization module 505 is configured to synchronize the plurality of response sub-data from the engine layer to the interaction layer in a data synchronization manner based on the conversion layer.
In some embodiments, with continued reference to fig. 6, the synchronization module 505 includes:
a second determining unit 603, configured to determine a data amount of the service data when the data synchronization mode is the first data synchronization mode;
an obtaining unit 604, configured to obtain, based on the conversion layer, a plurality of response sub-data from the engine layer, in a case where the data amount is not greater than the number threshold;
the merging unit 605 is configured to merge the plurality of response sub-data according to service logic of a service associated with the service data based on the conversion layer, to obtain response data of the service data;
The synchronization unit 606 is configured to synchronize the response data to the interaction layer based on the conversion layer.
In some embodiments, the second determining unit 603 is further configured to determine, based on the engine layer, at least one target response sub-data from the plurality of response sub-data, where the target response sub-data is data to be synchronized to the interaction layer in the plurality of response data, if the data size is greater than the number threshold;
the obtaining unit 604 is further configured to obtain at least one target response sub-data from the engine layer based on the conversion layer;
the merging unit 605 is further configured to merge, based on the conversion layer, at least one target response sub-data according to service logic of a service associated with the service data, to obtain response data of the service data;
the synchronization unit 606 is further configured to synchronize the response data to the interaction layer based on the conversion layer.
In some embodiments, with continued reference to fig. 6, the acquisition unit 604 includes:
a first obtaining subunit 6041, configured to obtain, based on the conversion layer, at least one data identifier from the engine layer, where the data identifier is used to indicate data to be synchronized to the interaction layer;
a second obtaining sub-unit 6042 is configured to obtain at least one target response sub-data indicated by the at least one data identifier from the plurality of response sub-data.
In some embodiments, the obtaining unit 604 is further configured to obtain, based on the conversion layer, a target number of response sub-data from the engine layer at intervals of X seconds, where X is a positive number, where the data synchronization manner is the second data synchronization manner;
the merging unit 605 is further configured to, in response to completion of the acquisition of the plurality of response sub-data, merge the plurality of response sub-data according to service logic of a service associated with the service data based on the conversion layer, to obtain response data of the service data;
the synchronization unit 606 is further configured to synchronize the response data to the interaction layer based on the conversion layer.
In some embodiments, the synchronization unit 606 includes:
a conversion subunit 6061, configured to convert, based on the conversion layer, the data type of the response data into a target data type, where the target data type is a data type of the data in the interaction layer;
a synchronization subunit 6062 for synchronizing the response data to the interaction layer based on the conversion layer.
The embodiment of the application provides a data processing device, which is based on a conversion layer of a target application, and can split service data acquired by an interaction layer of the target application to obtain a plurality of service sub-data with mutually independent service logics. Based on the engine layer of the target application, the multi-threading is used for carrying out parallel processing on a plurality of business sub-data, so that the execution logic of the business can be simplified, and the processing efficiency of the business data can be improved. And because the business logic associated with each business sub-data is mutually independent, a data competition phenomenon does not occur in a plurality of threads for processing a plurality of business sub-data in parallel, so that the problem of data collision can be avoided.
It should be noted that, in the data processing apparatus provided in the foregoing embodiment, only the division of the above functional modules is used for illustration, and in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the data processing apparatus and the data processing method embodiment provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the data processing apparatus and the data processing method embodiment are detailed in the method embodiment, which is not described herein again.
Fig. 7 is a schematic structural diagram of a terminal 700 according to an embodiment of the present application. The terminal 700 may be a portable mobile terminal such as: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion picture expert compression standard audio plane 3), an MP4 (Moving Picture Experts Group Audio Layer IV, motion picture expert compression standard audio plane 4) player, a notebook computer, or a desktop computer. Terminal 700 may also be referred to by other names of user devices, portable terminals, laptop terminals, desktop terminals, etc.
In general, the terminal 700 includes: a processor 701 and a memory 702.
Processor 701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 701 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 701 may also include a main processor, which is a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 701 may be integrated with a GPU (Graphics Processing Unit, image processor) for taking care of rendering and drawing of content that the display screen is required to display. In some embodiments, the processor 701 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 702 may include one or more computer-readable storage media, which may be non-transitory. The memory 702 may also include high-speed random access memory as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 702 is used to store at least one computer program for execution by processor 701 to implement the data processing methods provided by the method embodiments of the present application.
In some embodiments, the terminal 700 may further optionally include: a peripheral interface 703 and at least one peripheral. The processor 701, the memory 702, and the peripheral interface 703 may be connected by a bus or signal lines. The individual peripheral devices may be connected to the peripheral device interface 703 via buses, signal lines or a circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 704, a display 705, a camera assembly 706, audio circuitry 707, and a power supply 708.
A peripheral interface 703 may be used to connect I/O (Input/Output) related at least one peripheral device to the processor 701 and memory 702. In some embodiments, the processor 701, memory 702, and peripheral interface 703 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 701, the memory 702, and the peripheral interface 703 may be implemented on separate chips or circuit boards, which is not limited in this embodiment.
The Radio Frequency circuit 704 is configured to receive and transmit RF (Radio Frequency) signals, also referred to as electromagnetic signals. The radio frequency circuitry 704 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 704 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. In some embodiments, the radio frequency circuit 704 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. The radio frequency circuitry 704 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the world wide web, metropolitan area networks, intranets, generation mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity ) networks. In some embodiments, the radio frequency circuitry 704 may also include NFC (Near Field Communication ) related circuitry, which is not limiting of the application.
The display screen 705 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 705 is a touch display, the display 705 also has the ability to collect touch signals at or above the surface of the display 705. The touch signal may be input to the processor 701 as a control signal for processing. At this time, the display 705 may also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display 705 may be one and disposed on the front panel of the terminal 700; in other embodiments, the display 705 may be at least two, respectively disposed on different surfaces of the terminal 700 or in a folded design; in other embodiments, the display 705 may be a flexible display disposed on a curved surface or a folded surface of the terminal 700. Even more, the display 705 may be arranged in a non-rectangular irregular pattern, i.e. a shaped screen. The display 705 may be made of LCD (Liquid Crystal Display ), OLED (Organic Light-Emitting Diode) or other materials.
The camera assembly 706 is used to capture images or video. In some embodiments, camera assembly 706 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal and the rear camera is disposed on the rear surface of the terminal. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, camera assembly 706 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
The audio circuit 707 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and environments, converting the sound waves into electric signals, and inputting the electric signals to the processor 701 for processing, or inputting the electric signals to the radio frequency circuit 704 for voice communication. For the purpose of stereo acquisition or noise reduction, a plurality of microphones may be respectively disposed at different portions of the terminal 700. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is used to convert electrical signals from the processor 701 or the radio frequency circuit 704 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, the audio circuit 707 may also include a headphone jack.
The power supply 708 is used to power the various components in the terminal 700. The power source 708 may be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power source 708 comprises a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the terminal 700 further includes one or more sensors 709. The one or more sensors 709 include, but are not limited to: acceleration sensor 710, gyro sensor 711, pressure sensor 712, optical sensor 713, and proximity sensor 714.
The acceleration sensor 710 may detect the magnitudes of accelerations on three coordinate axes of a coordinate system established with the terminal 700. For example, the acceleration sensor 710 may be used to detect components of gravitational acceleration in three coordinate axes. The processor 701 may control the display screen 705 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal acquired by the acceleration sensor 710. Acceleration sensor 710 may also be used for the acquisition of motion data of a game or user.
The gyro sensor 711 may detect a body direction and a rotation angle of the terminal 700, and the gyro sensor 711 may collect a 3D motion of the user on the terminal 700 in cooperation with the acceleration sensor 710. The processor 701 may implement the following functions according to the data collected by the gyro sensor 711: motion sensing (e.g., changing UI according to a tilting operation by a user), image stabilization at shooting, game control, and inertial navigation.
The pressure sensor 712 may be disposed at a side frame of the terminal 700 and/or at a lower layer of the display screen 705. When the pressure sensor 712 is disposed at a side frame of the terminal 700, a grip signal of the user to the terminal 700 may be detected, and the processor 701 performs a left-right hand recognition or a shortcut operation according to the grip signal collected by the pressure sensor 712. When the pressure sensor 712 is disposed at the lower layer of the display screen 705, the processor 701 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 705. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
The optical sensor 713 is used to collect the intensity of ambient light. In one embodiment, the processor 701 may control the display brightness of the display screen 705 based on the ambient light intensity collected by the optical sensor 713. Specifically, when the intensity of the ambient light is high, the display brightness of the display screen 705 is turned up; when the ambient light intensity is low, the display brightness of the display screen 705 is turned down. In another embodiment, the processor 701 may also dynamically adjust the shooting parameters of the camera assembly 706 based on the ambient light intensity collected by the optical sensor 713.
A proximity sensor 714, also known as a distance sensor, is typically provided on the front panel of the terminal 700. The proximity sensor 714 is used to collect the distance between the user and the front of the terminal 700. In one embodiment, when the proximity sensor 714 detects that the distance between the user and the front of the terminal 700 gradually decreases, the processor 701 controls the display 705 to switch from the bright screen state to the off screen state; when the proximity sensor 714 detects that the distance between the user and the front surface of the terminal 700 gradually increases, the processor 701 controls the display screen 705 to switch from the off-screen state to the on-screen state.
Those skilled in the art will appreciate that the structure shown in fig. 7 is not limiting of the terminal 700 and may include more or fewer components than shown, or may combine certain components, or may employ a different arrangement of components.
The present application also provides a computer readable storage medium having stored therein at least one section of a computer program loaded and executed by a processor of a computer device to implement the operations performed by the computer device in the data processing method of the above embodiments. For example, the computer readable storage medium may be Read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), compact disc Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM), magnetic tape, floppy disk, optical data storage device, and the like.
Embodiments of the present application also provide a computer program product comprising a computer program stored in a computer readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program so that the computer device executes the data processing method provided in the above-described various alternative implementations.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description of the preferred embodiments of the present application is not intended to limit the application, but rather, the application is to be construed as limited to the appended claims.

Claims (10)

1. A method of data processing, the method comprising:
acquiring service data based on an interaction layer of a target application, wherein the target application is any application in a terminal, the interaction layer is used for receiving operation, and the service data is data generated based on the operation on an application interface of the target application;
Splitting the service data according to service logic of a service associated with the service data based on a conversion layer of the target application to obtain a plurality of service sub-data, wherein the conversion layer is used for carrying out data transfer, and the service logic of the plurality of service sub-data are mutually independent;
and based on an engine layer of the target application, carrying out parallel processing on the plurality of service sub-data through multithreading to obtain a plurality of response sub-data of the service data, wherein the engine layer is used for carrying out logic processing on the data, and the plurality of response sub-data are in one-to-one correspondence with the plurality of service sub-data.
2. The method of claim 1, wherein the splitting the service data according to the service logic of the service associated with the service data based on the conversion layer of the target application to obtain a plurality of service sub-data includes:
based on the conversion layer, determining the quantity of service logics contained in the service data from the service logics of the service related to the service data;
splitting the service data to obtain the plurality of service sub-data under the condition that the number is larger than a number threshold; or,
Determining a data type of the service data based on the conversion layer;
and splitting the service data according to the service logic under the condition that the data type is a preset data type to obtain the plurality of service sub-data.
3. The method according to claim 1, wherein the method further comprises:
determining a data synchronization mode of the plurality of response sub-data based on the real-time requirements of the service data, wherein the data synchronization mode comprises a first data synchronization mode and a second data synchronization mode, the first data synchronization mode is used for synchronizing data with high real-time requirements, and the second data synchronization mode is used for synchronizing data with low real-time requirements;
and synchronizing the plurality of response sub-data from the engine layer to the interaction layer in the data synchronization mode based on the conversion layer.
4. The method of claim 3, wherein synchronizing the plurality of response sub-data from the engine layer to the interaction layer by the data synchronization manner based on the conversion layer comprises:
determining the data quantity of the service data under the condition that the data synchronization mode is the first data synchronization mode;
Acquiring the plurality of response sub-data from the engine layer based on the conversion layer if the data amount is not greater than a quantity threshold;
based on the conversion layer, combining the plurality of response sub-data according to the service logic of the service associated with the service data to obtain response data of the service data;
based on the translation layer, the response data is synchronized to the interaction layer.
5. The method according to claim 4, wherein the method further comprises:
determining at least one target response sub-data from the plurality of response sub-data based on the engine layer when the data amount is greater than the number threshold, the target response sub-data being data to be synchronized to the interaction layer in the plurality of response data;
acquiring the at least one target response sub-data from the engine layer based on the conversion layer;
based on the conversion layer, merging the at least one target response sub-data according to the service logic of the service associated with the service data to obtain response data of the service data;
based on the translation layer, the response data is synchronized to the interaction layer.
6. The method of claim 5, wherein the obtaining the at least one target response sub-data from the engine layer based on the translation layer comprises:
based on the conversion layer, at least one data identifier is obtained from the engine layer, wherein the data identifier is used for indicating data to be synchronized to the interaction layer;
the at least one target response sub-data indicated by the at least one data identifier is acquired from the plurality of response sub-data.
7. The method of claim 3, wherein synchronizing the plurality of response sub-data from the engine layer to the interaction layer by the data synchronization manner based on the conversion layer comprises:
acquiring a target number of response sub-data from the engine layer every X seconds based on the conversion layer under the condition that the data synchronization mode is the second data synchronization mode, wherein X is a positive number;
based on the conversion layer, combining the response sub-data according to service logic of the service associated with the service data to obtain response data of the service data;
Based on the translation layer, the response data is synchronized to the interaction layer.
8. The method of any of claims 4, 5 or 7, wherein the synchronizing the response data to the interaction layer based on the conversion layer comprises:
based on the conversion layer, converting the data type of the response data into a target data type, wherein the target data type is the data type of the data in the interaction layer;
based on the translation layer, the response data is synchronized to the interaction layer.
9. A data processing apparatus, the apparatus comprising:
the system comprises an acquisition module, a storage module and a control module, wherein the acquisition module is used for acquiring service data based on an interaction layer of a target application, the target application is any application in a terminal, the interaction layer is used for receiving operation, and the service data is data generated based on the operation on an application interface of the target application;
the splitting module is used for splitting the service data according to the service logic of the service related to the service data based on the conversion layer of the target application to obtain a plurality of service sub-data, wherein the conversion layer is used for carrying out data transfer, and the service logic of the plurality of service sub-data are mutually independent;
The processing module is used for carrying out parallel processing on the plurality of business sub-data through multithreading based on an engine layer of the target application to obtain a plurality of response sub-data of the business data, the engine layer is used for carrying out logic processing on the data, and the plurality of response sub-data are in one-to-one correspondence with the plurality of business sub-data.
10. A computer device, characterized in that it comprises a processor and a memory for storing at least one computer program, which is loaded by the processor and which performs the data processing method according to any of claims 1 to 8.
CN202311161311.1A 2023-09-08 2023-09-08 Data processing method, device, computer equipment and storage medium Pending CN117131121A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311161311.1A CN117131121A (en) 2023-09-08 2023-09-08 Data processing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311161311.1A CN117131121A (en) 2023-09-08 2023-09-08 Data processing method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117131121A true CN117131121A (en) 2023-11-28

Family

ID=88862801

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311161311.1A Pending CN117131121A (en) 2023-09-08 2023-09-08 Data processing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117131121A (en)

Similar Documents

Publication Publication Date Title
CN110278464B (en) Method and device for displaying list
CN108174275B (en) Image display method and device and computer readable storage medium
CN108762881B (en) Interface drawing method and device, terminal and storage medium
CN112163406B (en) Interactive message display method and device, computer equipment and storage medium
CN107896337B (en) Information popularization method and device and storage medium
CN111462742B (en) Text display method and device based on voice, electronic equipment and storage medium
CN110147503B (en) Information issuing method and device, computer equipment and storage medium
CN112825048B (en) Message reminding method and device, electronic equipment and storage medium
CN111192072B (en) User grouping method and device and storage medium
CN110890969B (en) Method and device for mass-sending message, electronic equipment and storage medium
CN108401194B (en) Time stamp determination method, apparatus and computer-readable storage medium
CN110471614B (en) Method for storing data, method and device for detecting terminal
CN111862972B (en) Voice interaction service method, device, equipment and storage medium
CN111064657B (en) Method, device and system for grouping concerned accounts
CN111246231B (en) Live broadcast management method and device, server and computer readable storage medium
CN117215990A (en) Inter-core communication method and device of multi-core chip and multi-core chip
CN116700826A (en) Widget starting method, device, equipment and computer readable storage medium
CN116418771A (en) Message display method, message processing method, device and electronic equipment
CN110891181A (en) Live broadcast picture display method and device, storage medium and terminal
CN111464829B (en) Method, device and equipment for switching media data and storage medium
CN114594885A (en) Application icon management method, device and equipment and computer readable storage medium
CN112260845B (en) Method and device for accelerating data transmission
CN117131121A (en) Data processing method, device, computer equipment and storage medium
CN113822010A (en) Content display method, device, equipment and storage medium
CN112749583A (en) Face image grouping method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination