Json rapid positioning verification method, system and device and storage medium

By extracting the positioning expressions in the updated JSON message and parsing the first JSON member to be verified, directly verifying the update part, solving the problem that the modification content cannot be quickly identified when the JSON data is large, and improving the verification efficiency and accuracy.

CN119719126APending Publication Date: 2025-03-28TRAVELSKY TECHNOLOGY LIMITED
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411959435.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

When the JSON data is large, the modification content cannot be quickly identified, resulting in repeated verification of the entire JSON message, which is inefficient and may cause inaccurate comparison results.

Method used

By extracting the positioning expression in the updated JSON message, parsing out the first JSON member to be verified, and verifying it according to the preset verification rules, directly verifying the update part to avoid duplicate processing of the entire JSON message.

Benefits of technology

Automatic identification and positioning of updated content is realized, verification efficiency is improved, duplicate processing is avoided, and the accuracy of comparison results is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119719126A_ABST
    Figure CN119719126A_ABST
Patent Text Reader

Abstract

The invention relates to / belongs to the technical field of data processing, provides a json rapid positioning verification method, system and equipment and a storage medium, and aims to solve the problems that in the prior art, when JSON data is large, which JSON object data is modified is unknown, each node needs to be verified, the verification process is very slow, and the verification efficiency is high. The technical problems that a large number of computing resources are consumed, and the comparison result is inaccurate are solved. Comprising the following steps: acquiring and analyzing an updated JSON message, and extracting a positioning expression in the updated JSON message; based on the positioning expression, analyzing the updated JSON message to obtain a first JSON member to be verified; according to a preset verification rule, verifying the first JSON member to obtain a rule verification result; and carrying out statistics on the rule verification result to obtain a data verification result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of data processing technology, and in particular relates to a JSON fast positioning verification method, system, device and storage medium. Background Art

[0002] JSON (JavaScript Object Notation) is a lightweight data exchange format. JSON can convert a set of data represented in a JavaScript object into a string, which can then be easily transferred across the network or between programs, and restored to a data format supported by each programming language when needed. In practical applications, the security and transmission security of JSON data are very important. When the requester communicates with the server, in order to determine whether the data modified by the requester is correct, it is usually necessary to verify the JSON format data.

[0003] In the prior art, online tools are used to verify whether the JSON format is correct. If the format is correct, the content is checked. The way to verify the JSON content is generally to format the JSON, then expand each level of the JSON, check whether the value of each JSON object is updated or modified one by one, and verify each value. For smaller JSON data, each modified and updated key-value pair can be manually checked to see if it complies with the specification.

[0004] The prior art has the following technical problems: When the JSON data is large, it is not known which JSON object data has been modified, and each node needs to be verified. This will make the verification process very slow, consume a lot of computing resources, and cause inaccurate comparison results. Summary of the invention

[0005] The present invention provides a JSON fast positioning verification method, system, device and storage medium, aiming to solve the technical problems existing in the above-mentioned prior art that when the JSON data is large, it is not known which JSON object data has been modified, and each node needs to be verified, so that the verification process will be very slow, resulting in the consumption of a large amount of computing resources and inaccurate comparison results.

[0006] The technical solution of the present invention to solve the above technical problems is as follows: a JSON fast positioning and verification method, comprising: Obtain and analyze the update JSON message, and extract the positioning expression in the update JSON message; Based on the positioning expression, the update JSON message is parsed to obtain a first JSON member to be verified; Verify the first JSON member according to the preset verification rules to obtain a rule verification result; The rule verification results are counted to obtain data verification results.

[0007] By adopting the above technical solution, the beneficial effects of the present invention are as follows: the present invention realizes automatic identification and positioning of the updated content by extracting the positioning expression in the updated JSON message and parsing the first JSON member to be verified based on the positioning expression. The updated part is directly verified, which avoids repeated processing of the entire JSON message and improves the verification efficiency. It can adapt to different JSON structures by simply adjusting the generation rules of the positioning expression.

[0008] Furthermore, the above also includes: Acquire update and modification information of the original JSON message, and based on the update and modification information, filter all JSON members of the original JSON message to obtain multiple second JSON members to be updated and modified; The value of the second JSON member of the original JSON message is updated and modified, and a replacement JSON message and a third JSON member are correspondingly obtained; Based on the associated storage relationship of the third JSON member in the replacement JSON message, configure a positioning expression for the third JSON member; The positioning expression is compiled into the replacement JSON message to obtain an update JSON message.

[0009] By adopting the above technical solution, the beneficial effects of the present invention are as follows: the present invention ensures data consistency during the update process by screening and updating the update and modification information of the original JSON message. A positioning expression is configured for the updated third JSON member so that each update can be accurately tracked, which is convenient for subsequent auditing or troubleshooting. The updated data is compiled into the replacement JSON message together with the positioning expression, which increases data integrity and security.

[0010] Furthermore, the first JSON member is verified according to the preset verification rules, and the rule verification result obtained specifically includes: Get the key value of the first JSON member; Determine whether the key value of the first JSON member conforms to each element in the verification rule, wherein the elements of the verification rule include: data type, data value range and data length; Get the rule verification results of each element.

[0011] By adopting the above technical solution, the beneficial effect of the present invention is as follows: the present invention ensures the quality and accuracy of the data by performing detailed verification (including data type, value range, length, etc.) on the key value of the first JSON member.

[0012] Furthermore, the above-mentioned statistical analysis of the rule verification results to obtain data verification results specifically includes: Determine whether the rule verification results of all elements are passed: When the rule verification results of all elements are passed, the first JSON member passes the verification; When any of the rule verification results of all elements fails, the first JSON member fails the verification; Among them, the first JSON member passed the verification and the first JSON member failed the verification are the data verification results.

[0013] By adopting the above technical solution, the beneficial effects of the present invention are as follows: the present invention provides a binary result system (pass / fail), which simplifies the understanding and processing of the verification results.

[0014] Further, configuring a positioning expression for the third JSON member based on the associated storage relationship of the third JSON member in the replacement JSON message specifically includes: Traversing all nodes based on the root node of the replacement JSON message and the node where the third JSON member is located to obtain a member set of the third JSON member; Based on the member set, configuring a positioning expression for each third JSON member; Based on each third JSON member and the corresponding configuration positioning expression, an update modification member array is generated, the update modification member array is converted into an update modification member object, and the update modification member object is encrypted to obtain an update modification data object.

[0015] By adopting the above technical solution, the beneficial effects of the present invention are as follows: the present invention configures a positioning expression for each third JSON member separately, which can achieve more fine-grained control and management. The updated and modified member array is converted into a member object and encrypted, which enhances data security and privacy protection. The positioning expression is automatically generated based on the member set obtained by traversing all nodes, which reduces the workload of manual configuration.

[0016] Further, the above-mentioned compilation of the positioning expression into the replacement JSON message to obtain the update JSON message specifically includes: Assigning a preset unique identifier to the updated and modified data object, and using the unique identifier as the name of the associated storage, and using the updated and modified data object as the value of the associated storage; Based on the name and value of the associated storage, converting the updated modified data object into a fourth JSON member; The fourth JSON member is compiled into the root node of the replacement JSON message to obtain an update JSON message.

[0017] By adopting the above technical solution, the beneficial effects of the present invention are as follows: the present invention associates and stores the name and value through a preset unique identifier, thereby ensuring the uniqueness and traceability of the updated data object. The updated data object is added to the root node as a new JSON member, thereby maintaining the consistency and integrity of the JSON message structure, which is convenient for further processing or transmission.

[0018] In a second aspect, in order to solve the above technical problems, the present invention also provides a JSON fast positioning verification system, comprising: A message analysis module, used to obtain and analyze the update JSON message, and extract the positioning expression in the update JSON message; A member extraction module, used to parse the update JSON message based on the positioning expression to obtain a first JSON member to be verified; A verification processing module, used to verify the first JSON member according to a preset verification rule to obtain a rule verification result; The verification determination module is used to collect statistics on the rule verification results to obtain data verification results.

[0019] By adopting the above technical solution, the beneficial effects of the present invention are as follows: the present invention realizes automatic identification and positioning of the updated content by extracting the positioning expression in the updated JSON message and parsing the first JSON member to be verified based on the positioning expression. The updated part is directly verified, which avoids repeated processing of the entire JSON message and improves the verification efficiency. It can adapt to different JSON structures by simply adjusting the generation rules of the positioning expression.

[0020] Furthermore, the above also includes: A member determination module, used to obtain update modification information of the original JSON message, and based on the update modification information, screen all JSON members of the original JSON message to obtain multiple second JSON members to be updated and modified; A data update module, used to update and modify the value of the second JSON member of the original JSON message, and correspondingly obtain a replacement JSON message and a third JSON member; A positioning configuration module, configured to configure a positioning expression for the third JSON member based on an associated storage relationship of the third JSON member in the replacement JSON message; The message generation module is used to compile the positioning expression into the replacement JSON message to obtain an updated JSON message.

[0021] By adopting the above technical solution, the beneficial effects of the present invention are as follows: the present invention ensures data consistency during the update process by screening and updating the update and modification information of the original JSON message. A positioning expression is configured for the updated third JSON member so that each update can be accurately tracked, which is convenient for subsequent auditing or troubleshooting. The updated data is compiled into the replacement JSON message together with the positioning expression, which increases data integrity and security.

[0022] In the third aspect, in order to solve the above-mentioned technical problems, the present invention also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the JSON fast positioning and verification method of the present application is implemented.

[0023] In a fourth aspect, in order to solve the above-mentioned technical problem, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the JSON fast positioning and verification method of the present application is implemented.

[0024] Compared with the prior art, the present invention has the following advantages: 1. The present invention realizes automatic identification and positioning of updated content by extracting the positioning expression in the update JSON message and parsing the first JSON member to be verified based on it. Verification is directly performed on the updated part, avoiding repeated processing of the entire JSON message and improving verification efficiency. It can adapt to different JSON structures by simply adjusting the generation rules of the positioning expression.

[0025] 2. The present invention ensures data consistency during the update process by screening and updating the update and modification information of the original JSON message. A positioning expression is configured for the updated third JSON member so that each update can be accurately tracked, which is convenient for subsequent auditing or troubleshooting. The updated data is compiled into the replacement JSON message together with the positioning expression, which increases data integrity and security.

[0026] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0028] Figure 1 A schematic diagram of a process of a JSON fast positioning verification method according to an embodiment of the present invention is shown; Figure 2 A flow chart of generating an update JSON message according to an embodiment of the present invention is shown; Figure 3 A schematic diagram of the structure of a JSON fast positioning verification system according to an embodiment of the present invention is shown; Figure 4 A schematic diagram of the structure of generating and updating a JSON message according to an embodiment of the present invention is shown; Figure 5 A schematic structural diagram of an electronic device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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.

[0030] Figure 1 A schematic diagram of a JSON fast positioning verification method according to an embodiment of the present invention is shown. Figure 1 As shown, a JSON fast positioning verification method according to an embodiment of the present invention includes: Obtain and analyze the update JSON message, and extract the positioning expression in the update JSON message; Based on the positioning expression, the update JSON message is parsed to obtain a first JSON member to be verified; Verify the first JSON member according to the preset verification rules to obtain a rule verification result; The rule verification results are counted to obtain data verification results.

[0031] In summary, the present invention realizes automatic identification and positioning of updated content by extracting the positioning expression in the update JSON message and parsing the first JSON member to be verified based on it. Verification is directly performed on the updated part, avoiding repeated processing of the entire JSON message and improving verification efficiency. It can adapt to different JSON structures by simply adjusting the generation rules of the positioning expression.

[0032] Optional, such as Figure 2 As shown, it also includes: Acquire update and modification information of the original JSON message, and based on the update and modification information, filter all JSON members of the original JSON message to obtain multiple second JSON members to be updated and modified; The value of the second JSON member of the original JSON message is updated and modified, and a replacement JSON message and a third JSON member are correspondingly obtained; Based on the associated storage relationship of the third JSON member in the replacement JSON message, configure a positioning expression for the third JSON member; The positioning expression is compiled into the replacement JSON message to obtain an update JSON message.

[0033] In summary, the present invention ensures data consistency during the update process by screening and updating the update and modification information of the original JSON message. A positioning expression is configured for the updated third JSON member so that each update can be accurately tracked, which is convenient for subsequent auditing or troubleshooting. The updated data is compiled into the replacement JSON message together with the positioning expression, which increases data integrity and security.

[0034] Optionally, the first JSON member is verified according to a preset verification rule, and the rule verification result obtained specifically includes: Get the key value of the first JSON member; Determine whether the key value of the first JSON member conforms to each element in the verification rule, wherein the elements of the verification rule include: data type, data value range and data length; Get the rule verification results of each element.

[0035] In summary, the present invention ensures the quality and accuracy of the data by performing detailed verification (including data type, value range, length, etc.) on the key value of the first JSON member.

[0036] Optionally, statistics are collected on the rule verification results to obtain data verification results, which specifically include: Determine whether the rule verification results of all elements are passed: When the rule verification results of all elements are passed, the first JSON member passes the verification; When any of the rule verification results of all elements fails, the first JSON member fails the verification; Among them, the first JSON member passed the verification and the first JSON member failed the verification are the data verification results.

[0037] In summary, the present invention provides a binary result system (pass / fail), which simplifies the understanding and processing of the verification results.

[0038] Optionally, configuring a positioning expression for the third JSON member based on the associated storage relationship of the third JSON member in the replacement JSON message specifically includes: Traversing all nodes based on the root node of the replacement JSON message and the node where the third JSON member is located to obtain a member set of the third JSON member; In this embodiment, the function of this step is to record all nodes along the way from the root node to the node where the member to be updated is located to form a member set.

[0039] Based on the member set, configuring a positioning expression for each third JSON member; Based on each third JSON member and the corresponding configuration positioning expression, an update modification member array is generated, the update modification member array is converted into an update modification member object, and the update modification member object is encrypted to obtain an update modification data object.

[0040] In summary, the present invention configures a positioning expression for each third JSON member separately, which can achieve more fine-grained control and management. The updated and modified member array is converted into a member object and encrypted, which enhances data security and privacy protection. The positioning expression is automatically generated based on the member set obtained by traversing all nodes, reducing the workload of manual configuration.

[0041] Optionally, compiling the positioning expression into the replacement JSON message to obtain the update JSON message specifically includes: Assigning a preset unique identifier to the updated and modified data object, and using the unique identifier as the name of the associated storage, and using the updated and modified data object as the value of the associated storage; Based on the name and value of the associated storage, converting the updated modified data object into a fourth JSON member; The fourth JSON member is compiled into the root node of the replacement JSON message to obtain an update JSON message.

[0042] In summary, the present invention associates and stores the name and value through a preset unique identifier, thereby ensuring the uniqueness and traceability of the updated data object. The updated data object is added to the root node as a new JSON member, maintaining the consistency and integrity of the JSON message structure, which is convenient for further processing or transmission.

[0043] Based on Figure 1 Based on the same principle as the method shown in , the embodiment of the present invention also provides a JSON fast positioning verification system, such as Figure 3 As shown in, including: A message analysis module, used to obtain and analyze the update JSON message, and extract the positioning expression in the update JSON message; A member extraction module, used to parse the update JSON message based on the positioning expression to obtain a first JSON member to be verified; A verification processing module, used to verify the first JSON member according to a preset verification rule to obtain a rule verification result; The verification determination module is used to collect statistics on the rule verification results to obtain data verification results.

[0044] In summary, the present invention realizes automatic identification and positioning of updated content by extracting the positioning expression in the update JSON message and parsing the first JSON member to be verified based on it. Verification is directly performed on the updated part, avoiding repeated processing of the entire JSON message and improving verification efficiency. It can adapt to different JSON structures by simply adjusting the generation rules of the positioning expression.

[0045] Optional, such as Figure 4 As shown, it also includes: A member determination module, used to obtain update modification information of the original JSON message, and based on the update modification information, screen all JSON members of the original JSON message to obtain multiple second JSON members to be updated and modified; A data update module, used to update and modify the value of the second JSON member of the original JSON message, and correspondingly obtain a replacement JSON message and a third JSON member; A positioning configuration module, configured to configure a positioning expression for the third JSON member based on an associated storage relationship of the third JSON member in the replacement JSON message; The message generation module is used to compile the positioning expression into the replacement JSON message to obtain an updated JSON message.

[0046] In summary, the present invention ensures data consistency during the update process by screening and updating the update and modification information of the original JSON message. A positioning expression is configured for the updated third JSON member so that each update can be accurately tracked, which is convenient for subsequent auditing or troubleshooting. The updated data is compiled into the replacement JSON message together with the positioning expression, which increases data integrity and security.

[0047] The JSON quick positioning and verification system of the embodiment of the present invention can execute the JSON quick positioning and verification method provided by the embodiment of the present invention, and the implementation principle is similar. The actions performed by each module and unit in the JSON quick positioning and verification system in each embodiment of the present invention correspond to the steps in the JSON quick positioning and verification method in each embodiment of the present invention. For the detailed functional description of each module of the JSON quick positioning and verification system, please refer to the description in the corresponding JSON quick positioning and verification method shown in the previous text, which will not be repeated here.

[0048] Among them, the above-mentioned JSON fast positioning and verification system can be a computer program (including program code) running in a computer device, for example, the JSON fast positioning and verification system is an application software; the application software can be used to execute the corresponding steps in the method provided in the embodiment of the present invention.

[0049] In some embodiments, the JSON fast positioning and verification system provided by the embodiments of the present invention can be implemented in a combination of software and hardware. As an example, the JSON fast positioning and verification system provided by the embodiments of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the JSON fast positioning and verification method provided by the embodiments of the present invention. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs) or other electronic components.

[0050] The modules involved in the embodiments of the present invention may be implemented by software or hardware, wherein the name of a module does not limit the module itself in some cases.

[0051] Based on the same principle as the method shown in the embodiments of the present invention, an electronic device is also provided in the embodiments of the present invention, which may include but is not limited to: a processor and a memory; the memory is used to store a computer program; the processor is used to execute the method shown in any embodiment of the present invention by calling the computer program.

[0052] In an alternative embodiment, an electronic device is provided, such as Figure 5 As shown, Figure 5 The electronic device shown includes: a processor and a memory. The processor and the memory are connected, such as through a bus. Optionally, the electronic device may also include a transceiver, which may be used for data exchange between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver is not limited to one, and the structure of the electronic device does not constitute a limitation on the embodiments of the present invention.

[0053] The processor may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0054] The bus may include a path to transmit information between the above components. The bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0055] The memory can be ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or it can be EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disc, optical disk, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.

[0056] The memory is used to store the application code (computer program) for executing the solution of the present invention, and the execution is controlled by the processor. The processor is used to execute the application code stored in the memory to implement the content shown in the above method embodiment.

[0057] The electronic device may also be a terminal device. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0058] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer can execute the corresponding contents of the aforementioned method embodiment.

[0059] According to another aspect of the present invention, a computer program product or a computer program is also provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the implementation modes of the above-mentioned various embodiments.

[0060] Computer program code for performing the operations of the present invention may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0061] It should be understood that the flow charts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the module, the program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0062] The computer-readable storage medium provided by the embodiment of the present invention may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or device.

[0063] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0064] The above description is only a preferred embodiment of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the disclosure scope involved in the present invention is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) by each other.

Claims

1. A json fast positioning verification method, characterized in that: The method comprises: Obtain and analyze the update JSON message, and extract the positioning expression in the update JSON message; Based on the positioning expression, the update JSON message is parsed to obtain a first JSON member to be verified; Verify the first JSON member according to the preset verification rules to obtain a rule verification result; The rule verification results are counted to obtain data verification results.

2. A JSON fast positioning verification method according to claim 1, characterized in that: Also includes: Acquire update and modification information of the original JSON message, and based on the update and modification information, filter all JSON members of the original JSON message to obtain multiple second JSON members to be updated and modified; The value of the second JSON member of the original JSON message is updated and modified, and a replacement JSON message and a third JSON member are correspondingly obtained; Based on the associated storage relationship of the third JSON member in the replacement JSON message, configure a positioning expression for the third JSON member; The positioning expression is compiled into the replacement JSON message to obtain an update JSON message.

3. A JSON fast positioning verification method according to claim 1, characterized in that: According to the preset verification rules, the first JSON member is verified, and the rule verification result obtained specifically includes: Get the key value of the first JSON member; Determine whether the key value of the first JSON member conforms to each element in the verification rule, wherein the elements of the verification rule include: data type, data value range and data length; Get the rule verification results of each element.

4. A JSON fast positioning verification method according to claim 3, characterized in that: The rule verification results are counted to obtain data verification results including: Determine whether the rule verification results of all elements are passed: When the rule verification results of all elements are passed, the first JSON member passes the verification; When any of the rule verification results of all elements fails, the first JSON member fails the verification; Among them, the first JSON member passed the verification and the first JSON member failed the verification are the data verification results.

5. A JSON fast positioning verification method according to claim 2, characterized in that: Based on the associated storage relationship of the third JSON member in the replacement JSON message, configuring a positioning expression for the third JSON member specifically includes: Traversing all nodes based on the root node of the replacement JSON message and the node where the third JSON member is located to obtain a member set of the third JSON member; Based on the member set, configuring a positioning expression for each third JSON member; Based on each third JSON member and the corresponding configuration positioning expression, an update modification member array is generated, the update modification member array is converted into an update modification member object, and the update modification member object is encrypted to obtain an update modification data object.

6. A JSON fast positioning verification method according to claim 5, characterized in that: The positioning expression is compiled into the replacement JSON message to obtain the update JSON message, which specifically includes: Assigning a preset unique identifier to the updated and modified data object, and using the unique identifier as the name of the associated storage, and using the updated and modified data object as the value of the associated storage; Based on the name and value of the associated storage, converting the updated modified data object into a fourth JSON member; The fourth JSON member is compiled into the root node of the replacement JSON message to obtain an update JSON message.

7. A JSON fast positioning verification system, characterized in that: include: A message analysis module, used to obtain and analyze the update JSON message, and extract the positioning expression in the update JSON message; A member extraction module, used to parse the update JSON message based on the positioning expression to obtain a first JSON member to be verified; A verification processing module, used to verify the first JSON member according to a preset verification rule to obtain a rule verification result; The verification determination module is used to collect statistics on the rule verification results to obtain data verification results.

8. A JSON fast positioning verification system according to claim 7, characterized in that: Also includes: A member determination module, used to obtain update modification information of the original JSON message, and based on the update modification information, screen all JSON members of the original JSON message to obtain multiple second JSON members to be updated and modified; A data update module, used to update and modify the value of the second JSON member of the original JSON message, and correspondingly obtain a replacement JSON message and a third JSON member; A positioning configuration module, configured to configure a positioning expression for the third JSON member based on an associated storage relationship of the third JSON member in the replacement JSON message; The message generation module is used to compile the positioning expression into the replacement JSON message to obtain an updated JSON message.

9. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer storage medium, characterized in that: The computer storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.