CN113434173B - Data processing method, device, storage medium and electronic equipment - Google Patents

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

Info

Publication number
CN113434173B
CN113434173B CN202110706010.7A CN202110706010A CN113434173B CN 113434173 B CN113434173 B CN 113434173B CN 202110706010 A CN202110706010 A CN 202110706010A CN 113434173 B CN113434173 B CN 113434173B
Authority
CN
China
Prior art keywords
data
code
view model
end display
displayed
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.)
Active
Application number
CN202110706010.7A
Other languages
Chinese (zh)
Other versions
CN113434173A (en
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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202110706010.7A priority Critical patent/CN113434173B/en
Publication of CN113434173A publication Critical patent/CN113434173A/en
Application granted granted Critical
Publication of CN113434173B publication Critical patent/CN113434173B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • 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

Abstract

The invention discloses a data processing method, a data processing device, a storage medium and electronic equipment. Wherein the method comprises the following steps: when the change of the data to be displayed corresponding to the application program is detected, obtaining difference data corresponding to front-end display codes of the application program, wherein the difference data represents the change of the data to be displayed; determining at least one view model corresponding to the front-end display code, wherein the at least one view model is used for separating the business logic code of the application program from the front-end display code of the application program; and updating the business logic code according to the at least one view model and the difference data. The invention solves the technical problem that the display logic and the business logic cannot be completely separated in the existing application program.

Description

Data processing method, device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of computer software, and in particular, to a data processing method, apparatus, storage medium, and electronic device.
Background
With the development of mobile internet technology, mobile terminal application layers are endless, and accordingly, development technology requirements for mobile terminal applications are also higher and higher, wherein a good software design mode architecture plays a very important role in developing mobile terminal applications.
In the existing software design mode, the development of the service logic code is realized without depending on the front-end display code, but the front-end display code is not completely separated from the service logic code, so that the development is realized independently.
Another common scheme is to further develop the service logic code to be used as an interface for defining data, and not to directly interact with the front-end display code, but to add a component serving as an intermediate medium at the same time, when the service logic code changes, the front-end display code is changed through the component, so that the content to be displayed is changed. This approach may have multiple components acting as intermediaries in the design and development of more complex view logic, reducing the readability and extensibility of the software code.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a data processing method, a device, a storage medium and electronic equipment, which at least solve the technical problem that presentation logic and business logic cannot be completely separated in the existing application program.
According to an aspect of an embodiment of the present invention, there is provided a data processing method including: when the change of the data to be displayed corresponding to the application program is detected, obtaining difference data corresponding to front-end display codes of the application program, wherein the difference data represents the change of the data to be displayed; determining at least one view model corresponding to the front-end display code, wherein the at least one view model is used for separating the business logic code of the application program from the front-end display code of the application program; and updating the business logic code according to the at least one view model and the difference data.
Further, the data processing method further comprises: when the difference data corresponding to the front-end display code of the application program is obtained, a modification instruction is generated when the modification operation of the data to be displayed of the application program is detected; modifying the data to be displayed according to the modification instruction to obtain modified data; and determining difference data obtained by modifying the front-end display code of the application program according to the modification data.
Further, the data processing method further comprises: when at least one view model corresponding to the front-end display code is determined, acquiring the front-end display code corresponding to the data to be displayed; determining a service type corresponding to the front-end display code, wherein the service type corresponds to the view type of at least one view model; and determining at least one view model corresponding to the data to be displayed according to the service type.
Further, the data processing method further comprises: determining at least one view model corresponding to data to be displayed according to the service type, and determining the service type of the front-end display codes as a target service type when the data to be displayed corresponds to a plurality of front-end display codes and the service types of the front-end display codes are the same; and determining the view model corresponding to the target service type as a target view model corresponding to the data to be displayed.
Further, the data processing method further comprises: determining at least one view model corresponding to data to be displayed according to service types, and acquiring the service type corresponding to each front-end display code when the data to be displayed corresponds to a plurality of front-end display codes and the service types of the front-end display codes are different; and determining the view model corresponding to the service type corresponding to each front-end display code as a plurality of target view models corresponding to the data to be displayed.
Further, the data processing method further comprises: updating the business logic code according to at least one view model and the difference data, and sending the difference data to a data module through the view model, wherein the data module is used for running the business logic code; and updating the business logic codes in the data module according to the difference data.
Further, the data processing method further comprises: when detecting that the service logic code changes, acquiring the changed service logic code; determining a target view model according to the service type corresponding to the changed service logic code; modifying the data to be displayed through the target view model and the changed business logic code; and displaying the modified data to be displayed.
According to another aspect of the embodiment of the present invention, there is also provided a data processing apparatus including: the acquisition module is used for acquiring difference data corresponding to front-end display codes of the application program when detecting that the data to be displayed corresponding to the application program changes, wherein the difference data represents the change of the data to be displayed; the determining module is used for determining at least one view model corresponding to the front-end display code, wherein the at least one view model is used for separating the business logic code of the application program from the front-end display code of the application program; and the updating module is used for updating the business logic codes according to the at least one view model and the difference data.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is configured to perform the above-described data processing method when run.
According to another aspect of an embodiment of the present invention, there is also provided an electronic device including one or more processors; and a storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a method for running the program, wherein the program is arranged to perform the data processing method as described above when run.
In the embodiment of the invention, a mode of separating a service logic code and a front-end display code of an application program through a view model is adopted, and when the change of data to be displayed corresponding to the application program is detected, the difference data corresponding to the front-end display code of the application program is obtained, wherein the difference data represents the change of the data to be displayed; determining at least one view model corresponding to the front-end display code, wherein the at least one view model is used for separating the business logic code of the application program from the front-end display code of the application program; and updating the business logic code according to the at least one view model and the difference data.
In the process, when the data to be displayed corresponding to the application program changes, the difference data corresponding to the display code at the front end of the application program is obtained, wherein the difference data represents the change of the data to be displayed, so that when the data to be displayed changes, all the front end display codes and business logic codes are not required to be updated, only the codes of the corresponding parts of the difference data are required to be updated, and the updating efficiency is improved. In addition, by introducing the view model, the separation of the service logic code and the front-end display code of the application program is realized, the coupling between the two codes is relieved, and by using the view model, technicians can respectively process the service logic code and the front-end display code, so that the problems of poor maintainability, readability and expansibility of the application program and low development efficiency of a developer caused by incapability of separating the display logic from the service logic are avoided.
Therefore, the scheme provided by the application achieves the aim that the front-end display codes and the business logic codes cannot be directly interacted and associated with each other, so that the technical effects of reducing development cost and improving maintainability and expansibility of an application program are achieved, and the technical problem that display logic and business logic cannot be completely separated in the existing application program is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a flow chart of a method of data processing according to an embodiment of the invention;
FIG. 2 is a flow chart of a method of differential data acquisition according to an embodiment of the present invention;
FIG. 3 is a flow chart of a method of data processing according to an embodiment of the invention;
fig. 4 is a flow chart of a method of business logic code modification in accordance with an embodiment of the present invention.
Fig. 5 is a schematic diagram of an apparatus for data processing according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
According to an embodiment of the present invention, there is provided a data processing method embodiment, it being noted that the steps shown in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order different from that herein.
In addition, it should be noted that the data processing method provided in the present embodiment may be applied to an electronic device, where the electronic device may be, but is not limited to, a notebook computer, a desktop computer, a smart tablet, a smart phone, and the like. In addition, the electronic device includes one or more processors, and the processors may be used as execution bodies for executing the methods provided in this embodiment.
FIG. 1 is a flow chart of a data processing method according to an embodiment of the present invention, as shown in FIG. 1, the method comprising the steps of:
step S102, when detecting that the data to be displayed corresponding to the application program changes, obtaining difference data corresponding to front-end display codes of the application program, wherein the difference data represents the change of the data to be displayed.
In step S102, when detecting that the data to be displayed corresponding to the application program changes, difference data corresponding to the front-end display code of the application program is obtained. Alternatively, the change of the data to be displayed may be a change of the data to be displayed caused by the user operating the application program, for example, a modification of login information of the game player in the game login interface; the change of the data to be displayed may also be a data change caused by the modification of the data to be displayed by the operation performed by the user, for example, the game player purchases props according to the game prompt, and the prop purchase interface is displayed in the game interface, so that the number and/or type of props in the prop library of the game player are changed. In addition, the front-end presentation code may represent an interface for a user to interact with an application program that has behavioral attributes associated with the business logic code, and the difference data is a portion of the code in the front-end presentation code that characterizes changes that occur to the data to be presented.
In the process, by acquiring the difference data, when the data to be displayed corresponding to the application program changes, all front-end display codes and business logic codes do not need to be recorded, only codes corresponding to the difference data need to be identified and recorded, and then corresponding updating is carried out, so that resources are saved greatly.
Step S104, determining at least one view model corresponding to the front-end display code, wherein the at least one view model is used for separating the business logic code of the application program and the front-end display code of the application program.
In step S104, in the present embodiment, the view model is a bridge between the front-end presentation code and the business logic code of the application program. Alternatively, the view model may identify all user events in the front-end presentation code received by the application program, and adjust the business logic code based on the user events. Meanwhile, the view model can also access methods in the business logic codes, call functions in the business logic codes, and notify the front-end display codes to update correspondingly after processing the data.
In addition, the business logic code may represent real-time data in the development of the application program, for example, personal information related to the name, mailbox, telephone, etc. of the user in the development of the application program may be represented by the business logic code. Meanwhile, business logic code reflects real-time data, and does not reflect features and functions related to an application program, and a developer cannot manipulate to represent or format the real-time data.
Therefore, in the process, the separation of the service logic code and the front-end display code of the application program is realized by introducing the view model, so that the problems of poor maintainability, readability and expansibility of the application program and low development efficiency of a developer caused by incapability of separating the display logic from the service logic are avoided.
And step S106, updating the business logic codes according to at least one view model and the difference data.
In step S106, the service logic code is updated accordingly according to the view model and the difference data, where it can be known, according to the difference data, which part of code the service logic code to be updated is, and according to the view model, the service logic code can be updated accordingly without being affected by the front end display code.
Therefore, in step S106, when the data to be displayed corresponding to the application program changes, only the business logic code of the portion corresponding to the difference data needs to be updated, so that the updating efficiency is improved, and the maintainability and expansibility of the application program are improved because the front-end display code cannot be affected.
Based on the above-mentioned schemes defined in step S102 to step S106, it can be known that, in the implementation of the present invention, by adopting a manner of separating the service logic code and the front-end display code of the application program, when detecting that the data to be displayed corresponding to the application program changes, the difference data corresponding to the front-end display code of the application program is obtained, where the difference data represents the change of the data to be displayed; determining at least one view model corresponding to the front-end display code, wherein the at least one view model is used for separating the business logic code of the application program from the front-end display code of the application program; and updating the business logic code according to the at least one view model and the difference data.
It is easy to note that in the above process, when the data to be displayed corresponding to the application program changes, the difference data corresponding to the display code at the front end of the application program is obtained, where the difference data represents the change of the data to be displayed, so that when the data to be displayed changes, all the front end display codes and business logic codes do not need to be updated, only the codes at the corresponding part of the difference data need to be updated, and the updating efficiency is improved. In addition, by introducing the view model, the separation of the service logic code and the front-end display code of the application program is realized, so that the problems of poor maintainability, readability and expansibility of the application program and low development efficiency of a developer caused by incapability of separating the display logic and the service logic are avoided.
Therefore, the scheme provided by the application achieves the purposes of changing the front-end logic code and not directly influencing the business logic code, thereby realizing the technical effects of improving the maintainability, the readability and the expansibility of software and the development efficiency, and further solving the technical problem that the display logic and the business logic cannot be completely separated in the existing application program.
In an alternative embodiment, when the processor detects that the data to be displayed corresponding to the application program changes, the processor obtains difference data corresponding to the front-end display code of the application program. As shown in fig. 2, the method for acquiring the difference data may include the following steps:
step S202, when a processor detects a modification operation of data to be displayed of an application program, a modification instruction is generated;
step S204, modifying the data to be displayed according to the modification instruction to obtain modified data;
step S206, determining difference data obtained by modifying the front-end display code of the application program according to the modification data.
It should be noted that, the modification operation of the data to be displayed may be an operation behavior of a user, for example, modifying a login nickname of an application program, performing font adjustment, background color adjustment, and the like on a display interface of the application program.
It is easy to note that, through the above-mentioned process, when the data that wait to demonstrate changes, the processor only records the difference data of the front end demonstration code that the part that changes corresponds, to the part that does not change, can not acquire, has realized resources are saved, the effect of improvement efficiency.
In an alternative embodiment, after obtaining the difference data corresponding to the front-end display code of the application program, the processor obtains the front-end display code corresponding to the data to be displayed, and determines a service type corresponding to the front-end display code, where the service type corresponds to a view type of at least one view model, so as to determine at least one view model corresponding to the data to be displayed according to the service type.
It should be noted that, the service types corresponding to the front-end display code may be different display service contents represented by the front-end display code, for example, as shown in fig. 3, the service type 1 represented by the first front-end display code may be an application login interface display, and the service type 2 represented by the second front-end display code may be a font and a background color of an application display interface. In addition, the view model corresponding to the data to be displayed is determined according to the service type, which may be that a plurality of service types correspond to the same view model, or each service type corresponds to one view model, or one service type corresponds to a plurality of view models.
It is easy to note that in the above process, as different front end display codes represent different service types, and then view types are correspondingly determined according to different service types, the processing mode is flexible and changeable, the expandability and operability of application program development are greatly improved, so that technicians are more flexible in the development process, and the development efficiency is improved.
In an alternative embodiment, when the processor determines at least one view model corresponding to the data to be displayed according to the service type, if the data to be displayed corresponds to a plurality of front-end display codes and the service types of the front-end display codes are the same, the service type of the front-end display codes is determined to be a target service type, and the view model corresponding to the target service type is determined to be a target view model corresponding to the data to be displayed.
As shown in fig. 3, the data to be displayed corresponds to a first front end display code and a second front end display code respectively, if the service type 1 of the first front end display code and the service type 2 of the second front end display code are the same, for example, are both login interface displays in an application program, at this time, the service types of the first front end display code and the second front end display code are determined to be target service types, and the view model corresponding to the target types is determined to be the target view model corresponding to the data to be displayed.
It is easy to see that through the above process, when the service types of the plurality of front-end display codes are the same, the same view model can be selected as the target view model, that is, one view model simultaneously processes the plurality of front-end display codes with the same service type, thereby realizing the multiple utilization of one view model, reducing the development cost of the view model and improving the development efficiency.
In an alternative embodiment, when the processor determines at least one view model corresponding to the data to be displayed according to the service type, if the data to be displayed corresponds to a plurality of front-end display codes and the service types of the plurality of front-end display codes are different, at this time, the service type corresponding to each front-end display code is obtained, and the service type corresponding to each front-end display code is determined to be a plurality of view models corresponding to the data to be displayed.
As shown in fig. 3, the data to be displayed corresponds to the first front end display code and the second front end display code respectively, if the service types of the first front end display code and the second front end display code are different, for example, the service type corresponding to the first front end display code is service type 1, the service type corresponding to the second front end display code is service type 2, at this time, the view model corresponding to the service type 1 is determined to be the view model 1 corresponding to the part of the data to be displayed corresponding to the first front end display code, the view model corresponding to the service type 2 is determined to be the view model 2 corresponding to the part of the data to be displayed corresponding to the second front end display code, that is, the view models in fig. 3 should be 2 view models, namely, the view model 1 and the view model 2 respectively, and the view model shown in fig. 3 is only an example, and the view model may be multiple according to practical situations.
It is easy to note that through the above-mentioned process, when the business types of a plurality of front end display codes are different, can handle the front end display codes of different grade type respectively through a plurality of view models, refine the handling process, more pertinence is difficult to confuse, and the developer does not need too much censoring code in the development process, can adapt to the scene that business types are more better.
It should be noted that, when a front-end display code displays multiple service types, it may correspond to multiple view models, for example, a front-end display code displays service type 1 and service type 2, where service type 1 corresponds to view model 1 and service type 2 corresponds to view model 2, and at this time, the view model corresponding to the data to be displayed corresponding to the front-end display code is view model 1 and view model 2, that is, the front-end processing code may be processed by combining view model 1 and view model 2. When the development of the front-end display code with complex processing is realized, a technician can process the front-end display code through the existing view model combination, so that the reusability of the code is improved, the development efficiency is greatly improved, and the development cost is reduced.
In an alternative embodiment, when the processor updates the business logic code according to at least one view model and the difference data, the processor sends the difference data to the data module through the view model, wherein the data module is used for running the business logic code, and further updates the business logic code according to the difference data in the data module.
As shown in fig. 3, after the processor obtains the difference data corresponding to the front-end display code of the application program and determines at least one view model corresponding to the front-end display code, the processor sends the difference data to the data module through the view model, and because the service logic code operates in the data module, in order to maintain consistency of the front-end display code and the service logic code, the service logic code is updated in the data module according to the difference data.
It is easy to notice that the data module updates the business logic code according to the difference data, so that on one hand, the consistency of the whole application program code library is ensured, and the stability of the application program is maintained, which is very important for the development of the application program, on the other hand, the data module only updates the business logic code aiming at the part corresponding to the difference data, and does not need to update and adjust the whole business logic code, thereby saving a great amount of resources and time and improving the processing efficiency of developers.
In addition, it should be noted that in the application, the difference data is sent to the data module through the view model to update the service logic code, instead of directly sending the front end display code to the data module, so that the coupling problem of the front end display code and the service logic code is realized, meanwhile, the front end display code and the service logic code can be independently tested after being respectively updated, the testability of the application program is improved, and the processing efficiency of testers is improved.
In an alternative embodiment, as shown in fig. 4, when the processor detects that the service logic code changes, the data to be displayed at the front end may be modified according to the change of the service logic code, as shown in fig. 4, and the process may include the following steps:
step S402, when detecting that the business logic code changes, obtaining the changed business logic code;
step S404, determining a target view model according to the service type corresponding to the changed service logic code;
step S406, modifying the data to be displayed through the target view model and the changed business logic code;
step S408, displaying the modified data to be displayed.
Alternatively, the service logic code in the above process may be modified by a developer, for example, simplifying the purchasing process of the game prop or modifying the skill of the game character.
It should be noted that, in conjunction with the illustration of fig. 3, the change of the service logic code in the data module does not directly affect the data to be displayed, but the difference data generated according to the change of the service logic code and the service type 3 corresponding to the difference data determine the target view model from at least one view model, and update the front-end display code through the target view model, so as to modify the data to be displayed, so that on the basis of separating the service logic code from the front-end display code, technicians can modify and test the service logic code and the front-end display code respectively, and finally ensure the consistency of the whole code of the application program, and improve the development efficiency.
According to the scheme provided by the application, the front-end display code and the service logic code are separated by utilizing the view model, and the view model is determined by combining the service type corresponding to the code, so that maintainability and expansibility of an application program are improved, independent testing is facilitated, development cost is reduced, and the problem that display logic and service logic cannot be completely separated in the existing application program is solved.
Example 2
There is further provided, according to an embodiment of the present invention, an embodiment of a data processing apparatus, where fig. 5 is a schematic diagram of the data processing apparatus according to an embodiment of the present invention, and as shown in fig. 5, the apparatus includes: an acquisition module 301, a determination module 303 and an update module 305.
The acquiring module 301 is configured to acquire, when detecting that data to be displayed corresponding to an application program changes, difference data corresponding to a front-end display code of the application program, where the difference data represents changes occurring in the data to be displayed; the determining module 303 is configured to determine at least one view model corresponding to a front-end presentation code, where the at least one view model is configured to separate a business logic code of an application program from the front-end presentation code of the application program; an updating module 305, configured to update the business logic code according to the at least one view model and the difference data.
It should be noted that the above-mentioned obtaining module 301, determining module 303, and updating module 305 correspond to steps S102 to S106 in the above-mentioned embodiment, and the three modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to those disclosed in the above-mentioned embodiment 1.
Optionally, the data processing apparatus further includes: the device comprises a detection module, a modification module and a first determination module. The detection module is used for generating a modification instruction when detecting modification operation of data to be displayed of the application program; the modification module is used for modifying the data to be displayed according to the modification instruction to obtain modified data; and the first determining module is used for determining difference data obtained by modifying the front-end display code of the application program according to the modification data.
Optionally, the data processing apparatus further includes: the device comprises a first acquisition module, a second determination module and a third determination module. The first acquisition module is used for acquiring a front-end display code corresponding to data to be displayed; the second determining module is used for determining a service type corresponding to the front-end display code, wherein the service type corresponds to the view type of at least one view model; and the third determining module is used for determining at least one view model corresponding to the data to be displayed according to the service type.
Optionally, the data processing apparatus further includes: the fourth determining module and the fifth determining module. The fourth determining module is configured to determine, when the data to be displayed corresponds to a plurality of front-end display codes and service types of the plurality of front-end display codes are the same, that the service types of the plurality of front-end display codes are target service types; and a fifth determining module, configured to determine that the view model corresponding to the target service type is a target view model corresponding to the data to be displayed.
Optionally, the data processing apparatus further includes: the second acquisition module and the sixth determination module. The second acquisition module is used for acquiring the service type corresponding to each front-end display code when the data to be displayed corresponds to a plurality of front-end display codes and the service types of the plurality of front-end display codes are different; and a sixth determining module, configured to determine a view model corresponding to a service type corresponding to each front-end display code as multiple target view models corresponding to data to be displayed.
Optionally, the data processing apparatus further includes: a transmitting module and a first updating module. The sending module is used for sending the difference data to the data module through the view model, wherein the data module is used for running the business logic code; and the first updating module is used for updating the business logic codes in the data module according to the difference data.
Optionally, the data processing apparatus further includes: the display device comprises a first detection module, a seventh determination module, a first modification module and a display module. The first detection module is used for acquiring the changed business logic code when detecting that the business logic code is changed; a seventh determining module, configured to determine a target view model according to a service type corresponding to the changed service logic code; the first modification module is used for modifying the data to be displayed through the target view model and the changed business logic code; and the display module is used for displaying the modified data to be displayed.
By the data processing device, the view model is used for separating the front-end display code and the service logic code and determining the view model by combining the service type corresponding to the code, so that maintainability and expansibility in the development process of an application program are improved, independent testing is facilitated, development cost is reduced, and the problem that display logic and service logic cannot be completely separated in the existing application program is solved.
Example 3
According to another aspect of the embodiments of the present invention, there is also provided a storage medium having stored therein a computer program, wherein the computer program is configured to execute the data processing method in the above embodiment 1 when running.
Example 4
According to another aspect of an embodiment of the present invention, there is also provided an electronic device including one or more processors; and a storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a method for running the program, wherein the program is configured to perform the data processing method in embodiment 1 described above when run.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (8)

1. A method of data processing, comprising:
when detecting that the data to be displayed corresponding to an application program changes, obtaining difference data corresponding to front-end display codes of the application program, wherein the difference data represents the change of the data to be displayed;
determining at least one view model corresponding to the front-end display code, wherein the at least one view model is used for separating business logic codes of the application program from the front-end display code of the application program;
updating the business logic code according to the at least one view model and the difference data;
wherein updating the business logic code according to the at least one view model and the difference data comprises:
the difference data are sent to a data module through a view model, wherein the data module is used for running the business logic codes;
updating the business logic code in the data module according to the difference data;
when the service logic code is detected to change, acquiring the changed service logic code;
determining a target view model according to the service type corresponding to the changed service logic code;
modifying the data to be displayed through the target view model and the changed business logic codes;
and displaying the modified data to be displayed.
2. The method of claim 1, wherein obtaining difference data corresponding to front-end presentation code of the application program comprises:
when detecting the modification operation of the data to be displayed of the application program, generating a modification instruction;
modifying the data to be displayed according to the modification instruction to obtain modified data;
and determining difference data obtained by modifying the front-end display code of the application program according to the modification data.
3. The method of claim 1, wherein determining at least one view model to which the front-end presentation code corresponds comprises:
acquiring a front-end display code corresponding to the data to be displayed;
determining a service type corresponding to the front-end display code, wherein the service type corresponds to a view type of the at least one view model;
and determining at least one view model corresponding to the data to be displayed according to the service type.
4. A method according to claim 3, wherein determining at least one view model corresponding to the data to be presented according to the service type comprises:
when the data to be displayed corresponds to a plurality of front-end display codes and the service types of the front-end display codes are the same, determining that the service type of the front-end display codes is a target service type;
and determining the view model corresponding to the target service type as the target view model corresponding to the data to be displayed.
5. A method according to claim 3, wherein determining at least one view model corresponding to the data to be presented according to the service type comprises:
acquiring a service type corresponding to each front-end display code when the data to be displayed corresponds to a plurality of front-end display codes and the service types of the plurality of front-end display codes are different;
and determining a view model corresponding to the service type corresponding to each front-end display code as a plurality of target view models corresponding to the data to be displayed.
6. A data processing apparatus, comprising:
the acquisition module is used for acquiring difference data corresponding to front-end display codes of the application program when detecting that the data to be displayed corresponding to the application program changes, wherein the difference data represents the change of the data to be displayed;
the determining module is used for determining at least one view model corresponding to the front-end display code, wherein the at least one view model is used for separating the business logic code of the application program from the front-end display code of the application program;
the updating module is used for updating the business logic codes according to the at least one view model and the difference data;
wherein the data processing device further comprises: the sending module is used for sending the difference data to the data module through a view model, wherein the data module is used for running the business logic code; the first updating module is used for updating the business logic code according to the difference data in the data module; the first detection module is used for acquiring the changed business logic code when detecting that the business logic code is changed; a seventh determining module, configured to determine a target view model according to a service type corresponding to the changed service logic code; the first modification module is used for modifying the data to be displayed through the target view model and the changed business logic codes; and the display module is used for displaying the modified data to be displayed.
7. A storage medium having a computer program stored therein, wherein the computer program is arranged to perform the data processing method of any of claims 1 to 5 when run.
8. An electronic device, the electronic device comprising one or more processors; storage means for storing one or more programs which when executed by the one or more processors cause the one or more processors to implement a method for running a program, wherein the program is arranged to perform the data processing method of any of claims 1 to 5 when run.
CN202110706010.7A 2021-06-24 2021-06-24 Data processing method, device, storage medium and electronic equipment Active CN113434173B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110706010.7A CN113434173B (en) 2021-06-24 2021-06-24 Data processing method, device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110706010.7A CN113434173B (en) 2021-06-24 2021-06-24 Data processing method, device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113434173A CN113434173A (en) 2021-09-24
CN113434173B true CN113434173B (en) 2023-06-09

Family

ID=77754026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110706010.7A Active CN113434173B (en) 2021-06-24 2021-06-24 Data processing method, device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113434173B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113568604B (en) * 2021-09-26 2022-01-07 深圳万顺叫车云信息技术有限公司 Method and device for updating wind control strategy and computer readable storage medium
CN114036781B (en) * 2022-01-04 2022-05-06 阿里云计算有限公司 Data processing method, data display method and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582310A (en) * 2018-11-30 2019-04-05 北京微播视界科技有限公司 Data processing method, device, electronic equipment and computer readable storage medium
CN109766098A (en) * 2019-01-09 2019-05-17 腾讯科技(深圳)有限公司 Operation method, equipment and the storage medium of application program
CN110187931A (en) * 2019-05-17 2019-08-30 北京百度网讯科技有限公司 The operation method and device of small routine
CN110609728A (en) * 2019-09-25 2019-12-24 北京字节跳动网络技术有限公司 Page generation method and device and electronic equipment
CN112000911A (en) * 2020-07-08 2020-11-27 北京达佳互联信息技术有限公司 Page management method and device, electronic equipment and storage medium
CN112433723A (en) * 2020-11-05 2021-03-02 深圳市明源云科技有限公司 Personalized list development method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8429597B2 (en) * 2008-11-21 2013-04-23 Sap Ag Software for integrated modeling of user interfaces with applications

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582310A (en) * 2018-11-30 2019-04-05 北京微播视界科技有限公司 Data processing method, device, electronic equipment and computer readable storage medium
CN109766098A (en) * 2019-01-09 2019-05-17 腾讯科技(深圳)有限公司 Operation method, equipment and the storage medium of application program
CN110187931A (en) * 2019-05-17 2019-08-30 北京百度网讯科技有限公司 The operation method and device of small routine
CN110609728A (en) * 2019-09-25 2019-12-24 北京字节跳动网络技术有限公司 Page generation method and device and electronic equipment
CN112000911A (en) * 2020-07-08 2020-11-27 北京达佳互联信息技术有限公司 Page management method and device, electronic equipment and storage medium
CN112433723A (en) * 2020-11-05 2021-03-02 深圳市明源云科技有限公司 Personalized list development method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
DDMVVM:领域驱动的MVVM设计模型研究;王跃;《数字技术与应用》;第36卷(第03期);113-115 *

Also Published As

Publication number Publication date
CN113434173A (en) 2021-09-24

Similar Documents

Publication Publication Date Title
CN109471653B (en) Application program updating method, electronic device, server and storage medium
CN107368410B (en) Performance test method and device of game engine, storage medium and electronic device
CN113434173B (en) Data processing method, device, storage medium and electronic equipment
US8601449B2 (en) Cross-platform application framework
CN110992092B (en) Advertisement delivery detection method and device, electronic equipment and storage medium
CN109966742B (en) Method and device for acquiring rendering performance data in game running
CN110196809B (en) Interface testing method and device
CN112148580B (en) Test method and device and electronic equipment
US20150186195A1 (en) Method of analysis application object which computer-executable, server performing the same and storage media storing the same
CN101739515A (en) Game generation control method and system
CN106358059A (en) Multimedia information processing method, equipment and system
CN113157345A (en) Automatic starting method and device for front-end engineering
CN112463634A (en) Software testing method and device under micro-service architecture
CN108762757B (en) Quick development framework and method for platform service of live broadcast room, server and medium
CN114092590B (en) Electronic device and evaluation method and medium for image rendering performance of electronic device
CN108390916B (en) Picture downloading method and terminal
CN115904167A (en) Processing method and device of webpage icon, storage medium and electronic equipment
CN115599401A (en) Publishing method, device, equipment and medium of user-defined model
CN115330445A (en) Page display method and device, storage medium and computer equipment
CN111459484B (en) Method for simulating back-end data during separate development of front end and back end of webpage
CN113268221A (en) File matching method and device, storage medium and computer equipment
CN112114845A (en) Method and device for processing gray scale message, storage medium and computer equipment
CN115495303A (en) Frame rate processing method, device, storage medium and terminal
CN106802856A (en) The performance test methods of game application, server and game application client
CN112188177A (en) Screen-splash prevention method, terminal device 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
GR01 Patent grant
GR01 Patent grant