CN116719874A - MVC architecture-based data unification system, method, equipment and storage medium - Google Patents
MVC architecture-based data unification system, method, equipment and storage medium Download PDFInfo
- Publication number
- CN116719874A CN116719874A CN202310988839.XA CN202310988839A CN116719874A CN 116719874 A CN116719874 A CN 116719874A CN 202310988839 A CN202310988839 A CN 202310988839A CN 116719874 A CN116719874 A CN 116719874A
- Authority
- CN
- China
- Prior art keywords
- date
- layer
- data
- format
- interface
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000006243 chemical reaction Methods 0.000 claims abstract description 89
- 238000004891 communication Methods 0.000 claims abstract description 9
- 238000004590 computer program Methods 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 8
- 230000003993 interaction Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 4
- VYPSYNLAJGMNEJ-UHFFFAOYSA-N Silicium dioxide Chemical compound O=[Si]=O VYPSYNLAJGMNEJ-UHFFFAOYSA-N 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000007935 neutral effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/258—Data format conversion from or to a database
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/252—Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/541—Interprogram communication via adapters, e.g. between incompatible applications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/545—Interprogram communication where tasks reside in different layers, e.g. user- and kernel-space
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application relates to the technical field of data processing and discloses a data unification system, a method, equipment and a storage medium based on an MVC framework, wherein the system comprises a view layer, a model layer and an application layer, the view layer is in communication connection with the application layer through an interface layer, and the model layer is in communication connection with the application layer; the application layer is used for executing the application program and comprises a date conversion interface, wherein the date conversion interface is used for receiving date data from the model layer and converting the date data into a standard date format of a data unified system based on the MVC architecture; the method comprises the steps that date data in a standard date format are sent to an interface layer through a date conversion interface, and a view layer obtains the date data in the standard date format through the interface of the interface layer; when the application layer receives date data in a standard date format from the view layer and a writing request of the date data, the date data in the standard date format is converted into original date data, and the original date data is stored in the model layer. And the date data processing results are unified.
Description
Technical Field
The present application relates to the field of data processing, and in particular, to a data unifying system, method, device, and storage medium based on an MVC architecture.
Background
With the continuous increase of enterprise business of companies and the expansion of overseas markets, the number of customers of overseas teams and across-country teams is increased, and a certain time zone conversion problem exists when customers in different areas use the same system. The time and date display formats supported by the equipment are different from the equipment in different areas, and the time zone conversion problem is added, so that the system time display errors are easy to cause, and the data access requirements of different equipment are different.
Disclosure of Invention
In a first aspect, the present application provides a data unification system based on MVC architecture, comprising: view layer, interface layer, model layer and application layer;
the view layer is in communication connection with the application layer through the interface layer, and the model layer is in communication connection with the application layer;
the application layer is used for executing application programs;
the application layer comprises a date conversion interface, wherein the date conversion interface is used for receiving date data from the model layer and converting the date data into a standard date format of the data unification system based on the MVC architecture;
the date data in the standard date format is sent to the interface layer through the date conversion interface, and the view layer acquires the date data in the standard date format through the interface layer interface;
when the application layer receives date data in a standard date format from the view layer and a writing request of the date data, the date data in the standard date format is converted into the original date data through the date conversion interface, and the original date data is stored in the model layer.
Further, the date conversion interface comprises a first interface and a second interface;
if the view layer or the device of the interface layer is compatible with the standard date format, the application layer processes date data interacted by the view layer and the interface layer through the first interface;
and if the view layer or the device of the interface layer is not compatible with the standard date format, the application layer processes date data interacted by the view layer and the interface layer through the second interface.
Further, the format of the original date data comprises a time stamp format and a year, month and day format;
the format conversion of the original date data through the date conversion interface comprises the following steps:
the date conversion interface carries out format conversion on the date data in the timestamp format through coordination of world time to form a first conversion date, and removes time-minute-second related content in the first conversion date to obtain the date data in the year, month and day format.
In a second aspect, the present application further provides a data unification method based on an MVC architecture, which is applied to a data unification system based on an MVC architecture, where the data unification system based on an MVC architecture includes a view layer, a model layer, an interface layer, and an application layer, and the method includes:
when receiving a date request from the view layer, acquiring original date data from the model layer;
performing format conversion on the original date data through a date conversion interface to form a standard date format of the data unification system based on the MVC architecture;
the date data in the standard date format is sent to the interface layer through the date conversion interface, and the view layer acquires the date data in the standard date format through the interface layer interface;
when receiving date data in a standard date format and a writing request of the date data from the view layer, converting the date data in the standard date format into the original date data through the date conversion interface, and storing the original date data into the model layer.
Further, the format of the original date data comprises a time stamp format and a year, month and day format;
the format conversion of the original date data through the date conversion interface comprises the following steps:
the date conversion interface carries out format conversion on the date data in the timestamp format through coordination of world time to form a first conversion date, and removes time-minute-second related content in the first conversion date to obtain the date data in the year, month and day format.
Further, the standard date format is the year, month and day format, and the format of the original date data is the timestamp format.
Further, the converting the date data in the standard date format into the original date data includes:
and the date conversion interface converts the date data in the year, month and day format by adding the local time to the date data in the year, month and day format and then coordinating the world time to obtain the date data in the time stamp format.
Further, the date conversion interface comprises a first interface and a second interface;
if the equipment of the view layer is compatible with the standard date format, converting the original date data from the model layer through the first interface and sending the converted original date data to the equipment of the view layer;
and if the equipment of the view layer is not compatible with the standard date format, converting the original date data from the model layer through the second interface and sending the converted original date data to the equipment of the view layer.
In a third aspect, the present application also provides a computer device, including a processor and a memory, where the memory stores a computer program that, when run on the processor, performs the MVC architecture based data unification method.
In a fourth aspect, the present application also provides a readable storage medium storing a computer program which, when run on a processor, performs the MVC architecture based data unification method.
The application discloses an MCV architecture system, a data unification method based on an MVC architecture, a computer device and a storage medium, wherein the method is applied to the data unification system based on the MVC architecture, and the data unification system based on the MVC architecture comprises the following steps: view layer, interface layer, model layer and application layer; the view layer is in communication connection with the application layer through the interface layer, and the model layer is in communication connection with the application layer; the application layer is used for executing application programs; the application layer comprises a date conversion interface, wherein the date conversion interface is used for receiving date data from the model layer and converting the date data into a standard date format of the data unification system based on the MVC architecture; the view layer and the interface layer acquire date data in the standard date format from the application layer through respective communication interfaces; when the application layer receives date data in a standard date format from the view layer or the interface layer, the date data are converted into the original date data through the date conversion interface, and the original date data are stored in the model layer. In the data unifying system based on the MVC architecture, date data can be specially converted by the date conversion interface, so that date data processing results of different areas are unified, and errors cannot occur.
Drawings
In order to more clearly illustrate the technical solutions of the present application, the drawings that are required for the embodiments will be briefly described, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope of the present application. Like elements are numbered alike in the various figures.
FIG. 1 shows a schematic structural diagram of a data unification system based on an MVC architecture according to an embodiment of the present application;
fig. 2 shows a flowchart of a data unifying method based on MVC architecture according to an embodiment of the present application;
FIG. 3 is a flow chart of an MVC architecture-based data unification method according to an embodiment of the present application;
FIG. 4 is a schematic diagram showing interaction of date data according to an embodiment of the present application;
fig. 5 shows a schematic diagram of a computer device for MVC architecture according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments.
The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application.
The terms "comprises," "comprising," "including," or any other variation thereof, are intended to cover a specific feature, number, step, operation, element, component, or combination of the foregoing, which may be used in various embodiments of the present application, and are not intended to first exclude the presence of or increase the likelihood of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing.
Furthermore, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of the application belong. The terms (such as those defined in commonly used dictionaries) will be interpreted as having a meaning that is the same as the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in connection with the various embodiments of the application.
The technical scheme of the application is that the method for unifying data based on the MVC architecture is realized in a system of the MVC architecture, namely, the method for unifying display and storage of time and date of different equipment in different areas is realized, the unified date conversion interface is arranged in the application layer, when the application layer receives date data, the date data are converted, and then the date data are sent to the corresponding view layer or model layer, so that the reading and writing operation of the date data is completed, the date conversion is completed in the application layer, the date conversion is not required to be carried out by equipment of the view layer or interface layer, and the problem of data disorder caused by non-uniform time formats in different areas and different time zones is avoided.
The technical scheme of the application is described in the following specific embodiments.
Example 1
As shown in fig. 1, the structure of the data unifying system based on the MVC architecture in this embodiment is schematically shown, and MVC is a software design pattern, which is an abbreviation of Model-View-Controller, where the Controller is also an interface layer in this embodiment.
The MVC architecture-based data unification system of the present embodiment includes a view layer 100, an interface layer 200, an application layer 300, and a model layer 400.
View layer 100 refers to an interface that a user sees and interacts with. Such as a web interface consisting of html elements, or a client interface of software, the date data may need to be displayed in the view layer 100. At the same time, the view layer 100 also needs to run on the corresponding display device, and in an actual running scenario, the compatibility of the device also affects the use situation.
The interface layer 200, also called the controller, accepts only user input and invokes the model and view to fulfill the user's needs, the controller itself does nothing and does anything. It simply receives the request and decides which model component to invoke to process the request and then determines which view to use to display the returned data.
Model layer 400 refers to the model representation business rules. Among the three components of MVC, the model has the most processing tasks. The data returned by the model is neutral, the model is independent of the data format, so that one model can provide data for multiple views, and code applied to the model can be reused by multiple views only by being written once, so that code repeatability is reduced.
The application layer 300 refers to the portion of the program and data in the actual execution model layer 400.
The system under the architecture can support multiple persons to use the same code for task processing.
The view layer 100 is communicatively coupled to the application layer via the interface layer 200, and the model layer is communicatively coupled to the application layer 300.
The application layer 300 is configured to execute application programs, which are actual business programs and run according to actual usage scenarios.
The application layer 300 includes a date conversion interface 310, where the date conversion interface 310 is configured to receive date data from the model layer and convert the date data into a standard date format of the data unifying system based on MVC architecture.
If the devices at the interface layer 200 and the view layer 100 need to acquire the time, an application needs to be initiated to the application layer, the application layer acquires corresponding date data from the model layer according to the application, the acquired date data is converted by the date conversion interface 310 into date data in a standard date format, and then the date data in the standard date format is uniformly transmitted to the view layer 100 and the interface layer 200.
The date data in the standard date format is sent to the interface layer 200 through the date conversion interface, and the view layer 100 obtains the date data in the standard date format through the interface layer interface;
further, the date conversion interface includes a first interface and a second interface. The first interface and the second interface are software interfaces, and a user receives and converts corresponding date data.
If the view layer 100 and the interface layer 200 are compatible with the standard date format, the date data interacted with by the view layer and the interface layer is converted by the first interface.
And if the view layer and the interface layer are not compatible with the standard date format, converting date data interacted with by the view layer and the interface layer through the second interface.
When the application layer 300 receives date data in a standard date format and a writing request of the date data from the view layer 100, the date data in the standard date format is converted into the original date data through the date conversion interface, and the original date data is stored in the model layer 400.
Next, a specific execution flow of the system will be described.
As shown in fig. 2, the data unification method based on the MVC architecture of the present embodiment includes:
step S100, when the application layer receives a date request from the view layer, acquiring original date data from the model layer;
the view layer 100 presents an operation interface of the application to the user, the user performs corresponding operation through the interface layer 200, interacts with the application layer 300, and the application layer 300 invokes data or programs in the model layer 400 to feed back the interactive operation of the user. Model layer 400 corresponds to a server that can be used to store data and programs.
It will be appreciated that the system under this architecture is a system architecture that supports different network environments around the world, different device types and different personas to use the same system program, and share the same database resources, and because of this, various compatibility problems may occur only from device to device, such as various incompatibility problems due to different time zones and device configurations on the date in this embodiment.
For this reason, based on the MVC architecture, in the present embodiment, the format of date data used for each layer is normalized to a standard date format, such as:
view layer (View): the date format of the character string in YYYY-MM-DD (for example: 2006-02-03).
Interface layer (Controller): the date format of the character string in YYYY-MM-DD (for example: 2006-02-03).
Wherein Y is a number indicating year, M is a number indicating month, and D is a number indicating day.
Model layer (Model): a 16-bit time stamp format of the shaped number, (e.g., 1685448000000000).
As can be seen, at least two formats exist for the date data, for normalized display, the date format of the character string is used as the standard date format in this embodiment, and for the model layer 400, it is mainly used for storing time, and the model layer 400 does not need to display time to the user, so the model layer 400 stores time in the timestamp format, and the timestamp format is the original date data.
The application layer 300 is a location for implementing various business processes, and is used for implementing interaction between the model layer 400 and the interface layer 200 as well as between the user layer 100 and the user layer 100, and when the user in the user layer 100 performs any front-end operation, the user interacts with the application layer 300 through the interface layer 200 to call a corresponding program or perform a writing operation, and the same is similar to the writing and reading operations of time.
The application layer 300 includes a date conversion interface 310, where the date conversion interface 310 is mainly used for converting date data.
When the view layer 100 needs to perform time display, a call application of date data is initiated to the application layer 300 through the interface layer 200, and at this time, the application layer 300 applies to the model layer 400 to obtain corresponding original time data.
The original time data at this time is in the format of a time stamp, and the format of the date data required for the view layer 100 is in the format of a date of a character string, so conversion is required.
In step S200, the application layer performs format conversion on the original date data through a date conversion interface to form a standard date format of the data unifying system based on MVC architecture.
In this embodiment, after receiving the date data, the application layer 300 gives the date data to the date conversion interface 310 for conversion operation.
Specifically, for date data in a timestamp format, a timestamp is converted into a format of YYYYY-MM-DD hh: MM: ss in a UTC (coordinated universal time) zero time zone, wherein hh: MM: ss represents time minutes and seconds, and then the time portion, i.e., hh: MM: ss is removed, and then the date portion (YYYY-MM-DD) is left, thereby completing the time conversion.
The time stamp is the number of seconds from 1970, 1 month and 1 day (00:00:00 GMT), so that a specific time length can be calculated according to the size of the time stamp, then the time division of the current time, namely the time of year, month and day, can be calculated on the basis of 1970, 1 month and 1 day, wherein the time division is not the data required in the standard date format, so that the time data in the required standard date format can be discarded after the current date is calculated, and then the time data in the required standard date format can be obtained.
For example, the time stamp is 0000001685448990, the time obtained after conversion is 2023-5-30:20:16:30, and then the "20:16:30" part is removed, so that the time data in the standard date format, namely 2023-5-30, is obtained.
And step S300, the date data in the standard date format is sent to the interface layer through the date conversion interface, and the view layer acquires the date data in the standard date format through the interface layer interface.
After the time data in the standard date format is calculated, the data needs to be fed back to the view layer 100 for display.
The application layer 300 feeds back the date data through the interface layer 200, when the view layer 100 receives the date data, the date data is already in a standard format, and at this time, the date data can be directly applied to display without the interface layer or the view layer for date conversion, without performing a conversion, so that the calculation problem caused by the difference of local equipment, time zone and the like is reduced.
Step S400, when the application layer receives date data in standard date format and a writing request of the date data from the view layer, the date data in standard date format is converted into the original date data through the date conversion interface, and the original date data is stored in the model layer.
Likewise, there is also a method of converting, when the application layer receives date data in a standard date format from the view layer, into the original date data through the date conversion interface, and storing the original date data in the model layer.
For example, the local time of the user is inconsistent with the time provided by the system, or operations related to time data such as some time points are set for some business reasons, where date data is written from the view layer 100 to the model layer 400, where the data stored in the model layer 400 is all data in a timestamp format, and the date data in a standard date format is input into the view layer 100, so when the application layer receives the date data from the view layer 100, the date conversion interface 310 is also used to perform date conversion.
When the date conversion interface converts standard date data, the date data in the time stamp format can be obtained by adding local time to the date data in the date format and then converting the date data in the date format by coordinating world time.
Specifically, for example, when the data sent from the view layer 100 to the application layer is 2023-5-30, and when the application layer processes the date, the application layer adds time content, that is, hh: mm: ss format time data, for example, 2023-5-30:12:00:00, and then the data can be converted into seconds, that is, 1682859600, the conversion of the time stamp is completed, and finally the date conversion interface sends the time stamp to the model layer 400, so that the writing operation on the time is completed.
In addition, in order to unify the reading, writing and displaying forms of the date, all devices of the view layer and the interface layer are adapted to date data in the standard date format, but because of numerous devices of the access system, devices incompatible with the date format are unavoidable, and in this regard, the date conversion interface of the present application comprises a first interface and a second interface.
As shown in fig. 3, the embodiment of the present application further includes the following steps:
step S500, if the device of the view layer is compatible with the standard date format, converting, by the first interface, the original date data from the model layer, and sending the converted data to the view layer.
The first interface is used for executing the conversion operation compatible with the standard date format, and if the view layer is compatible with the standard date format, the first interface is used for converting the original date data from the model layer and transmitting the converted data to the view layer. Or accepts date data from the view layer and converts it to original date data and then sends it to the model layer.
Step S600, if the device of the view layer is not compatible with the standard date format, converting, by the second interface, the original date data from the model layer, and sending the converted data to the view layer.
The second interface is used for executing the conversion operation of the incompatible standard date format, and if the view layer is incompatible with the standard date format, the second interface is used for converting the original date data from the model layer and transmitting the converted original date data to the view layer. Or accepts date data from the view layer and converts it to original date data and then sends it to the model layer.
And carrying out data interaction on the devices which are not compatible with the standard date format through the second interface, so as to ensure that the system can be compatible with the devices which cannot use the standard date format and normally display the time on the devices.
As shown in particular in fig. 4. The model layer may include a database or a server, and in this embodiment, the date data is stored in the database, and the interaction is performed. The raw data from the database will be processed by the first interface of the date-change interface to obtain standard date data, which will be sent to the compatible device 1 and the compatible device 2 compatible with the standard date data. For an incompatible device, the standard date data is sent to the second interface, and the second interface converts the standard date data into a date format compatible with the incompatible device. For example, the incompatible device can only read data in timestamp format, the second interface will convert the standard date data back to timestamp data.
Similarly, for the date data entering the application layer through the interface layer, if the date data is standard, the date data is directly processed by the first interface, converted into the format of original date data, then stored in the database, if the date data is not standard, converted by the second interface, converted into standard date data, then delivered to the first interface, and finally converted when the first interface receives unexpected date data of the model layer, then stored in the database of the model layer.
It can be seen that in the conversion process, whether the view layer obtains the date data from the model layer or the view layer writes the date data into the model layer, the date data is converted by the date conversion interface in the application layer, so that the original date data does not need to be locally processed by the interface layer or devices of the view layer, when the input data is written into the model layer, the model layer is not needed to process the data, all interactions related to the date data are processed by the application layer, all the date data are converted by a unified method, so that the input and output results are unified, and the interaction of the date data is also insensitive for the model layer, the interface layer and the view layer, so that the display and storage modes of all devices in the MCV architecture system for the date data are unified, and meanwhile, the data processing pressure of all the layers is also lightened.
In addition, in order to be compatible with other devices which cannot use the standard date format and are located on the interface layer and the view layer, a second interface is configured to perform date conversion for the devices, so that the incompatible devices can read and write dates normally, the problem that other devices cannot be accessed for use due to unified setting of the system is avoided, and compatibility is guaranteed. Meanwhile, the standard date data format in the embodiment does not contain specific time, only the date of year, month and day, and the problem of display errors caused by different time zones is avoided.
The application also provides a computer device comprising a processor and a memory, wherein the memory stores a computer program which executes the data unification method based on the MVC architecture when running on the processor.
The computer device may be a computer, a server, a mobile terminal, or the like, which may operate the MCV architecture system.
Specifically, as shown in fig. 5, the model layer and the application layer may be a server, or a computer terminal with enough computing power may be used as the model layer or the application layer in the MCV architecture system, and other devices such as a personal computer or a mobile terminal accessing the server or the computer terminal through a protocol may be used as the view layer or the interface layer in the MCV architecture system. As can be seen from fig. 5, the terminal device in the view layer interacts with the device of the application layer through the terminal device of the interface layer, and the interface layer and the view layer can access a plurality of devices as long as the whole system can carry.
When a user obtains or writes in the device access system of the view layer or the interface layer, the above data unification method based on the MVC architecture is triggered, for example, when the user just connects to the system, the user needs to obtain the system time, so the server device as the model layer initiates a request, the request firstly arrives at the server as the application layer, the server as the application layer obtains the date data from the model layer according to the request, then the date data is converted into the date data in the standard format through the date conversion interface, and then the date data is sent to the devices of the view layer and the interface layer for display. Similarly, when the user operates the devices of the view layer and the interface layer to write date data into the model layer, the device of the application layer will first acquire the written date data, then perform format conversion on the date data to form timestamp data, and finally store the timestamp data into the model layer.
The present application also provides a readable storage medium storing a computer program which, when run on a processor, performs the MVC architecture based data unification method.
The readable storage medium may be volatile memory, nonvolatile memory, or the like, which may store data and be used in the above-described computer device to perform the above-described data unification method based on the MVC architecture.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, of the flow diagrams and block diagrams in the figures, which illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules or units in various embodiments of the application may be integrated together to form a single part, or the modules may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a smart phone, a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and those skilled in the art can easily conceive of variations or substitutions within the scope of the present application.
Claims (10)
1. An MVC architecture-based data unification system, comprising: view layer, interface layer, model layer and application layer;
the view layer is in communication connection with the application layer through the interface layer, and the model layer is in communication connection with the application layer;
the application layer is used for executing application programs;
the application layer comprises a date conversion interface, wherein the date conversion interface is used for receiving date data from the model layer and converting the date data into a standard date format of the data unification system based on the MVC architecture;
the date data in the standard date format is sent to the interface layer through the date conversion interface, and the view layer acquires the date data in the standard date format through the interface layer interface;
when the application layer receives date data in a standard date format from the view layer and a writing request of the date data, the date data in the standard date format is converted into the original date data through the date conversion interface, and the original date data is stored in the model layer.
2. The MVC architecture based data unification system of claim 1, wherein the date conversion interface comprises a first interface and a second interface;
if the view layer or the interface layer is compatible with the standard date format, the application layer processes date data interacted by the view layer and the interface layer through the first interface;
and if the view layer or the device of the interface layer is not compatible with the standard date format, the application layer processes date data interacted by the view layer and the interface layer through the second interface.
3. The MVC architecture based data unification system of claim 1, wherein the format of the raw date data comprises a timestamp format and a year, month, and day format;
the date conversion interface is used for carrying out format conversion on the date data in the timestamp format through coordination of world time to form a first conversion date, and removing time-second related content in the first conversion date to obtain the date data in the year, month and day format.
4. The data unification method based on the MVC architecture is characterized by being applied to a data unification system based on the MVC architecture, wherein the data unification system based on the MVC architecture comprises a view layer, a model layer, an interface layer and an application layer, and the method comprises the following steps:
when the application layer receives a date request from the view layer, acquiring original date data from the model layer;
the application layer carries out format conversion on the original date data through a date conversion interface to form a standard date format of the data unification system based on the MVC architecture;
the date data in the standard date format is sent to the interface layer through the date conversion interface, and the view layer acquires the date data in the standard date format through the interface layer interface;
when the application layer receives date data in a standard date format from the view layer and a writing request of the date data, the date data in the standard date format is converted into the original date data through the date conversion interface, and the original date data is stored in the model layer.
5. The MVC architecture based data unification method of claim 4 wherein the format of the raw date data comprises a timestamp format and a year, month, and day format;
the format conversion of the original date data through the date conversion interface comprises the following steps:
the date conversion interface carries out format conversion on the date data in the timestamp format through coordination of world time to form a first conversion date, and removes time-minute-second related content in the first conversion date to obtain the date data in the year, month and day format.
6. The MVC architecture based data unification method of claim 5 wherein the standard date format is the year, month, and day format and the original date data format is the timestamp format.
7. The MVC architecture based data unification method of claim 5, wherein the converting the date data in the standard date format into the original date data comprises:
and the date conversion interface converts the date data in the year, month and day format by adding the local time to the date data in the year, month and day format and then coordinating the world time to obtain the date data in the time stamp format.
8. The MVC architecture based data unification method of claim 4 wherein the date conversion interface comprises a first interface and a second interface;
if the device of the view layer is compatible with the standard date format, converting original date data from the model layer through the first interface and sending the converted original date data to the view layer;
and if the equipment of the view layer is not compatible with the standard date format, converting the original date data from the model layer through the second interface and sending the original date data to the view layer.
9. A computer device comprising a processor and a memory, the memory storing a computer program that, when run on the processor, performs the MVC architecture based data unification method of any of claims 4 to 8.
10. A readable storage medium, characterized in that it stores a computer program which, when run on a processor, performs the MVC architecture based data unification method of any of claims 4 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310988839.XA CN116719874A (en) | 2023-08-08 | 2023-08-08 | MVC architecture-based data unification system, method, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310988839.XA CN116719874A (en) | 2023-08-08 | 2023-08-08 | MVC architecture-based data unification system, method, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116719874A true CN116719874A (en) | 2023-09-08 |
Family
ID=87868298
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310988839.XA Pending CN116719874A (en) | 2023-08-08 | 2023-08-08 | MVC architecture-based data unification system, method, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116719874A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106528505A (en) * | 2015-09-14 | 2017-03-22 | 北京国双科技有限公司 | Date format conversion method and device |
CN108234245A (en) * | 2018-01-09 | 2018-06-29 | 上海帝联网络科技有限公司 | The screening technique of log content and daily record data, device, system, readable medium |
CN111430013A (en) * | 2020-03-24 | 2020-07-17 | 上海联影医疗科技有限公司 | Method, device and equipment for complementing image date and storage medium |
CN113342614A (en) * | 2021-06-29 | 2021-09-03 | 深圳前海微众银行股份有限公司 | User breakpoint management method, device, equipment and computer program product |
CN116204734A (en) * | 2023-02-09 | 2023-06-02 | 网易(杭州)网络有限公司 | Data processing method, device, electronic equipment and storage medium |
CN116306508A (en) * | 2023-03-03 | 2023-06-23 | 中银金融科技有限公司 | Date data conversion method and device |
-
2023
- 2023-08-08 CN CN202310988839.XA patent/CN116719874A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106528505A (en) * | 2015-09-14 | 2017-03-22 | 北京国双科技有限公司 | Date format conversion method and device |
CN108234245A (en) * | 2018-01-09 | 2018-06-29 | 上海帝联网络科技有限公司 | The screening technique of log content and daily record data, device, system, readable medium |
CN111430013A (en) * | 2020-03-24 | 2020-07-17 | 上海联影医疗科技有限公司 | Method, device and equipment for complementing image date and storage medium |
CN113342614A (en) * | 2021-06-29 | 2021-09-03 | 深圳前海微众银行股份有限公司 | User breakpoint management method, device, equipment and computer program product |
CN116204734A (en) * | 2023-02-09 | 2023-06-02 | 网易(杭州)网络有限公司 | Data processing method, device, electronic equipment and storage medium |
CN116306508A (en) * | 2023-03-03 | 2023-06-23 | 中银金融科技有限公司 | Date data conversion method and device |
Non-Patent Citations (1)
Title |
---|
刘青海: "基于Android 的社区卫生服务系统的设计与实现", 基于ANDROID 的社区卫生服务系统的设计与实现, no. 02, pages 2 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7277921B2 (en) | Interprocess application programming interface for computer applications | |
US9286037B2 (en) | Platform for distributed applications | |
CN108509207A (en) | The cross-system of WEB application program is installed | |
CN112463211A (en) | System architecture transformation method compatible with multiple development architectures and system architecture | |
CN111258998A (en) | Data verification method, device, medium and electronic equipment | |
CN115795211A (en) | Page display method, device, system, equipment and storage medium | |
CN111897738A (en) | Automatic testing method and device based on atomic service | |
CN116719874A (en) | MVC architecture-based data unification system, method, equipment and storage medium | |
CN113885886A (en) | Method, device, system and storage medium for processing activity service | |
CN115809056B (en) | Component multiplexing implementation method and device, terminal equipment and readable storage medium | |
CN115269033B (en) | Method and system for loading external service component package by aPaaS platform | |
CN111177260A (en) | Database remote copying method and device and electronic equipment | |
CN116049142A (en) | Data processing method, device, electronic equipment and storage medium | |
CN111381898B (en) | Interface calling method and device, mobile terminal and storage medium | |
CN111859041B (en) | Data reporting method and device | |
CN113094151A (en) | Helm-based micro-service application deployment system and method | |
CN111324386B (en) | Method and device for starting split application program, electronic equipment and storage medium | |
CN112558983A (en) | Executable file generation and execution method, device, electronic terminal and medium | |
CN114185845A (en) | File management method and device, computer equipment and storage medium | |
CN110191141B (en) | Service calling information processing method and device and computer system | |
CN110908711A (en) | Control development method and device of application program and electronic equipment | |
CN113779952B (en) | Text processing method and device and electronic equipment | |
CN111381897B (en) | Interface calling method and device, mobile terminal and storage medium | |
CN116684494A (en) | Resource processing method, device and storage medium based on distributed cloud platform | |
CN116149817A (en) | Method, equipment and computer readable medium for realizing operation and maintenance task flow engine |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20230908 |
|
RJ01 | Rejection of invention patent application after publication |