Standard document execution method, device and electronic equipment
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- RUNSHEN STANDARDIZATION TECH SERVICE (SHANGHAI) CO LTD
- Filing Date
- 2022-08-19
- Publication Date
- 2026-05-29
AI Technical Summary
Existing standard documents cannot be accurately understood by machines, leading to inconsistent user understanding, poor accuracy of inference algorithms, and a long time required to generate machine-executable code from standard documents, which affects the industry's digitalization process.
The standard document and machine-executable code are integrated into a composite standard document, and the execution result is directly calculated by the runtime platform, eliminating the step of deriving the machine-executable code.
It improves the execution speed and accuracy of standard documents, adapting to the needs of industry digitalization.
Smart Images

Figure CN115357287B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of standard document processing technology, and in particular to a standard document execution method, apparatus, and electronic device. Background Technology
[0002] Current standard documents are in Word or PDF format, intended for user reading, not machine processing. Machines cannot accurately understand the semantic content of the standards; users must read the standards, write algorithms based on the various parameters, and then execute them. Because each user's understanding may differ, algorithms derived from the same standard text can have various inconsistencies, leading to poor accuracy. Furthermore, users need to spend a significant amount of time from obtaining the standard to deriving and writing a runnable computer program based on its parameters, resulting in slow standard execution. With the rapid advancement and implementation of digitalization across industries, this slow standard execution speed will be a weak link in the digital transformation of these sectors. Summary of the Invention
[0003] The purpose of this invention is to provide a standard document execution method, apparatus, and electronic device to improve the execution speed of standard documents.
[0004] This invention provides a standard document execution method, the method comprising:
[0005] Obtain the composite standard document corresponding to the standard document, wherein the composite standard document includes the standard document and the machine-executable code corresponding to the standard document;
[0006] The composite standard document, along with the pre-acquired parameters, is sent to the runtime platform so that the runtime platform can calculate the execution result corresponding to the parameters based on the composite standard document.
[0007] Furthermore, the steps to obtain the composite standard document corresponding to the standard document include:
[0008] Obtain the standard documentation and the corresponding machine-executable code.
[0009] Based on standard documents and machine-executable code, a composite standard document corresponding to the standard document is generated.
[0010] Furthermore, the steps of sending the composite standard document and pre-acquired parameters to the runtime platform to obtain the execution result of the standard document corresponding to the parameters include:
[0011] The composite standard document is sent to the runtime platform, which parses the composite standard document to obtain the parsing result; the parsing result includes the standard document and machine-executable code.
[0012] The pre-acquired parameters are sent to the runtime platform, and the machine-executable code is executed by the runtime platform to obtain the execution result corresponding to the parameters.
[0013] Furthermore, the steps of sending the pre-acquired parameters to the runtime platform, executing machine-executable code, and obtaining the execution results corresponding to the parameters include:
[0014] Parameters are obtained through a manual input system or an automatic input system using IoT devices, and then input into the operating platform.
[0015] The machine-executable code is executed by running the platform, and the execution results corresponding to the parameters are obtained.
[0016] Furthermore, the document format for composite standard documents includes either XML or JSON format.
[0017] This invention provides a standard document execution device, the device comprising:
[0018] The acquisition module is used to acquire the composite standard document corresponding to the standard document. The composite standard document includes the standard document and the machine-executable code corresponding to the standard document.
[0019] The execution module is used to send the composite standard document and the pre-acquired parameters to the runtime platform, so that the runtime platform can calculate the execution result corresponding to the parameters based on the composite standard document.
[0020] Furthermore, the acquisition module is also used for:
[0021] Obtain the standard documentation and the corresponding machine-executable code.
[0022] Based on standard documents and machine-executable code, a composite standard document corresponding to the standard document is generated.
[0023] Furthermore, the execution module is also used for:
[0024] The composite standard document is sent to the runtime platform, which parses the composite standard document to obtain the parsing result; the parsing result includes the standard document and machine-executable code.
[0025] The pre-acquired parameters are sent to the runtime platform, and the machine-executable code is executed by the runtime platform to obtain the execution result corresponding to the parameters.
[0026] The present invention provides an electronic device, which includes a processor and a memory. The memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement any of the methods described above.
[0027] The present invention provides a computer-readable storage medium storing computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement any of the methods described above.
[0028] The present invention provides a standard document execution method, apparatus, and electronic device. The method involves acquiring a composite standard document corresponding to a standard document, wherein the composite standard document includes the standard document and its corresponding machine-executable code. The composite standard document, along with pre-acquired parameters, is sent to a runtime platform, enabling the runtime platform to calculate the execution result based on the parameters from the composite standard document. This method directly sends the composite standard document containing machine-executable code and pre-acquired parameters to the runtime platform, allowing the platform to calculate the execution result based on the parameters. This eliminates the time required to derive the executable machine code from the various parameters in the standard document, thereby improving the standard document execution speed. Attached Figure Description
[0029] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0030] Figure 1 A flowchart of a conventional standard document execution method provided in an embodiment of the present invention;
[0031] Figure 2 A flowchart of a standard document execution method provided in an embodiment of the present invention;
[0032] Figure 3 A flowchart of another standard document execution method provided in an embodiment of the present invention;
[0033] Figure 4 This is a schematic diagram of a natural gas composite standard sample provided in an embodiment of the present invention;
[0034] Figure 5 A standard document execution result diagram provided for an embodiment of the present invention;
[0035] Figure 6 A flowchart of the process from writing to execution of a standard document is provided for embodiments of the present invention;
[0036] Figure 7 This is a schematic diagram of the structure of a standard document execution device provided in an embodiment of the present invention;
[0037] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0038] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0039] Current standard documents are in Word or PDF format, intended for user reading, not machine processing. Machines cannot accurately understand the semantic content of the standards; users must read the standards, use the parameters within them, and write algorithms to execute them. For details, see [link to documentation]. Figure 1 The diagram shows a traditional standard document execution method. After receiving the standard document, the user transcribes the parameters in the standard document into machine-executable code (equivalent to an algorithm), and then the computer executes the code to obtain the corresponding execution result.
[0040] The existing technology has the following main drawbacks:
[0041] Because each user's understanding may be different, the algorithms derived from the same standard text may have various inconsistencies, resulting in poor accuracy.
[0042] In addition, it takes a significant amount of time for users to go from obtaining the standard to deriving and writing a runnable computer program based on the various parameters in the standard, resulting in slow standard execution speed.
[0043] Therefore, this traditional approach is inherently inadequate in terms of timeliness. Currently, digitalization is rapidly advancing and being implemented across various industries, and the slow speed of standard execution will be a weak link in industry digitalization. Based on this, the present invention provides a standard document execution method.
[0044] To facilitate understanding of this embodiment, a standard document execution method disclosed in this embodiment will first be described in detail, such as... Figure 2 As shown, the method includes the following steps:
[0045] Step S102: Obtain the composite standard document corresponding to the standard document, wherein the composite standard document includes the standard document and the machine-executable code corresponding to the standard document.
[0046] In practical implementation, the aforementioned standard document can be a normative document written by authors. Specifically, it can be understood as a normative document that is formulated through consensus and approved by a recognized body to achieve optimal order within a certain scope, and is used and reused jointly. The aforementioned composite standard document is a combination of the standard document and its corresponding machine-executable code, and can be executed by a machine. Its specific form can be XML, JSON, or other formats that can describe the composite document. Extensible Markup Language (XML) is a markup language used to mark up electronic documents to give them structure. It can be used to mark up data and define data types. It is a source language that allows users to define their own markup language. XML files can be considered as text-based databases. JSON (JavaScript Object Notation) is a lightweight data-interchange format that is easy for humans to read and write, and also easy for machines to parse and generate. JSON files are used to store simple data structures and objects, and can be used for data exchange in web applications. In actual implementation, the composite standard document corresponding to the standard document is first obtained to ensure that it can be executed by a machine.
[0047] Step S104: Send the composite standard document and the pre-acquired parameters to the runtime platform so that the runtime platform can calculate the execution result corresponding to the parameters based on the composite standard document.
[0048] The aforementioned operating platform can be understood as a software support environment, much like the relationship between an operating system and the applications running on it, or between a language runtime environment and specific language code. In the specific implementation process, the composite standard document obtained in step S102 is sent to an operating platform that can work with the composite standard document, its executable part is extracted, a runtime environment is provided, manually input parameters or parameters sent back by IoT devices are calculated, and results are automatically generated.
[0049] The aforementioned standard document execution method includes obtaining a composite standard document corresponding to the standard document, wherein the composite standard document includes the standard document and the corresponding machine-executable code; and sending the composite standard document and pre-acquired parameters to the runtime platform, so that the runtime platform calculates the execution result corresponding to the parameters based on the composite standard document. This method directly sends the composite standard document containing machine-executable code and pre-acquired parameters to the runtime platform, allowing the runtime platform to calculate the execution result corresponding to the parameters based on the composite standard document. This eliminates the time required to derive the executable machine code from the various parameters in the standard document, thereby improving the standard document execution speed.
[0050] This invention also provides another standard document execution method, which is implemented based on the method in the above embodiments, such as... Figure 3 As shown, the method includes the following steps:
[0051] Step S202: Obtain the standard document and the machine-executable code corresponding to the standard document.
[0052] Step S204: Based on the standard document and machine-executable code, generate a composite standard document corresponding to the standard document.
[0053] In practice, when drafting the patent, both standard documentation and machine-executable code to ensure standard execution are provided, and these are saved as a composite standard document. This ensures that the standard is executed exactly according to the drafter's ideas and requirements, eliminating any deviations that may arise during standard reading and understanding, thus improving accuracy.
[0054] Specifically, during the standard document writing phase, the writers provide machine-executable code for reference, which, together with the standard text, forms a document called a "composite standard document." This document can be in XML, JSON, or other formats that describe the composite document (using composite formats such as XML and JSON to encapsulate the standard itself and the code). Taking the written natural gas standard document as an example, a sample diagram of a natural gas composite standard is shown below. Figure 4 As shown.
[0055] This invention provides a reliable and unmodifiable machine-executable standard implementation method (standard document execution method) by integrating standard documents with their corresponding machine-executable code (the code corresponding to the standard is released along with the standard). This is an inevitable path for the future development of the standards industry. After the textualization and informatization of standard documents, the standards industry will inevitably move towards the digitalization of standards. The core of standard digitalization is the machine-executability of standards. This invention provides an effective path for the digital development of standards.
[0056] Step S206: The composite standard document is sent to the runtime platform, which parses the composite standard document to obtain the parsing result; the parsing result includes the standard document and machine-executable code.
[0057] See Figure 4 The example shown is a natural gas composite standard, wherein the machine-executable code is... Figure 4 The content shown in the dashed box, in actual implementation, involves sending a natural gas composite standard sample (equivalent to the aforementioned composite standard document) to the platform, which can automatically parse the natural gas composite standard sample to obtain the natural gas standard document and the corresponding machine-executable code.
[0058] Step S208: Send the pre-acquired parameters to the running platform, and execute the machine-executable code through the running platform to obtain the execution result corresponding to the parameters.
[0059] Specifically, this step can be achieved through steps one and two:
[0060] Step 1: Obtain parameters through a manual input system or an automatic input system using IoT devices, and input the parameters into the operating platform;
[0061] In practice, people can use instruments to measure specific parameters, such as atmospheric pressure and humidity, and then manually input them into the system, or IoT devices can automatically input the detected parameters (generally referring to parameters read by various sensors as needed, such as thermometers, barometers, hygrometers, etc.).
[0062] Step 2: Execute the machine-executable code through the running platform to obtain the execution results corresponding to the parameters.
[0063] based on Figure 4 As shown in the dashed box, the machine-executable code contains parameters including Hi, His, Pa, and Pb. In actual implementation, these parameter values, obtained through a manual input system or an automatic input system from IoT devices, are input to the runtime platform. The machine-executable code is then executed to obtain the corresponding execution results. For details, see [example...]. Figure 5 The diagram shown illustrates the execution result of a standard document. The generated result is the test result determined according to the standard document, which contains the criteria for determining the natural gas grade. Therefore, according to the algorithm ( Figure 4 By analyzing the machine-executable code and the test parameters, it can be determined whether the submitted natural gas sample is Class I, Class II, or Class III gas. In this embodiment, the test parameter values corresponding to Hi, His, Pa, and Pb are 100, 15, 1.5, and 1.5, respectively. When the corresponding machine-executable code is executed, yi = 0.57 * (100 / 15) * (1.5 / 1.5) = 3.8. Since 3.8 is less than 4, the output result is Class II gas, which means that the submitted natural gas sample can be determined to be Class II gas.
[0064] In addition, for example, if the content of the standard document is the energy consumption standard for electrical appliances, the result (what level of energy consumption the submitted sample electrical appliance is) can also be obtained based on the document and test parameters.
[0065] For a better understanding of the above embodiments, please refer to... Figure 6The flowchart shown illustrates the process of writing and executing a standard document: First, the relevant text of the standard is written, along with the corresponding code (equivalent to obtaining the standard document and its corresponding machine-executable code); the code and standard text are combined into XML (equivalent to generating a composite standard document based on the standard document and the machine-executable code); the composite standard XML is sent to the platform (equivalent to sending the composite standard document to the runtime platform, which parses the composite standard document to obtain the parsing result); the user inputs, or the IoT device inputs detected parameters (equivalent to obtaining parameters through a manual input system or an automatic input system for IoT devices, and inputting the parameters to the runtime platform); the platform is ready to process the input parameters, and automatically outputs the judgment result according to the program (machine-executable code) provided by the standard (equivalent to executing the machine-executable code through the runtime platform to obtain the execution result corresponding to the parameters).
[0066] The aforementioned standard document execution method includes obtaining a composite standard document corresponding to the standard document, wherein the composite standard document includes the standard document and the corresponding machine-executable code; and sending the composite standard document and pre-acquired parameters to the runtime platform, so that the runtime platform calculates the execution result corresponding to the parameters based on the composite standard document. This method directly sends the composite standard document containing machine-executable code and pre-acquired parameters to the runtime platform, allowing the runtime platform to calculate the execution result corresponding to the parameters based on the composite standard document. This eliminates the time required to derive the executable machine code from the various parameters in the standard document, thereby improving the standard document execution speed.
[0067] This invention also provides a standard document execution device, such as... Figure 7 As shown, the device includes: an acquisition module 30, used to acquire a composite standard document corresponding to a standard document, wherein the composite standard document includes a standard document and machine-executable code corresponding to the standard document; and an execution module 31, used to send the composite standard document and pre-acquired parameters to the running platform, so that the running platform calculates the execution result corresponding to the parameters based on the composite standard document.
[0068] The aforementioned standard document execution device includes acquiring a composite standard document corresponding to the standard document, wherein the composite standard document includes the standard document and the corresponding machine-executable code; and sending the composite standard document and pre-acquired parameters to a runtime platform, so that the runtime platform calculates the execution result corresponding to the parameters based on the composite standard document. This device directly sends the composite standard document containing machine-executable code and the pre-acquired parameters to the runtime platform, allowing the runtime platform to calculate the execution result corresponding to the parameters based on the composite standard document. This eliminates the time required to derive executable machine code from various parameters in the standard document, thereby improving the standard document execution speed.
[0069] Furthermore, the acquisition module is also used to: acquire the standard document and the machine-executable code corresponding to the standard document; and generate a composite standard document corresponding to the standard document based on the standard document and the machine-executable code.
[0070] Furthermore, the execution module is also used to: send the composite standard document to the runtime platform, parse the composite standard document through the runtime platform to obtain the parsing result; wherein, the parsing result includes the standard document and machine-executable code; send the pre-acquired parameters to the runtime platform, and execute the machine-executable code through the runtime platform to obtain the execution result corresponding to the parameters.
[0071] Furthermore, the execution module is also used to: obtain parameters through a manual input system or an automatic input system of IoT devices, input the parameters into the running platform; and execute machine-executable code through the running platform to obtain the execution result corresponding to the parameters.
[0072] Furthermore, the document format for composite standard documents includes either XML or JSON format.
[0073] The standard document execution device provided in this embodiment of the invention has the same implementation principle and technical effects as the aforementioned standard document execution method embodiment. For the standard document execution device embodiment, please refer to the corresponding content in the aforementioned standard document execution method embodiment.
[0074] This invention also provides an electronic device, see [link to relevant documentation]. Figure 8 As shown, the electronic device includes a processor 130 and a memory 131. The memory 131 stores machine-executable instructions that can be executed by the processor 130, which executes the machine-executable instructions to implement the above-described method.
[0075] Furthermore, Figure 8 The electronic device shown also includes a bus 132 and a communication interface 133, with the processor 130, the communication interface 133 and the memory 131 connected via the bus 132.
[0076] The memory 131 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 133 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 132 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0077] Processor 130 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 130 or by instructions in software form. Processor 130 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 131, and processor 130 reads the information in memory 131 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0078] This invention also provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are invoked and executed by a processor, they cause the processor to implement the above-described method. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0079] The standard document execution method, apparatus, and electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0080] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0081] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A standard document execution method, characterized in that, The method includes: Obtain the composite standard document corresponding to the standard document, wherein the composite standard document includes the standard document and the machine-executable code corresponding to the standard document; wherein the standard document is a pre-defined normative document, which is formulated through consensus in order to achieve the best order within a pre-defined scope, written by writers, approved by a recognized institution, and used and reused jointly. The composite standard document and the pre-acquired parameters are sent to the runtime platform so that the runtime platform can calculate the execution result corresponding to the parameters based on the composite standard document.
2. The method according to claim 1, characterized in that, The step of obtaining the composite standard document corresponding to the standard document includes: Obtain the standard document and the machine-executable code corresponding to the standard document; Based on the standard document and the machine-executable code, a composite standard document corresponding to the standard document is generated.
3. The method according to claim 1, characterized in that, The step of sending the composite standard document and pre-acquired parameters to the runtime platform to obtain the execution result of the standard document corresponding to the parameters includes: The composite standard document is sent to the runtime platform, which parses the composite standard document to obtain the parsing result; wherein, the parsing result includes the standard document and the machine-executable code; The pre-acquired parameters are sent to the running platform, and the machine-executable code is executed through the running platform to obtain the execution result corresponding to the parameters.
4. The method according to claim 3, characterized in that, The steps of sending the pre-acquired parameters to the running platform, executing the machine-executable code, and obtaining the execution result corresponding to the parameters include: The parameters are obtained through a manual input system or an automatic input system using IoT devices, and then input into the operating platform. The machine-executable code is executed through the running platform to obtain the execution result corresponding to the parameters.
5. The method according to claim 1, characterized in that, The document format of the composite standard document includes either XML or JSON format.
6. A standard document execution device, characterized in that, The device includes: The acquisition module is used to acquire the composite standard document corresponding to the standard document, wherein the composite standard document includes the standard document and the machine-executable code corresponding to the standard document; wherein the standard document is a preset normative document, which is a normative document formulated by consensus in order to obtain the best order within a preset scope, written by writers, approved by a recognized institution, and used and reused by common parties. The execution module is used to send the composite standard document and the pre-acquired parameters to the runtime platform, so that the runtime platform can calculate the execution result corresponding to the parameters based on the composite standard document.
7. The apparatus according to claim 6, characterized in that, The acquisition module is also used for: Obtain the standard document and the machine-executable code corresponding to the standard document; Based on the standard document and the machine-executable code, a composite standard document corresponding to the standard document is generated.
8. The apparatus according to claim 6, characterized in that, The execution module is further configured to: The composite standard document is sent to the runtime platform, which parses the composite standard document to obtain the parsing result; wherein, the parsing result includes the standard document and the machine-executable code; The pre-acquired parameters are sent to the running platform, and the machine-executable code is executed through the running platform to obtain the execution result corresponding to the parameters.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1-5.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, performs the steps of the method described in any one of claims 1-5.