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

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

Info

Publication number
CN112394977A
CN112394977A CN202011281010.9A CN202011281010A CN112394977A CN 112394977 A CN112394977 A CN 112394977A CN 202011281010 A CN202011281010 A CN 202011281010A CN 112394977 A CN112394977 A CN 112394977A
Authority
CN
China
Prior art keywords
data
issued
check
check file
engine
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.)
Granted
Application number
CN202011281010.9A
Other languages
Chinese (zh)
Other versions
CN112394977B (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.)
JD Digital Technology Holdings Co Ltd
Original Assignee
JD Digital Technology Holdings 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 JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings Co Ltd
Priority to CN202011281010.9A priority Critical patent/CN112394977B/en
Priority claimed from CN202011281010.9A external-priority patent/CN112394977B/en
Publication of CN112394977A publication Critical patent/CN112394977A/en
Application granted granted Critical
Publication of CN112394977B publication Critical patent/CN112394977B/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/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present disclosure provides a data processing method, apparatus, device and computer readable storage medium, the method comprising: acquiring a data checking instruction sent by terminal equipment, wherein the data checking instruction comprises issued data sent by a server side; calling a JS engine to execute a prestored target data check file according to the data check instruction to check the issued data and obtain a check result, wherein the target data check file is the latest version of the data check file at the server end; and processing the issued data according to the checking result. The method disclosed by the invention can be used for dynamically and efficiently checking the issued data sent by the server, thereby avoiding the problems of collapse, abnormal display and the like of the client in the operation process.

Description

Data processing method, device, equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of computers, and in particular, to a data processing method, apparatus, device, and computer readable storage medium.
Background
A Client-Server mode (Client-Server model) is called C/S structure for short, and is a network architecture which distinguishes a Client (Client) from a Server (Server). Each instance of client software may issue a request to a server or application server. The server side may receive a requested process from the client side. The information required for gathering, which is required for processing after the request from the client is obtained, is transmitted to the requesting client. In practical applications, during the operation of a client, situations may occur in which data is abnormally sent from a server, and the sent data is incompatible with an Application (App) version installed on the client, and the situations often cause the problems of crash and abnormal display of the client.
In the prior art, the technical problem is generally solved by checking the delivered data at the server side or updating the application program installed at the client side.
However, the check of the issued data at the server end is usually realized by the code of the server end, which increases the pressure of the server end, reduces the response speed of the server end, requires a certain deployment period, and has no real-time property. And the updating of the application program needs to obtain the consent of the user and has no timeliness.
Disclosure of Invention
The present disclosure provides a data processing method, an apparatus, a device, and a computer-readable storage medium, which are used to solve the problem in the prior art that the server pressure is increased and the timeliness is not available because the server-side code is relied on to implement the inspection of issued data.
A first aspect of the present disclosure provides a data processing method, which is applied to a client, where a JS engine is disposed in the client, and the method includes:
acquiring a data checking instruction sent by terminal equipment, wherein the data checking instruction comprises issued data sent by a server side;
calling a JS engine to execute a prestored target data check file according to the data check instruction to check the issued data and obtain a check result, wherein the target data check file is the latest version of the data check file at the server end;
and processing the issued data according to the checking result.
In an alternative embodiment,
according to the data inspection instruction, a JS engine is called to execute a prestored target data inspection file, and before the issued data is inspected, the method further comprises the following steps:
acquiring a starting instruction sent by the terminal equipment;
judging whether the version of the data check file of the server side is consistent with that of the data check file currently used by the JS engine or not according to the starting instruction;
and processing according to the judgment result.
In an optional embodiment, the processing the version of the data check file currently used by the JS engine according to the determination result includes:
if the data check file at the server side is consistent with the data check file currently used by the JS engine in version, taking the data check file currently used by the JS engine as the target data check file;
and if the data check file at the server end is inconsistent with the version of the data check file currently used by the JS engine, downloading the data check file at the server end, and taking the data check file at the server end as the target data check file.
In an optional embodiment, the target data check file is provided with a check logic, and the check logic at least includes a field type, a field value and whether a mandatory field corresponding to standard data is issued;
according to the data inspection instruction, a JS engine is called to execute a prestored target data inspection file to inspect the issued data, and the method comprises the following steps:
and according to the checking logic in the target data checking file, detecting that the data type and the field value corresponding to the issued data are consistent with the field type and the field value corresponding to the standard data, and detecting whether the issued data comprise the mandatory field or not to obtain the checking result.
In an optional embodiment, the processing the issued data according to the check result includes:
if the checking result is that the data type and the field value corresponding to the issued data are consistent with the field type and the field value corresponding to the standard data and the field type and the field value corresponding to the standard data comprise the mandatory field, judging that the issued data are normal data;
and controlling a display interface to display the issued data.
In an optional embodiment, the processing the issued data according to the check result includes:
if the checking result is that the data type and the field value corresponding to the delivered data are not consistent with the field type and the field value corresponding to the standard data, and/or the mandatory field is not included, determining that the delivered data are error data;
and controlling a display interface not to display the issued data or hiding the issued data.
In an optional embodiment, the target data check file further includes a correction logic, and the processing the delivered data according to the check result includes:
if the inspection result is that the issued data comprises the required field, but abnormal data with inconsistent data types and field values corresponding to the standard issued data exist in the data types and field values corresponding to the issued data, judging the importance of the abnormal data;
and if the importance of the abnormal data is lower than a preset threshold, performing correction operation on the issued data according to the correction logic to obtain corrected data, and controlling a display interface to display the corrected data.
In an optional embodiment, after the processing according to the determination result, the method further includes:
and finishing loading the JS engine.
A second aspect of the present disclosure provides a client, a JS engine is provided in the client, including:
the communication module is used for acquiring a data check instruction sent by the terminal equipment, wherein the data check instruction comprises issued data sent by the server;
the data processing module is used for calling a JS engine to execute a prestored target data check file according to the data check instruction so as to check the issued data and obtain a check result, wherein the target data check file is the latest version of the data check file at the server end;
and processing the issued data according to the checking result.
In an optional embodiment, the communication module is further configured to:
acquiring a starting instruction sent by the terminal equipment;
the data processing module is further used for judging whether the version of the data check file at the server side is consistent with that of the data check file currently used by the JS engine or not according to the starting instruction; and processing according to the judgment result.
In an optional embodiment, the data processing module is specifically configured to, if the data check file at the server side is consistent with the data check file version currently used by the JS engine, use the data check file currently used by the JS engine as the target data check file;
and if the data check file at the server end is inconsistent with the version of the data check file currently used by the JS engine, downloading the data check file at the server end, and taking the data check file at the server end as the target data check file.
In an optional embodiment, the target data check file is provided with a check logic, and the check logic at least includes a field type, a field value and whether a mandatory field corresponding to standard data is issued;
the data processing module is used for:
and according to the checking logic in the target data checking file, detecting that the data type and the field value corresponding to the issued data are consistent with the field type and the field value corresponding to the standard data, and detecting whether the issued data comprise the mandatory field or not to obtain the checking result.
In an optional embodiment, the data processing module is specifically configured to:
if the checking result is that the data type and the field value corresponding to the issued data are consistent with the field type and the field value corresponding to the standard data and the field type and the field value corresponding to the standard data comprise the mandatory field, judging that the issued data are normal data;
and controlling a display interface to display the issued data.
In an optional embodiment, the data processing module is specifically configured to:
if the checking result is that the data type and the field value corresponding to the delivered data are not consistent with the field type and the field value corresponding to the standard data, and/or the mandatory field is not included, determining that the delivered data are error data;
and controlling a display interface not to display the issued data or hiding the issued data.
In an optional embodiment, the target data check file further includes a correction logic, and the processing module is specifically configured to:
if the inspection result is that the issued data comprises the required field, but abnormal data with inconsistent data types and field values corresponding to the standard issued data exist in the data types and field values corresponding to the issued data, judging the importance of the abnormal data;
and if the importance of the abnormal data is lower than a preset threshold, performing correction operation on the issued data according to the correction logic to obtain corrected data, and controlling a display interface to display the corrected data.
In an optional embodiment, the data processing apparatus is further configured to: and finishing loading the JS engine.
A third aspect of the present disclosure provides an electronic device, comprising: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to: execution of the computer-executable instructions stored by the memory causes the processor to perform the data processing method of the first aspect.
A fourth aspect of the present disclosure provides a computer-readable storage medium having stored therein computer-executable instructions for implementing the data processing method of the first aspect when executed by a processor.
According to the data processing method, the data processing device, the data processing equipment and the computer readable storage medium, the JS engine is called to run the prestored target data check file of the latest version of the server side by acquiring the data check instruction sent by the terminal equipment, and the issued data is checked to obtain the check result. Therefore, the data issued by the server can be normally displayed at the client, and the problems of breakdown, abnormal display and the like caused by factors such as abnormal data issued by the server, incompatible versions of the data and the application program and the like in the operation process of the client are avoided. In addition, the target data inspection file is adopted to inspect the data issued by the server, so that the inspection operation of the data issued by the server can be quickly realized, and the technical problems of long data inspection period and no real-time property caused by data inspection at the server are effectively solved.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a schematic diagram of a network architecture upon which the present disclosure is based;
fig. 2 is a schematic flow chart of a data processing method according to an embodiment of the present disclosure;
fig. 3 is a schematic flow chart of a data processing method according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of interactive signaling provided by an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a client according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments obtained based on the embodiments in the disclosure belong to the protection scope of the disclosure.
In practical application, when a user operates a client, the server is often required to send data to the client for display, but if the data sent by the server is abnormal or the data sent by the server is incompatible with the version of an application program installed on the client, the problems of client crash and abnormal display are easily caused. In the prior art, the technical problem is generally solved by checking the issued data at the server side. However, the examination of the issued data at the server end is often implemented by the server end code, which increases the pressure at the server end, thereby reducing the response speed at the server end, and requires a certain deployment period, which does not have real-time performance.
In order to solve the above problems, the inventor finds, through research, that real-time data inspection can be achieved by calling a JS engine to inspect issued data by using a latest target data inspection file at a server side when the JavaScript engine (an engine with WebKit as a core or a technical source, referred to as a JS engine for short) runs, and dynamically updating the target data inspection file by means of the downloading capability of a client side. Therefore, the checking operation of the data issued by the server can be quickly realized, the technical problems of long data checking period and no real-time property caused by data checking at the server are effectively solved, and the problems of collapse, abnormal display and the like of the client in the running process are effectively avoided.
It should be noted that the data processing method, apparatus, device and computer-readable storage medium provided in the present disclosure may be applied to a scene for checking various data to be transmitted.
Fig. 1 is a schematic diagram of a network architecture based on the present disclosure, and as shown in fig. 1, the network architecture shown in fig. 1 may specifically include a terminal device 1 and a server 2.
The terminal device 1 may specifically be a user terminal carrying a client, which includes but is not limited to a user mobile phone, a desktop computer, an intelligent home device, a tablet computer, and the like. A JS engine may be provided in the terminal device 1. The terminal device 1 is operable to perform data check on the delivered data by calling the JS engine under the control of the user.
The server 2 may be a server disposed in the cloud for issuing a data check file.
Example one
Fig. 2 is a schematic flow chart of a data processing method provided in the embodiment of the present disclosure, and as shown in fig. 2, the data processing method provided in the embodiment of the present disclosure includes:
step 101, acquiring a data check instruction sent by a terminal device, wherein the data check instruction comprises issued data sent by a server.
The execution subject of the data processing method provided by this embodiment is a client, the JS engine described above may be installed in the client, and the client may be installed in the terminal device.
In this embodiment, the client may obtain the delivered data sent by the terminal device, and in order to avoid the problems of client crash and display abnormality, after obtaining the delivered data sent by the server, the client needs to perform data checking operation on the delivered data.
Specifically, the client may trigger a data check instruction according to the issued data, and call the JS engine to perform data check operation. The data check instruction may include the issued data sent by the server.
And step 102, calling a JS engine to execute a prestored target data check file according to the data check instruction to check the issued data and obtain a check result, wherein the target data check file is the latest version of the data check file at the server side.
In this embodiment, after acquiring the data check instruction, the client may perform a data check operation on the issued data in the data check instruction according to the data check instruction. Specifically, the JS engine can be called to execute the prestored target data check file to perform data check operation on the issued data, so as to obtain a check result. Wherein, the target data check file is the latest version of the data check file downloaded by the JS engine from the server side. After the data check file is operated, whether the issued file is a correct file, a corrected file, an error file and the like can be determined, and a check result is obtained.
It should be noted that, the target data check file is used for performing data check on the delivered data, the check speed is high, real-time check on the delivered data can be realized, and the technical problems of long data check period and no real-time property caused by data check at the server side in the prior art are effectively solved.
And 103, processing the issued data according to the check result.
In this embodiment, after the JS engine calls the target data check file to obtain the check result, in order to enable the client to determine whether to display the delivered file, the delivered file may be correspondingly processed according to the check result.
For example, the client may be a client of an e-commerce platform, the issued data may be commodity interface data, and a user may perform online shopping through the client. When the user uses the client, the server can send the issued data to the client according to the triggering operation of the user. For example, when a user browses a commodity, the user clicks the detailed information of the commodity, and the server may issue the detailed page information of the commodity to the client, where the detailed page information is issue data.
However, in the process of client operation, problems such as page collapse and abnormal interface display caused by abnormal data issued by the server or incompatibility of the data issued by the server and the application program version can be encountered. At this time, the user cannot browse the commodities, and shopping experience is seriously influenced.
In view of such circumstances, the present disclosure provides a dynamic data checking method based on a JS engine runtime to solve the above-mentioned problems.
Firstly, when a user opens a client of an e-commerce platform, the client can acquire a data check instruction sent by a terminal device, and the data check instruction comprises commodity interface data to be issued sent by a server. And then, the client can call a prestored target data check file of the latest version of the server through the JS engine according to the data check instruction, and check the commodity interface data to be issued by using the check file to obtain a check result. And finally, the client processes the commodity interface data to be issued according to the check result. At this time, the user can browse and purchase the product normally. It is imperceptible to the user to check the data at their back end when opening the shopping application.
Through the embodiment, the client can automatically adopt the JS engine to carry out data inspection in real time when being started, and the problems of page collapse and abnormal display in the client operation process caused by untimely data inspection in the prior art are solved.
Further, on the basis of the first embodiment, the target data check file is provided with a check logic, and the check logic at least includes a field type, a field value and whether a mandatory field corresponding to standard data is issued;
step 102 specifically includes:
and according to the checking logic in the target data checking file, detecting that the data type and the field value corresponding to the issued data are consistent with the field type and the field value corresponding to the standard data, and detecting whether the issued data comprise the mandatory field or not to obtain the checking result.
In this embodiment, the target data check file may be preset with a check logic, where the check logic at least includes a field type, a field value, and whether a mandatory field corresponding to the standard data is issued. Therefore, after the issued data is acquired, the inspection logic in the file can be inspected according to the target data, the data type and the field value corresponding to the issued data are detected to be consistent with the field type and the field value corresponding to the standard data, whether the issued data comprises the necessary field or not is detected, and the inspection result is obtained.
In the data processing method provided by this embodiment, the data check instruction sent by the terminal device is acquired, the pre-stored latest version data check file is called according to the data check instruction to check the issued data, a check result is obtained, and the issued data is processed according to the check result. Therefore, the data issued by the server can be normally displayed at the client, and the problems of breakdown, abnormal display and the like caused by factors such as abnormal data issued by the server, incompatible versions of the data and the application program and the like in the operation process of the client are avoided. In addition, the target data inspection file is adopted to inspect the data issued by the server, so that the inspection operation of the data issued by the server can be quickly realized, and the technical problems of long data inspection period and no real-time property caused by data inspection at the server are effectively solved.
Example two
Fig. 3 is a schematic flow chart of a data processing method according to an embodiment of the present disclosure, and on the basis of the first embodiment, as shown in fig. 3, to further explain the data processing method according to the present disclosure, before the step 102 in the first embodiment calls a pre-stored data check file to check the issued data according to the data check instruction, the method further includes:
step 201, obtaining a starting instruction sent by the terminal device.
Step 202, judging whether the version of the data check file of the server side is consistent with that of the data check file currently used by the JS engine or not according to the starting instruction.
And 203, processing the version of the data check file currently used by the JS engine according to the judgment result.
In this embodiment, in order to ensure that the target data check file called by the JS engine is the latest data check file currently in the server, before data check, the version of the data check file needs to be detected first.
Specifically, the client may be started according to a call operation of the user. The client-side can receive the starting instruction sent by the terminal equipment, and when the client-side is started, the JS engine can be correspondingly started, and the starting instruction is sent to the JS engine. When the client receives the starting instruction, the JS engine can be started first, whether the data check file of the server is consistent with the version of the currently used data check file or not is judged, a judgment result is obtained, and accordingly the currently used data check file can be processed according to the judgment result.
Further, on the basis of the first embodiment, the processing according to the determination result specifically includes:
if the data check file at the server side is consistent with the data check file currently used by the JS engine in version, taking the data check file currently used by the JS engine as the target data check file; and if the data check file at the server end is inconsistent with the version of the data check file currently used by the JS engine, downloading the data check file at the server end, and taking the data check file at the server end as the target data check file.
In this embodiment, if the JS engine determines that the data check file at the server side is consistent with the version of the data check file currently used by the server side, that is, the data check file can accurately check whether the issued data is correct. The JS engine performs data checking with the current data check file as the latest version of the data check file. On the contrary, if the JS engine determines that the version of the data check file at the server side is inconsistent with the version of the data check file currently used by the server side, that is, the data check file cannot accurately check the issued data, the JS engine downloads the data check file of the latest version from the server side to perform data check.
For the above example, when the user opens the client of the e-commerce platform, the client automatically starts the JS engine, and the JS engine can automatically determine whether the commodity interface data check file at the server is consistent with the version of the commodity interface data check file currently used by the server, and perform different processing according to different determination results.
The JS engine can automatically judge whether the commodity interface data check file at the server end is consistent with the version of the commodity interface data check file currently used by the JS engine, if so, the commodity interface data check file currently used is used as the latest version of the data check file to check the commodity interface data, if not, the JS engine automatically downloads the commodity interface data check file at the server end, and the downloaded commodity interface data check file is used as the latest version of the commodity interface data check file to check the commodity interface data.
It should be noted that after the JS engine performs processing according to the judgment result, loading is automatically completed. Because the loading is completed after the JS engine executes the data checking operation, the energy of the terminal equipment provided with the JS engine is saved and the cruising ability of the terminal equipment is improved on the basis of effectively ensuring the normal display of data.
According to the data processing method provided by the embodiment, when the client is started, whether the current data check file is the latest version is judged firstly, and the judgment result is used for processing the version of the data check file currently used by the JS engine, so that the data check file is ensured to be the latest version, and the problem that the interface display is abnormal because the data check file is not in place due to the fact that the version of the data check file is too low is solved.
On the basis of the foregoing embodiment, in order to further explain the data processing method, optionally, on the basis of any of the foregoing embodiments, the processing the issued data according to the check result includes: if the checking result is that the data type and the field value corresponding to the issued data are consistent with the field type and the field value corresponding to the standard data and the field type and the field value corresponding to the standard data comprise the mandatory field, judging that the issued data are normal data;
and controlling a display interface to display the issued data.
In this embodiment, if the data type and the field value corresponding to the delivered data are consistent with the data type and the data value corresponding to the preset standard data and include the mandatory field, the delivered data is represented as normal data, and at this time, the display interface may be controlled to display the delivered data.
Optionally, on the basis of any of the foregoing embodiments, if the check result is that the data type and the field value corresponding to the delivered data are not consistent with the field type and the field value corresponding to the standard data, and/or the mandatory field is not included, it is determined that the delivered data is erroneous data;
and controlling a display interface not to display the issued data or hiding the issued data.
In this embodiment, if it is detected that the data type and the field value corresponding to the delivered data are not consistent with the data type and the field value corresponding to the standard data, and/or the mandatory field is not included, it is determined that the delivered data is erroneous data. At this time, in order to avoid the display problem, the display interface may be controlled not to display the issued data. Alternatively, the delivered data may be selected to be hidden and not displayed.
Optionally, on the basis of any of the above embodiments, the target data inspection file further includes a correction logic, and if the inspection result is that the delivered data includes the mandatory field, but there is abnormal data with inconsistent data types and field values corresponding to the standard delivered data in the data types and field values corresponding to the delivered data, the importance of the abnormal data is determined;
and if the importance of the abnormal data is lower than a preset threshold, performing correction operation on the issued data according to the correction logic to obtain corrected data, and controlling a display interface to display the corrected data.
In this embodiment, if the delivered data includes the mandatory field, but there is abnormal data with inconsistent data type and field value corresponding to the standard data in the data type and field value corresponding to the delivered data, the importance of the abnormal data may be detected. If the abnormal data is important, the error data may cause display abnormality. Therefore, it may not be necessary to display it. If the importance of the abnormal data is lower than a preset threshold value, the issued data can be corrected according to the correction logic to obtain corrected data, and a display interface is controlled to display the corrected data.
For example, the correction logic includes the manner of correcting the data field type, the field value, etc. If the field type is a character string type, but the field type in the issued data is an integer, the field type is corrected into a character string by the check file.
Specifically, if the checking result is that the issued data is normal data, the client display interface displays the issued data; if the check result is that the issued data is wrong data, the client display interface does not display the issued data or hides the issued data; and if the checking result is that the issued data is the corrected data, the client display interface also displays the issued data.
For the above example, if the data of the commodity interface to be issued is normal data, the data is displayed on the commodity interface of the user client, and the user can browse the commodity normally at this time; if the data of the commodity interface to be issued is error data, the commodity interface of the user client cannot display the data, and the user can see a blank interface at the moment; if the data of the commodity interface to be issued is the corrected data, the data can be displayed on the commodity interface of the user client, and the user can also browse the commodity normally at the moment.
According to the data processing method provided by the embodiment, the issued data acquired by the client from the server is processed according to the check result, the data is checked in real time through the JS engine before being issued, the data checking efficiency is improved, and the problems of interface collapse, abnormal display and the like in the operation process of the client are avoided.
EXAMPLE III
Fig. 4 is a schematic diagram of interaction signaling provided by the embodiment of the present disclosure, and as shown in fig. 4, the signaling interaction between the server side, the JS engine, and the client includes:
and step 301, the client sends a starting instruction to the JS engine.
And step 302, judging whether the currently used data check file is the data check file of the latest version by the JS engine, if so, finishing loading the engine, and if not, entering the next step.
And step 303, downloading the data check file of the latest version by the JS engine through the server, and finishing loading the engine after the downloading is finished.
And step 304, the client sends a data checking instruction containing the issued data to the JS engine.
And 305, calling the data checking instruction of the latest version by the JS engine to check the issued data.
And step 306, sending the data checking result to the client by the JS engine.
Step 307, the client executes corresponding processing according to the checking result.
Specifically, in the illustrated signaling interaction scenario, the JS engine is automatically loaded after the client starts. At this time, the JS engine determines whether the currently used data check file is the latest version of the data check file. And if the JS engine is the latest version, the JS engine can automatically finish loading, if the JS engine is not the latest version, the data check file needs to be updated, at the moment, the JS engine can download the data check file of the latest version through the server side, and after the downloading is finished, the JS engine can automatically finish loading. The client then sends the JS engine with the data to be sent included in the data check instruction. The JS engine calls the data check file with the latest version to check the issued data and sends the check result back to the client, and the client executes corresponding processing according to the check result. After the data inspection is completed, the client side can include new issued data in the data inspection instruction again and send the data inspection instruction to the JS engine, and the data inspection steps are repeated.
It should be noted that the existing client, including the browser kernel of the iOS, Android and other systems, technically supports the loading mode when the JS engine runs.
By means of the mode, consistency among a plurality of platforms is guaranteed, the same JS engine data check file is achieved, and the JS engine data check file can effectively run in all clients. And the data check file is executed when the JS engine runs, dynamic and efficient check can be carried out on the issued data, and therefore the problems that the client side crashes, displays abnormally and the like in the running process are avoided.
The client side provided by this embodiment obtains the data check instruction sent by the terminal device, calls the pre-stored latest version data check file according to the data check instruction to check the issued data, obtains the check result, and processes the issued data according to the check result. Therefore, the data issued by the server can be normally displayed at the client, and the problems of breakdown, abnormal display and the like caused by factors such as abnormal data issued by the server, incompatible versions of the data and the application program and the like in the operation process of the client are avoided. In addition, the target data inspection file is adopted to inspect the data issued by the server, so that the inspection operation of the data issued by the server can be quickly realized, and the technical problems of long data inspection period and no real-time property caused by data inspection at the server are effectively solved.
Example four
Fig. 5 is a schematic structural diagram of a client according to an embodiment of the present disclosure. As shown in fig. 5, as another aspect, the present disclosure further provides a client, where a JS engine is disposed in the client, including:
the communication module 401 is configured to obtain a data check instruction sent by a terminal device, where the data check instruction includes issued data sent by a server;
a data processing module 402, configured to invoke a pre-stored target data check file according to the data check instruction to check the issued data, and obtain a check result, where the target data check file is a data check file of a latest version at a server;
and processing the issued data according to the checking result.
In an optional embodiment, on the basis of the fourth embodiment, the communication module 401 is further configured to: and acquiring a starting instruction sent by the terminal equipment. The data processing module 402 is further configured to determine, according to the start instruction, whether the data check file at the server side is consistent with the version of the data check file currently used by the JS engine; and processing according to the judgment result.
In an optional embodiment, on the basis of any of the foregoing embodiments, the data processing module 402 is specifically configured to, if the data check file at the server side is consistent with the data check file currently used by the JS engine in version, use the data check file currently used by the JS engine as the target data check file. And if the data check file at the server end is inconsistent with the version of the data check file currently used by the JS engine, downloading the data check file at the server end, and taking the data check file at the server end as the target data check file.
In an optional embodiment, on the basis of any one of the above embodiments, the target data check file is provided with a check logic, and the check logic at least includes whether a field type, a field value, and a mandatory field corresponding to standard data are issued;
the data processing module 402 is configured to:
and according to the checking logic in the target data checking file, detecting that the data type and the field value corresponding to the issued data are consistent with the field type and the field value corresponding to the standard data, and detecting whether the issued data comprise the mandatory field or not to obtain the checking result.
In an optional embodiment, on the basis of any of the above embodiments, the data processing module 402 is specifically configured to:
if the checking result is that the data type and the field value corresponding to the issued data are consistent with the field type and the field value corresponding to the standard data and the field type and the field value corresponding to the standard data comprise the mandatory field, judging that the issued data are normal data;
and controlling a display interface to display the issued data.
In an optional embodiment, on the basis of any of the above embodiments, the data processing module 402 is specifically configured to:
if the checking result is that the data type and the field value corresponding to the delivered data are not consistent with the field type and the field value corresponding to the standard data, and/or the mandatory field is not included, determining that the delivered data are error data;
and controlling a display interface not to display the issued data or hiding the issued data.
In an optional embodiment, on the basis of any one of the above embodiments, the target data check file further includes a correction logic, and the data processing module 402 is specifically configured to:
if the inspection result is that the issued data comprises the required field, but abnormal data with inconsistent data types and field values corresponding to the standard issued data exist in the data types and field values corresponding to the issued data, judging the importance of the abnormal data;
and if the importance of the abnormal data is lower than a preset threshold, performing correction operation on the issued data according to the correction logic to obtain corrected data, and controlling a display interface to display the corrected data.
In an optional embodiment, on the basis of any one of the above embodiments, the data processing apparatus is further configured to: and finishing loading the JS engine.
The client provided by the embodiment processes the issued data according to the check result, so that the issued data acquired by the client from the server is guaranteed, the data can be checked in real time through the JS engine before being issued, the data checking efficiency is improved, and the problems of interface breakdown, abnormal display and the like in the client running process are avoided.
EXAMPLE five
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 6, as another aspect, the present disclosure also provides an electronic device 600 including: at least one memory 601 and a processor 602;
the memory 601 stores programs. In particular, the program may include program code comprising computer operating instructions. Memory 601 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
A processor 602 for executing the programs stored in the memory 601.
Wherein computer programs are stored in the memory 601 and configured to be executed by the processor 602 to implement the data processing method provided by any one of the embodiments of the present disclosure. The related descriptions and effects corresponding to the steps in the drawings can be correspondingly understood, and redundant description is not repeated here.
In this embodiment, the memory 601 and the processor 602 are connected by a bus. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus.
EXAMPLE six
The embodiment of the present disclosure provides a computer-readable storage medium, on which a computer executes instructions, and the computer executes the instructions to implement the data processing method provided by any one of the embodiments of the present disclosure.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Further, while operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present disclosure, and not for limiting the same; while the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present disclosure.

Claims (18)

1. A data processing method is applied to a client and is characterized in that a JS engine is arranged in the client, and the method comprises the following steps:
acquiring a data checking instruction sent by terminal equipment, wherein the data checking instruction comprises issued data sent by a server side;
calling a JS engine to execute a prestored target data check file according to the data check instruction to check the issued data and obtain a check result, wherein the target data check file is the latest version of the data check file at the server end;
and processing the issued data according to the checking result.
2. The method of claim 1, wherein before the step of invoking a JS engine to execute a pre-stored target data check file according to the data check instruction to check the issued data, the method further comprises:
acquiring a starting instruction sent by the terminal equipment;
judging whether the version of the data check file of the server side is consistent with that of the data check file currently used by the JS engine or not according to the starting instruction;
and processing the version of the data check file currently used by the JS engine according to the judgment result.
3. The method according to claim 2, wherein the processing the version of the data check file currently used by the JS engine according to the determination result comprises:
if the data check file at the server side is consistent with the data check file currently used by the JS engine in version, taking the data check file currently used by the JS engine as the target data check file;
and if the data check file at the server end is inconsistent with the version of the data check file currently used by the JS engine, downloading the data check file at the server end, and taking the data check file at the server end as the target data check file.
4. The method according to any one of claims 1 to 3, wherein a checking logic is set in the target data checking file, and the checking logic at least includes a field type, a field value and whether a mandatory field corresponding to standard data is issued;
according to the data inspection instruction, a JS engine is called to execute a prestored target data inspection file to inspect the issued data, and the method comprises the following steps:
and according to the checking logic in the target data checking file, detecting that the data type and the field value corresponding to the issued data are consistent with the field type and the field value corresponding to the standard data, and detecting whether the issued data comprise the mandatory field or not to obtain the checking result.
5. The method according to claim 4, wherein said processing said issued data according to said checking result comprises:
if the checking result is that the data type and the field value corresponding to the issued data are consistent with the field type and the field value corresponding to the standard data and the field type and the field value corresponding to the standard data comprise the mandatory field, judging that the issued data are normal data;
and controlling a display interface to display the issued data.
6. The method according to claim 4, wherein said processing said issued data according to said checking result comprises:
if the checking result is that the data type and the field value corresponding to the delivered data are not consistent with the field type and the field value corresponding to the standard data, and/or the mandatory field is not included, determining that the delivered data are error data;
and controlling a display interface not to display the issued data or hiding the issued data.
7. The method according to any one of claim 4, wherein the target data check file further comprises a correction logic, and the processing the issued data according to the check result comprises:
if the inspection result is that the issued data comprises the required field, but abnormal data with inconsistent data types and field values corresponding to the standard issued data exist in the data types and field values corresponding to the issued data, judging the importance of the abnormal data;
and if the importance of the abnormal data is lower than a preset threshold, performing correction operation on the issued data according to the correction logic to obtain corrected data, and controlling a display interface to display the corrected data.
8. The method according to any one of claims 1 to 3, further comprising, after the processing according to the determination result:
and finishing loading the JS engine.
9. The utility model provides a client, its characterized in that, be provided with the JS engine in the client, include:
the communication module is used for acquiring a data check instruction sent by the terminal equipment, wherein the data check instruction comprises issued data sent by the server;
the data processing module is used for calling a JS engine to execute a prestored target data check file according to the data check instruction so as to check the issued data and obtain a check result, wherein the target data check file is the latest version of the data check file at the server end;
and processing the issued data according to the checking result.
10. The data processing apparatus of claim 9, wherein the communication module is further configured to:
acquiring a starting instruction sent by the terminal equipment;
the data processing module is further used for judging whether the version of the data check file at the server side is consistent with that of the data check file currently used by the JS engine or not according to the starting instruction; and processing according to the judgment result.
11. The data processing apparatus of claim 9,
the data processing module is specifically configured to, if the data check file at the server side is consistent with the data check file currently used by the JS engine in version, take the data check file currently used by the JS engine as the target data check file;
and if the data check file at the server end is inconsistent with the version of the data check file currently used by the JS engine, downloading the data check file at the server end, and taking the data check file at the server end as the target data check file.
12. The device according to any one of claims 9 to 11, wherein a checking logic is provided in the target data checking file, and the checking logic at least includes a field type, a field value and whether a mandatory field is issued corresponding to standard data;
the data processing module is used for:
and according to the checking logic in the target data checking file, detecting that the data type and the field value corresponding to the issued data are consistent with the field type and the field value corresponding to the standard data, and detecting whether the issued data comprise the mandatory field or not to obtain the checking result.
13. The data processing apparatus according to any one of claims 9 to 11, wherein the processing module is specifically configured to:
if the checking result is that the data type and the field value corresponding to the issued data are consistent with the field type and the field value corresponding to the standard data and the field type and the field value corresponding to the standard data comprise the mandatory field, judging that the issued data are normal data;
and controlling a display interface to display the issued data.
14. The data processing apparatus according to any one of claims 9 to 11, wherein the processing module is specifically configured to:
if the checking result is that the data type and the field value corresponding to the delivered data are not consistent with the field type and the field value corresponding to the standard data, and/or the mandatory field is not included, determining that the delivered data are error data;
and controlling a display interface not to display the issued data or hiding the issued data.
15. The data processing apparatus according to any one of claims 9 to 11, wherein the target data check file further includes correction logic, and the processing module is specifically configured to:
if the inspection result is that the issued data comprises the required field, but abnormal data with inconsistent data types and field values corresponding to the standard issued data exist in the data types and field values corresponding to the issued data, judging the importance of the abnormal data;
and if the importance of the abnormal data is lower than a preset threshold, performing correction operation on the issued data according to the correction logic to obtain corrected data, and controlling a display interface to display the corrected data.
16. The data processing apparatus according to any of claims 9 to 11, further configured to: and finishing loading the JS engine.
17. An electronic device, comprising: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to: execution of the computer-executable instructions stored by the memory causes the processor to perform the data processing method of any of claims 1-8.
18. A computer-readable storage medium, having stored thereon computer-executable instructions for implementing a data processing method according to any one of claims 1 to 8 when executed by a processor.
CN202011281010.9A 2020-11-16 Data processing method, device, equipment and computer readable storage medium Active CN112394977B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011281010.9A CN112394977B (en) 2020-11-16 Data processing method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011281010.9A CN112394977B (en) 2020-11-16 Data processing method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112394977A true CN112394977A (en) 2021-02-23
CN112394977B CN112394977B (en) 2024-07-16

Family

ID=

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102511037A (en) * 2010-08-10 2012-06-20 国际商业机器公司 A method and system to automatically testing a WEB application
US20160132311A1 (en) * 2014-11-07 2016-05-12 Open Text S.A. Client Application with Embedded Server
US20180349116A1 (en) * 2015-12-15 2018-12-06 Samsung Electronics Co., Ltd. User terminal device, server, and application execution method thereof
CN110069505A (en) * 2017-09-21 2019-07-30 张锐 Off-line data processing method and off-line data updating device
CN110134904A (en) * 2019-05-21 2019-08-16 腾讯科技(上海)有限公司 A kind of page check method, apparatus, equipment and medium
CN111865676A (en) * 2020-07-10 2020-10-30 深圳市欢太科技有限公司 Configuration file update checking method, device, server and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102511037A (en) * 2010-08-10 2012-06-20 国际商业机器公司 A method and system to automatically testing a WEB application
US20160132311A1 (en) * 2014-11-07 2016-05-12 Open Text S.A. Client Application with Embedded Server
US20180349116A1 (en) * 2015-12-15 2018-12-06 Samsung Electronics Co., Ltd. User terminal device, server, and application execution method thereof
CN110069505A (en) * 2017-09-21 2019-07-30 张锐 Off-line data processing method and off-line data updating device
CN110134904A (en) * 2019-05-21 2019-08-16 腾讯科技(上海)有限公司 A kind of page check method, apparatus, equipment and medium
CN111865676A (en) * 2020-07-10 2020-10-30 深圳市欢太科技有限公司 Configuration file update checking method, device, server and storage medium

Similar Documents

Publication Publication Date Title
US20180129520A1 (en) Method and apparatus for starting virtual machine
WO2016177341A1 (en) Interface calling method and device, and terminal
CN108733720B (en) On-line checking method and checking system for SQL (structured query language) query of multiple database types
CN111367518B (en) Page layout method, page layout device, computing equipment and computer storage medium
CN106874020B (en) Method and device for starting plug-in
CN111984520A (en) Buried point testing method, computer device and computer-readable storage medium
CN114389969A (en) Client test method and device, electronic equipment and storage medium
CN112394977B (en) Data processing method, device, equipment and computer readable storage medium
CN112394977A (en) Data processing method, device, equipment and computer readable storage medium
CN112732312A (en) Method and device for updating application program, electronic equipment and medium
CN111737055A (en) Service processing method, device, equipment and computer readable storage medium
CN108062224B (en) Data reading and writing method and device based on file handle and computing equipment
CN111338928A (en) Chrome-based browser testing method and device
US20210382764A1 (en) Comparisons of application programming interface interactions to determine compatibilities
CN113485855B (en) Memory sharing method and device, electronic equipment and readable storage medium
US20240031166A1 (en) Web-side data signature method and apparatus and computer device
CN105785824B (en) Method and system for transmitting memory size parameters to Linux kernel
CN114816482A (en) Method and device for upgrading block storage service, computer equipment and storage medium
CN111475220B (en) Cold start method and device, electronic equipment and computer storage medium
CN111198725B (en) Application starting processing method, computing equipment and computer storage medium
CN113157306A (en) Resource packaging management method, device, equipment and storage medium
CN112612550A (en) File configuration method and device
CN112115693A (en) Method and device for exporting Word document with dynamic rendering chart and computer equipment
CN106600277B (en) Method and terminal for adjusting payment platform sequencing
CN110300111A (en) Page display method, device, terminal device and server

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone, 100176

Applicant before: Jingdong Digital Technology Holding Co.,Ltd.

GR01 Patent grant