Interaction method and device for front-end data and back-end data
By using preset JSON format data packets in front-end and back-end data interaction, the problems of low interaction efficiency and slow update speed in the prior art are solved, and efficient front-end data interaction and dynamic display are achieved.
Patent Information
- Application Number
- CN202510023652.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-04-18
AI Technical Summary
The existing technology has problems of low interaction efficiency and slow update speed in the process of front-end data interaction. Especially when the back-end requirements change, it is necessary to inform the front-end offline and carry out cumbersome processes such as code modification, review, testing and deployment.
Data packets with preset JSON format are used for front-end data interaction, including field name segmentation, field value segmentation and text description segmentation. The identifier and its corresponding values are parsed and displayed, avoiding the problem of insufficient modification flexibility and cumbersome process caused by key-values to fixed definitions.
It improves the efficiency of front-end and back-end data interaction, reduces the steps of code modification and deployment, realizes dynamic display and efficient interaction, and improves interaction quality and efficiency.
Smart Images

Figure CN119847791A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of front-end and back-end data interaction processing, and in particular to a front-end and back-end data interaction method and device. Background Art
[0002] A large amount of data interaction is often required between the front-end and the back-end, and the commonly used interaction formats include JSON, XML and form. Among them, the JSON (JavaScript Object Notation) protocol is an open source data interaction protocol that supports objects and arrays, so it can flexibly represent complex data structures. Usually, in the process of front-end and back-end interaction, the definition of the target object code given by the front-end technician at the beginning is to assign a variable to the target object, and then build a key-value pair for the variable. When the back-end requirements change, the back-end technician tells the front-end technician the new requirements offline; the front-end technician modifies the target object code based on the new requirements (mainly modifying the above key-value pairs); after the modification, it needs to go through steps such as code review and running tests, and then deployed to the test environment and production environment to achieve the update of the target object, so a series of cumbersome processes are required, and there are problems such as low interaction efficiency and slow update speed. Summary of the invention
[0003] The present invention application provides a method and device for front-end and back-end data interaction, which can improve the interaction efficiency of front-end and back-end data.
[0004] In order to solve the above technical problems, the first aspect of the present invention provides a method for interacting front-end and back-end data, comprising:
[0005] In response to a preset trigger mechanism, a first data packet in a preset JSON format of a target object is obtained from a backend; the preset JSON format includes a number of identifiers, and each identifier is configured with a corresponding value in each preset segment; the preset segment includes: a field name segment, a field value segment, and a text description segment;
[0006] Parsing the first data packet according to the preset JSON format to obtain a first parsing result of the target object;
[0007] The target object is displayed according to the first parsing result.
[0008] In the implementation of the present invention, when a preset trigger mechanism is met, the trigger mechanism is responded to and the first data packet in the preset JSON format of the target object is obtained from the backend. The preset JSON format is the data format agreed upon by the frontend and the backend, including several identifiers, and each identifier is configured with a corresponding value in each preset segment. The preset segment includes a field name segment, a field value segment and a text description segment. The present application improves the JSON format of the target object from the perspective of code development, avoiding the problems of insufficient modification flexibility, large workload and cumbersome process brought about by the fixed definition of key-value pairs in the prior art, and does not require a series of cumbersome procedures such as re-modification, review, running tests and deployment of the code definition. The method of the present application does not require the back-end technical personnel to tell the front-end technical personnel to modify the requirements offline, but records the modification requirements in the field name segment, field value segment and text description segment through the first data packet in the preset JSON format. The front-end parses the first data packet through the preset JSON format, and obtains the first parsed result of the target object based on the identifier and the corresponding value configured in each preset segment, determines the content of the target object to be displayed and uses it for display, so that the interaction between the front-end and the back-end can be more efficient, further improving the interaction quality and interaction efficiency.
[0009] In some preferred implementations of the first aspect, parsing the first data packet according to the preset JSON format to obtain a first parsing result of the target object includes:
[0010] The field name, field value and field text description corresponding to the target object are queried through the identifier, and the field name, field value and field text description corresponding to the target object are determined as the first parsing result.
[0011] In some preferred implementations of the first aspect, the step of responding to a preset trigger mechanism and obtaining a first data packet in a preset JSON format of the target object from a backend includes:
[0012] When a user accesses the front-end interface through a browser, or in response to a refresh operation of the user, or at preset intervals, a first data packet of a target object in a preset JSON format is obtained from the back-end.
[0013] In some preferred implementations of the first aspect, after displaying the target object according to the first parsing result, the interaction method further includes:
[0014] In response to the preset trigger mechanism, a second data packet in the preset JSON format is obtained from the backend; the second data packet is obtained by modifying the value configured in each preset segment of the identifier of the first data packet based on the field return value modification operation by the backend user;
[0015] Parsing the second data packet according to the preset JSON format to obtain a second parsing result of the target object;
[0016] The target object is displayed according to the second parsing result.
[0017] In some preferred embodiments of the first aspect, before obtaining the first data packet in the preset JSON format of the target object from the backend, the interaction method also includes: the first data packet in the preset JSON format of the target object is asymmetrically encrypted by the backend, or the first data packet in the preset JSON format of the target object includes a digital signature.
[0018] The second aspect of the present invention provides a method for interacting front-end and back-end data, which is applied to the back-end, and the interaction method includes:
[0019] When the front end responds to the preset trigger mechanism, a first data packet in a preset JSON format of the target object is sent to the front end, wherein the preset JSON format includes a plurality of identifiers, and each identifier is configured with a corresponding value in each preset segment; the preset segment includes: a field name segment, a field value segment, and a text description segment;
[0020] So that the front end parses the first data packet according to the preset JSON format, obtains a first parsing result of the target object, and displays the target object according to the first parsing result.
[0021] In some preferred implementations of the second aspect, the front end parses the first data packet according to the preset JSON format to obtain a first parsing result of the target object, including:
[0022] The front end queries the field name, field value and field text description corresponding to the target object through the identifier, and determines the field name, field value and field text description corresponding to the target object as the first parsing result.
[0023] In some preferred implementations of the second aspect, the front end parses the first data packet according to the preset JSON format to obtain a first parsing result of the target object, including:
[0024] The front end queries the field name, field value and field text description corresponding to the target object through the identifier, and determines the field name, field value and field text description corresponding to the target object as the first parsing result.
[0025] In some preferred implementations of the second aspect, after the front end displays the target object according to the first parsing result, the interaction method further includes:
[0026] In response to a field return value modification operation by a backend user, the values of the identifier of the first data packet configured in each preset segment are modified to obtain a second data packet;
[0027] The second data packet in the preset JSON format is sent to the front end, so that the front end parses the second data packet according to the preset JSON format, obtains a second parsing result of the target object, and displays the target object according to the second parsing result.
[0028] In some preferred implementations of the second aspect, before sending the first data packet in a preset JSON format of the target object to the front end, the interaction method further includes: performing non-object encryption on the initial data packet, or adding a digital signature to the initial data packet to obtain the first data packet.
[0029] A third aspect of the present invention provides a front-end and back-end data interaction device, comprising a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
[0030] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the operation of the front-end and back-end data interaction method. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 : A flow chart of the first embodiment of the front-end and back-end data interaction method provided in the present application.
[0032] Figure 2 : A flowchart of an example of a front-end and back-end data interaction method based on the JSON protocol provided by the prior art.
[0033] Figure 3 : A schematic diagram of the JSON protocol format based on key-value pairs provided by the prior art.
[0034] Figure 4 : A schematic diagram of an embodiment of the JSON format provided by the present application.
[0035] Figure 5 : A specific flow chart of step S102 of the second embodiment of the front-end and back-end data interaction method provided in the present application.
[0036] Figure 6: A specific flow chart of step S101 of the second embodiment of the front-end and back-end data interaction method provided in the present application.
[0037] Figure 7 : A specific flow chart of the third embodiment of the front-end and back-end data interaction method provided in the present application.
[0038] Figure 8 : A structural diagram of the first embodiment of the front-end and back-end data interaction device provided by the present invention. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] According to relevant technical records, a large amount of data interaction is often required between the front-end and the back-end, and the commonly used interaction formats include JSON, XML, and form formats. Among them, the JSON (JavaScript Object Notation) protocol is an open source data interaction protocol that supports objects and arrays and can flexibly represent complex data structures.
[0041] In addition, the JSON protocol has the characteristics of being lightweight, easy to parse, and having a clear structure. Specifically, this code data format is often concise, easy to read and write, and occupies less bandwidth in communication; most programming languages often have JSON parsing libraries, so it is convenient for the backend to perform related data processing; in addition, it supports structures such as objects and arrays, and can flexibly represent complex data structures.
[0042] like Figure 2 As shown, Figure 2A flowchart of an example of the prior art is given. In the process of front-end and back-end interaction, the front-end technician initially follows the code format of the target object by assigning a variable to the target object, and then constructing a key-value pair for the variable, at which point the code development is completed. When the back-end requirements change, the back-end technician tells the front-end technician the new requirements offline; the front-end technician modifies the target object code based on the new requirements (mainly modifying the correspondence between the above key-value pairs); after the modification, it needs to be reviewed by the project architect; then the changed code is run and tested; deployed to the test environment and the production environment to update the target object, so a series of cumbersome processes are required, and there are problems such as low interaction efficiency and slow update speed.
[0043] As an example, the above JSON protocol based on the key-value pair format is as follows Figure 3 shown. Figure 3 In the example shown, userId, userName, isActive, age, and phoneNumbers are the field keys, and 12345, "Johndoe", true, 30, and "987-654-3210" are the field values.
[0044] When the back-end requirements change, for example, when the "userId" needs to be modified, the back-end technicians need to tell the front-end technicians the specific modified content offline, and then the front-end technicians modify the key-value pair, and then repeat the above code review, run tests and deployment for the code changes. In this process, the data needs to be uploaded to the server and the server needs to be restarted. Therefore, even if the enterprise process is perfect, the entire process takes at least several hours and at most several days, which is very inefficient.
[0045] For one or more of the above technical issues, please refer to Figure 1 , Figure 1 The flowchart of the first embodiment of the method for interacting front-end and back-end data provided by the present invention is as follows. The interactive method can be applied to the front-end or the client. The front-end or the client communicates with the back-end or the server to realize data interaction.
[0046] Figure 1 The front-end and back-end data interaction method shown includes steps S101 to S103, which are described in detail as follows:
[0047] Step S101, in response to a preset trigger mechanism, obtaining a first data packet in a preset JSON format of a target object from a backend.
[0048] In this step, the preset JSON format may be a data format agreed upon by the front end and the back end. The preset JSON format includes several identifiers. The above identifiers may be digital identifiers or string identifiers. For example, the digital identifier may be an array subscript.
[0049] According to the above preset JSON format, the code of the target object includes several preset segments, and each identifier is configured with a corresponding value in each preset segment. The preset segments include: field name segment, field value segment and text description segment.
[0050] Specifically, the field name segment may include the mapping relationship between the above identifier and the field key of the target object; the field value segment may include the mapping relationship between the field value of the target object and the above identifier; the text description segment may include the mapping relationship between the text description of the target object field and the above identifier. The text description may be in Chinese, English or other foreign languages.
[0051] For example, Figure 4 As shown, Figure 4 This is a schematic diagram of an embodiment of the JSON format applied for in the present invention.
[0052] In the figure, "h" is the field name segment, "b" is the field value segment, and "r" is the text description segment. In the figure, "0", "1", "2", "3" and "4" are the identifiers, which can be array subscripts.
[0053] In response to the above-mentioned preset trigger mechanism, the user can send a Hypertext Transfer Protocol (HTTP) request for JSON data to the backend through the front end. The backend processes the request and sends a first data packet in the preset JSON format described in any of the above-mentioned implementation modes to the front end. The front end obtains the first data packet of the target object.
[0054] Step S102: Parse the first data packet according to the preset JSON format to obtain a first parsing result of the target object.
[0055] In this step, the front end parses the first data packet sent by the back end according to the preset JSON format agreed upon with the back end protocol, and obtains a first parsing result of the target object.
[0056] During the parsing process, the content of the first data packet can be identified and verified, for example, to verify whether it has characteristic fields or characters, and then obtain the first parsing result for display in step S103 to prevent the data from being tampered with during the interaction process, thereby ensuring the security of data interaction.
[0057] Step S103: display the target object according to the first parsing result.
[0058] In this step, the front-end device may be provided with or externally connected to a display unit, which includes but is not limited to a display screen and a projector. The front-end device displays an application interface on the display unit, and the application interface may be an application interface loaded based on a browser.
[0059] The target object may be a content item of the application interface. In step S101, in response to the preset trigger mechanism, the front end parses the data packet sent by the back end in the preset JSON format to obtain a first parsing result, and then the target object may be displayed in the application interface according to the first parsing result.
[0060] In the implementation of the embodiment of the present application, when the preset trigger mechanism is met, the trigger mechanism is responded to and the first data packet in the preset JSON format of the target object is obtained from the backend. The preset JSON format is the data format agreed upon by the frontend and the backend, including several identifiers, and each identifier is configured with a corresponding value in each preset segment. The preset segment includes a field name segment, a field value segment and a text description segment. The present application improves the JSON format of the target object from the perspective of code development, avoiding the problems of insufficient modification flexibility, large workload and cumbersome process brought about by the fixed definition of key-value pairs in the prior art, and there is no need to re-modify the code definition, review, run tests and deploy a series of cumbersome processes The method of the present application does not require the back-end technical personnel to tell the front-end technical personnel to modify the requirements offline, but records the modification requirements in the field name segment, field value segment and text description segment through the first data packet in the preset JSON format. The front-end parses the first data packet through the preset JSON format, and obtains the first parsed result of the target object based on the identifier and the corresponding value configured in each preset segment, determines the content of the target object to be displayed and uses it for display, so that the interaction between the front-end and the back-end can be more efficient, further improving the interaction quality and interaction efficiency.
[0061] exist Figure 1 Based on the embodiment shown, Figure 5 The flowchart of the second embodiment of the method for interacting front-end and back-end data of the present invention is shown. Figure 1 The same steps will not be repeated here. Figure 5 As shown, step S102 includes step S501, specifically:
[0062] Step S501: query the field name, field value and field text description corresponding to the target object through the digital identifier, and determine the field name, field value and field text description corresponding to the target object as the first parsing result.
[0063] As described above, the above identifier can be a numeric identifier or a string identifier, and the numeric identifier can be an array subscript.
[0064] Since the field name segment can contain the mapping relationship between the above identifier and the field key of the target object; the field value segment can contain the mapping relationship between the field value of the target object and the above identifier; the text description segment can contain the mapping relationship between the field text description of the target object and the above identifier. Therefore, the field name, field value and field text description corresponding to the target object can be queried through the identifier, for example Figure 4 As shown, when the array subscript is "1", the field name of the target object is "userName", the field value is "JohnDoe", the field text description is "name", and the first parsing result is obtained.
[0065] In this embodiment, the field name is equivalent to a variable that describes the target object, the field value is the value corresponding to the variable, and the field text description can carry the description information of the target object, specifically the information that needs to be modified by the back end. The identifier can concatenate the above-mentioned field name, field value, and field text description to construct a relationship between the three. By querying the identifier, the field name, field value, and field text description of the target object can be obtained.
[0066] In some preferred implementations, step S101 includes: when a user accesses the front-end interface through a browser, or in response to a user refresh operation, or at preset time intervals, obtaining a first data packet in a preset JSON format of the target object from the back-end.
[0067] In this embodiment, the preset trigger mechanism can be triggered when it is detected that the user accesses the front-end interface through the browser, can be triggered when the user clicks the refresh operation, or can be triggered at regular intervals (for example, 1 second). When the above preset trigger mechanism is met, the latest first data packet is obtained from the back end, which can ensure that the latest display data is obtained when the user accesses the browser or when the user manually refreshes. Compared with the prior art, there is no need for the front end to re-define the code, review, run tests, and deploy a series of cumbersome steps, which makes it easier for the front end to display the latest data to the target object, saving manpower and material resources while realizing dynamic display.
[0068] In some preferred embodiments, Figure 6 As shown, after step S103, the front-end and back-end data interaction method further includes steps S601 to S603, which are described in detail as follows:
[0069] Step S601, in response to the preset trigger mechanism, obtaining a second data packet in the preset JSON format from a backend.
[0070] Step S602: Parse the second data packet according to the preset JSON format to obtain a second parsing result of the target object.
[0071] Step S603: display the target object according to the second parsing result.
[0072] In this embodiment, the second data packet is obtained by modifying the values configured in each preset segment of the identifier of the first data packet based on the field return value modification operation by the back-end user. Based on the above field return value modification operation, the back-end technician modifies the field name segmentation, field value segmentation and / or text description segmentation of the target object, for example, modifies the mapping relationship between the identifier and the field name, field value and / or text description, and obtains the second data packet. At this time, the back-end technician can send the proposed modification requirements to the front-end through the second data packet in the preset JSON format; when the above preset trigger mechanism is met, the front-end obtains the modified preset JSON format data from the back-end, that is, the above second data packet; and then the second parsing result of the target object can be obtained based on the latest modified data, and the target object can be displayed according to the second parsing result. Compared with the prior art, the back-end technician only needs to adjust the field return value to realize the dynamic change of the field display text without the front-end and back-end perception. This process only takes a few minutes or even tens of seconds, without a series of cumbersome steps such as code review, running tests and deployment.
[0073] In a preferred embodiment, before obtaining the first data packet of the target object in the preset JSON format from the backend in step S101, the interaction method further includes: the first data packet of the target object in the preset JSON format is asymmetrically encrypted by the backend, or the first data packet of the target object in the preset JSON format includes a digital signature. Through asymmetric encryption or adding a digital signature to the first data packet, the front end can prevent data from being tampered with by identifying and verifying specific fields in the first data packet, thereby protecting sensitive information and increasing the security of the front-end and back-end data interaction process.
[0074] Correspondingly, the present invention also provides a third embodiment of the method for interacting front-end and back-end data. Figure 7 As shown, Figure 7 A flow chart of a third embodiment of a method for interacting front-end and back-end data is shown.
[0075] Figure 7 The illustrated embodiment includes step S701, specifically:
[0076] Step S701, when the front end responds to a preset trigger mechanism, sends a first data packet in a preset JSON format of the target object to the front end; so that the front end parses the first data packet according to the preset JSON format, obtains a first parsing result of the target object, and displays the target object according to the first parsing result.
[0077] The preset JSON format includes several identifiers, and each identifier is configured with a corresponding value in each preset segment; the preset segments include: a field name segment, a field value segment, and a text description segment.
[0078] Understandably, Figure 7 One of the differences between the illustrated embodiment and the first embodiment includes the difference in the execution subject, wherein the first embodiment is applied to the front end, and the third embodiment is applied to the back end. When the front end responds to the preset trigger mechanism, the back end can receive the hypertext transfer protocol request for JSON data sent by the front end, and send a first data packet in the preset JSON format of the target object to the front end.
[0079] In some preferred implementations, the front end parses the first data packet according to the preset JSON format to obtain the first parsing result of the target object, including: the front end queries the field name, field value and field text description corresponding to the target object through the identifier, and determines the field name, field value and field text description corresponding to the target object as the first parsing result. The steps described in this preferred implementation are the same as step S501, and will not be repeated in this embodiment.
[0080] In some preferred embodiments, step S701 describes sending a first data packet in a preset JSON format of a target object to the front end when the front end responds to a preset trigger mechanism, including: when a user accesses the interface of the front end through a browser, or the front end responds to a user's refresh operation, or at preset time intervals, sending a first data packet in a preset JSON format of a target object to the front end.
[0081] In some preferred embodiments, after the front end displays the target object according to the first parsing result in step S701, the interaction method further includes: responding to a field return value modification operation by a backend user, modifying the value of the identifier of the first data packet in each preset segment configuration to obtain a second data packet; sending the second data packet in the preset JSON format to the front end, so that the front end parses the second data packet according to the preset JSON format, obtains a second parsing result of the target object, and displays the target object according to the second parsing result.
[0082] In some preferred embodiments, before sending the first data packet in a preset JSON format of the target object to the front end in step S701, the interaction method further includes: asymmetrically encrypting the initial data packet, or adding a digital signature to the initial data packet to obtain the first data packet.
[0083] exist Figures 1 to 7 Based on the embodiment shown, Figure 8 A front-end and back-end data interaction device is shown, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the operation of the front-end and back-end data interaction method.
[0084] Figure 8 The schematic diagram of the structure of an embodiment of the front-end and back-end data interaction device of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the front-end and back-end data interaction device.
[0085] like Figure 8 As shown, the front-end and back-end data interaction device may include: a processor (processor) 802, a communication interface (Communications Interface) 804, a memory (memory) 806, and a communication bus 808.
[0086] The processor 802, the communication interface 804, and the memory 806 communicate with each other via a communication bus 808. The communication interface 804 is used to communicate with other devices such as a client or other server network elements. The processor 802 is used to execute a program 810, which can specifically execute the relevant steps in the above-mentioned embodiment of the method for interaction between front-end and back-end data.
[0087] Specifically, the program 810 may include program code including computer executable instructions.
[0088] The processor 802 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiment of the present invention. The one or more processors included in the front-end and back-end data interaction device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0089] The memory 806 is used to store the program 810. The memory 806 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0090] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. Similarly, in order to simplify the present invention and help understand one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. Wherein, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself is a separate embodiment of the present invention.
[0091] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for interaction between front-end and back-end data, characterized in that: Applied to the front end, the interaction method includes: In response to a preset trigger mechanism, a first data packet in a preset JSON format of a target object is obtained from a backend; the preset JSON format includes a number of identifiers, and each identifier is configured with a corresponding value in each preset segment; the preset segment includes: a field name segment, a field value segment, and a text description segment; Parsing the first data packet according to the preset JSON format to obtain a first parsing result of the target object; The target object is displayed according to the first parsing result.
2. A method for front-end and back-end data interaction as claimed in claim 1, characterized in that: The parsing the first data packet according to the preset JSON format to obtain a first parsing result of the target object includes: The field name, field value and field text description corresponding to the target object are queried through the identifier, and the field name, field value and field text description corresponding to the target object are determined as the first parsing result.
3. The method for front-end and back-end data interaction according to claim 1, characterized in that: The response to the preset trigger mechanism obtains the first data packet of the target object in the preset JSON format from the backend, including: When a user accesses the front-end interface through a browser, or in response to a refresh operation of the user, or at preset intervals, a first data packet of the target object in a preset JSON format is obtained from the back-end.
4. The method for front-end and back-end data interaction according to claim 1, characterized in that: After displaying the target object according to the first parsing result, the interaction method further includes: In response to the preset trigger mechanism, a second data packet in the preset JSON format is obtained from the backend; the second data packet is obtained by modifying the value configured in each preset segment of the identifier of the first data packet based on the field return value modification operation by the backend user; Parsing the second data packet according to the preset JSON format to obtain a second parsing result of the target object; The target object is displayed according to the second parsing result.
5. The method for front-end and back-end data interaction according to claim 1, characterized in that: Before obtaining the first data packet in the preset JSON format of the target object from the back end, the interaction method also includes: the first data packet in the preset JSON format of the target object is asymmetrically encrypted by the back end, or the first data packet in the preset JSON format of the target object includes a digital signature.
6. A method for interaction between front-end and back-end data, characterized in that: Applied to the backend, the interaction method includes: When the front end responds to the preset trigger mechanism, a first data packet in a preset JSON format of the target object is sent to the front end, wherein the preset JSON format includes a plurality of identifiers, and each identifier is configured with a corresponding value in each preset segment; the preset segment includes: a field name segment, a field value segment, and a text description segment; So that the front end parses the first data packet according to the preset JSON format, obtains a first parsing result of the target object, and displays the target object according to the first parsing result.
7. A front-end and back-end data interaction method as claimed in claim 6, characterized in that: The front end parses the first data packet according to the preset JSON format to obtain a first parsing result of the target object, including: The front end queries the field name, field value and field text description corresponding to the target object through the identifier, and determines the field name, field value and field text description corresponding to the target object as the first parsing result.
8. A method for front-end and back-end data interaction as claimed in claim 6, characterized in that: The front end parses the first data packet according to the preset JSON format to obtain a first parsing result of the target object, including: The front end queries the field name, field value and field text description corresponding to the target object through the identifier, and determines the field name, field value and field text description corresponding to the target object as the first parsing result.
9. A method for front-end and back-end data interaction as claimed in claim 6, characterized in that: After the front end displays the target object according to the first parsing result, the interaction method further includes: In response to a field return value modification operation by a backend user, the values of the identifier of the first data packet configured in each preset segment are modified to obtain a second data packet; The second data packet in the preset JSON format is sent to the front end, so that the front end parses the second data packet according to the preset JSON format, obtains a second parsing result of the target object, and displays the target object according to the second parsing result.
10. A front-end and back-end data interaction device, characterized in that: include: It includes a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the operation of the front-end and back-end data interaction method as described in any one of claims 1 to 9.