Data transmission method, electronic device and storage medium thereof
By introducing a monitoring mechanism that writes status identifiers and processing count identifiers between the industrial cloud and factory equipment, the problem of factory equipment misjudging the integrity of operating parameter information is solved, ensuring the accuracy and integrity of the operating parameter information.
Patent Information
- Application Number
- CN202211629166.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-19
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2042-12-19
AI Technical Summary
During the wireless data exchange between the industrial cloud and factory equipment, the factory equipment often mistakenly assumes that the industrial cloud has completed uploading the operating parameters, resulting in incomplete and inaccurate operating parameters.
By introducing a monitoring mechanism for write status identifier and processing count identifier between the data request end and the processing end, it is ensured that the data request end checks whether the processing count identifier of the processing end is consistent when the write status identifier is the target status. If they are consistent, the processing parameter information is obtained, thus avoiding incomplete information.
This effectively ensures the accuracy and completeness of the engineering parameters information, avoiding the problem of incorrect engineering parameters information caused by misjudgment.
Smart Images

Figure CN116156529B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to a data transmission method, an electronic device and a storage medium thereof. BACKGROUND
[0002] In the related art, when wireless data interaction is performed between an industrial cloud and a factory device, the industrial cloud usually issues factory parameter information required by the factory device to a public data area, the factory device detects a rising edge change of the industrial cloud, at this time, the factory device waits for several seconds, and then determines that the industrial cloud has completed uploading, and then acquires the factory parameter information in the public data area.
[0003] However, in the above process, there is often a case that the industrial cloud has not completed uploading the factory parameter information, but the factory device determines that the industrial cloud has completed uploading and acquires the factory parameter information, thereby causing the factory device to execute incorrect factory parameter information. Therefore, how to ensure the integrity and accuracy of the factory parameter information has become a technical problem to be solved at present. SUMMARY
[0004] The present application provides a data transmission method, an electronic device and a storage medium thereof, which can ensure the integrity and accuracy of the factory parameter information.
[0005] To achieve the above object, the present application adopts the following technical solutions:
[0006] In a first aspect, the present application provides a data transmission method applied to a data request end, the data request end being used for requesting factory parameter information, and the method comprising: determining first data request information; the first data request information comprising: a factory parameter information request message and a first processing frequency identifier; the first processing frequency identifier being used for representing a frequency of requesting the factory parameter information by the data request end to a data processing end; the data processing end being used for providing the factory parameter information to the data request end; sending the first data request information to a public data area; monitoring a first write state identifier of the data processing end in the public data area; in a case that the first write state identifier is a first target write state identifier, judging whether the first processing frequency identifier is consistent with a second processing frequency identifier of the data processing end; the first target write state identifier being used for representing that the data processing end has provided the factory parameter information; the second processing frequency identifier being used for representing a frequency of providing the factory parameter information by the data processing end to the data request end; and if yes, acquiring the factory parameter information provided by the data processing end from the public data area.
[0007] In combination with the first aspect, in a possible implementation manner, the first data request information is determined, comprising: determining a factory parameter information request message of the data request end; determining the first processing frequency identifier according to a sum of a previous processing frequency identifier of the data request end and a target coefficient; the target coefficient being a positive integer; and generating the first data request information according to the factory parameter information request message and the first processing frequency identifier.
[0008] With reference to the first aspect, in a possible implementation manner, the first data request information further comprises: a second write state identifier of the data request end; determining the first data request information comprises: assigning the second write state identifier of the data request end as a second target write state; the second target write state identifier is used to represent that the data request end has generated the work parameter information request message; and the first data request information is generated according to the work parameter information request message, the first processing frequency identifier, and the second write state identifier.
[0009] With reference to the first aspect, in a possible implementation manner, before determining the first data request information, the method further comprises: determining whether a first write state identifier of the data processing end and a second write state identifier of the data request end are first preset values; if not, assigning the first write state identifier and the second write state identifier as the first preset values; if yes, determining whether a first processing frequency identifier of the data request end is less than a target value; if less than, determining the first data request information; if not less than, assigning the first processing frequency identifier as a second preset value.
[0010] The second aspect provides a data transmission method, applied to a data processing end, the data processing end providing work parameter information; the method comprises: obtaining first data request information from a public data area; the first data request information comprises: a work parameter information request message and a first processing frequency identifier; the first processing frequency identifier is used to represent a number of times that the data request end requests the work parameter information from the data processing end; the data processing end is used to provide the work parameter information to the data request end; determining work parameter information corresponding to the work parameter information request message; assigning a first write state identifier of the data processing end as a first target write state identifier; the first target write state identifier is used to represent that the data processing end has provided the work parameter information; generating first data response information; the first data response information comprises the work parameter information and the first write state identifier; and sending the first data response information to the public data area.
[0011] With reference to the second aspect, in a possible implementation manner, before obtaining the first data request information from the public data area, the method further comprises: monitoring a second write state identifier of the data request end in the public data area; in a case where the second write state identifier is a second target write state identifier, obtaining the first data request information from the public data area; the second target write state identifier is used to represent that the data request end has generated the work parameter information request message.
[0012] With reference to the second aspect, in a possible implementation manner, the first data response information further includes: a second processing frequency identifier; the second processing frequency identifier is used to represent a frequency of providing the parameter information by the data processing end to the data processing end; the first data response information is generated by: assigning the second processing frequency identifier to the first processing frequency identifier of the data request end; and generating the first data response information according to the parameter information, the first write state identifier, and the second processing frequency identifier.
[0013] With reference to the third aspect, in a possible implementation manner, the processing unit is further configured to: determine the parameter information request message of the data request end; and determine the first processing frequency identifier according to a sum of a previous processing frequency identifier of the data request end and a target coefficient; the target coefficient is a positive integer; and generate the first data request information according to the parameter information request message and the first processing frequency identifier.
[0014] With reference to the third aspect, in a possible implementation manner, the processing unit is further configured to: determine the parameter information request message of the data request end; and determine the first processing frequency identifier according to a sum of a previous processing frequency identifier of the data request end and a target coefficient; the target coefficient is a positive integer; and generate the first data request information according to the parameter information request message and the first processing frequency identifier.
[0015] With reference to the third aspect, in a possible implementation manner, the processing unit is further configured to: assign a second write state identifier of the data request end to a second target write state; the second target write state identifier is used to represent that the data request end has generated the parameter information request message; and generate the first data request information according to the parameter information request message, the first processing frequency identifier, and the second write state identifier.
[0016] In a possible implementation manner, in combination with the third aspect, the processing unit is further configured to determine whether the first write state identifier of the data processing end and the second write state identifier of the data request end are first preset values; if not, the first write state identifier and the second write state identifier are assigned the first preset values; if yes, it is determined whether the first processing times identifier of the data request end is less than a target value; if yes, the first data request information is determined; if not, the first processing times identifier is assigned a second preset value.
[0017] In a possible implementation manner, in combination with the fourth aspect, the processing unit is further configured to monitor the second write state identifier of the data request end in the public data area; and the communication unit is further configured to acquire the first data request information from the public data area when the second write state identifier is a second target write state identifier, the second target write state identifier being used to indicate that the data request end has generated the work parameter information request message.
[0018] In a possible implementation manner, in combination with the fourth aspect, the processing unit is further configured to assign the second processing times identifier to the first processing times identifier of the data request end; and generate the first data response information according to the work parameter information, the first write state identifier and the second processing times identifier.
[0019] In a possible implementation manner, in combination with the fourth aspect, the processing unit is further configured to assign the second processing times identifier to the first processing times identifier of the data request end; and generate the first data response information according to the work parameter information, the first write state identifier and the second processing times identifier.
[0020] In a possible implementation manner, in combination with the fourth aspect, the processing unit is further configured to assign the second processing times identifier to the first processing times identifier of the data request end; and generate the first data response information according to the work parameter information, the first write state identifier and the second processing times identifier.
[0021] In a sixth aspect, the present application provides an electronic device applied to a data processing end, comprising a processor and a communication interface; the communication interface is coupled with the processor, and the processor is configured to run computer programs or instructions to implement the data transmission method described in the second aspect and any possible implementation manner of the second aspect.
[0022] In a seventh aspect, the present application provides a computer readable storage medium, which stores instructions, and when the instructions are run on a terminal, the terminal executes the data transmission method described in the first aspect and any possible implementation manner of the first aspect.
[0023] In an eighth aspect, the present application provides a computer readable storage medium, which stores instructions, and when the instructions are run on a terminal, the terminal executes the data transmission method described in the second aspect and any possible implementation manner of the second aspect.
[0024] In the present application, the names of the above-mentioned electronic devices do not constitute a limitation on the devices or functional modules themselves, and in actual implementation, these devices or functional modules can appear with other names. As long as the functions of each device or functional module are similar to those of the present application, they belong to the scope of the claims of the present application and equivalent technologies.
[0025] These aspects or other aspects of the present application will be more apparent in the following description.
[0026] Based on the above technical solution, the data transmission method provided by the embodiments of the present application first sends the first data request information to the public data area by the data request end, and monitors the first write state identifier of the data processing end in the public data area. If the first write state identifier is the first target write state identifier, it indicates that the data processing end has sent the work parameter information to the public data area completely, so as to avoid the incomplete issue of the work parameter information. Finally, the data request end judges whether the first processing times identifier and the second processing times identifier of the data processing end are consistent. If they are consistent, it means that the work parameter information issued by the data processing end is the work parameter information corresponding to the work parameter information request message of the data request end. Then the data request end acquires the work parameter information provided by the data processing end from the public data area, thereby ensuring the accuracy and integrity of the work parameter information. BRIEF DESCRIPTION OF DRAWINGS
[0027] Figure 1 FIG. 1 is a structural schematic diagram of an electronic device provided by the present application;
[0028] Figure 2 FIG. 2 is a structural block diagram of a data transmission method provided by the present application;
[0029] Figure 3Another structural block diagram of a data transmission method provided by the present application is shown in FIG. 6;
[0030] Figure 4 Another flow chart of a data transmission method provided by the present application is shown in FIG. 7;
[0031] Figure 5 Another flow chart of a data transmission method provided by the present application is shown in FIG. 8;
[0032] Figure 6 Another flow chart of a data transmission method provided by the present application is shown in FIG. 9;
[0033] Figure 7 Another flow chart of a data transmission method provided by the present application is shown in FIG. 10;
[0034] Figure 8 Another flow chart of a data transmission method provided by the present application is shown in FIG. 11;
[0035] Figure 9 Another flow chart of a data transmission method provided by the present application is shown in FIG. 12;
[0036] Figure 10 Another structural diagram of an electronic device provided by the present application is shown in FIG. 13;
[0037] Figure 11 Another structural diagram of an electronic device provided by the present application is shown in FIG. 14;
[0038] Figure 12 Another structural diagram of an electronic device provided by the present application is shown in FIG. 15. DETAILED DESCRIPTION
[0039] The data transmission method, electronic device and storage medium provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0040] The term “and / or” in the present document is merely used to describe an association relationship of associated objects, and indicates that there can be three relationships, for example, A and / or B can represent three cases of existence of A alone, existence of A and B simultaneously, and existence of B alone.
[0041] The terms “first” and “second” and the like in the present specification and the accompanying drawings are used to distinguish different objects, or to distinguish different treatments of the same object, and are not used to describe a specific order of the objects.
[0042] Furthermore, the terms "comprising" and "having," and any variations thereof, used in the description of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus.
[0043] It should be noted that in the embodiments of this application, the words "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0044] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device can be a data request terminal or a data processing terminal. Figure 1 As shown, the electronic device 100 includes at least one processor 101, a communication line 102, and at least one communication interface 104, and may also include a memory 103. The processor 101, memory 103, and communication interface 104 are connected to each other via the communication line 102.
[0045] The processor 101 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application, such as one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs).
[0046] Communication line 102 may include a path for transmitting information between the aforementioned components.
[0047] The communication interface 104 is used to communicate with other devices or communication networks. It can use any transceiver-like device, such as Ethernet, radio access network (RAN), wireless local area network (WLAN), etc.
[0048] The memory 103 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of including or storing desired program code having the form of instructions or data structures and accessible by a computer, but not limited thereto.
[0049] In one possible design, the memory 103 can exist independently of the processor 101, meaning the memory 103 can be an external memory of the processor 101. In this case, the memory 103 can be connected to the processor 101 via the communication line 102 to store execution instructions or application code, and its execution is controlled by the processor 101 to implement the network quality determination method provided in the following embodiments of this application. In another possible design, the memory 103 can also be integrated with the processor 101, meaning the memory 103 can be an internal memory of the processor 101. For example, the memory 103 can be a cache, which can be used to temporarily store some data and instruction information.
[0050] As one possible implementation, processor 101 may include one or more CPUs, for example Figure 1 CPU0 and CPU1 in the example. As another possible implementation, data transfer 100 can include up to five processors, for example... Figure 1 The processors 101 and 107 are included. Alternatively, the data transmission 100 may also include an output device 105 and an input device 106.
[0051] Through the above description of the implementation methods, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the above-described division of functional modules is used as an example. In practice, however, the actual implementation...
[0052] In practice, the above functions can be assigned to different functional modules as needed, that is, the internal structure of network node 0 can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, modules and network nodes described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0053] In recent years, data can be transmitted between various industrial devices via wireless networks. Industrial development has gradually shown a trend from automation to digitalization. The form of industrial digitalization has brought about an increase in productivity, enabling the entire production process to become more flexible and intelligent. In the process of industrial digitalization, data transmission between various devices is typically required to be in a low-latency and highly reliable manner.
[0054] However, in practice, data flow between devices can still experience congestion or even packet loss. To address this issue, conventional handshake methods for uploading and downloading data are overly simplistic and idealistic.
[0055] This often results in the factory equipment obtaining the previous parameters, incomplete parameters, or even zero parameters.
[0056] like Figure 2 As shown, in related technologies, one approach is that a product completes its processing at workstation A in a factory and needs to move to workstation B for further processing. At this point, the factory equipment requests the processing parameters for workstation B from the industrial cloud, which then distributes the processing parameters for workstation B.
[0057] When wireless data is exchanged between the industrial cloud and factory equipment, the industrial cloud typically sends the required operating parameters to the public data area. The factory equipment detects the rising edge of the industrial cloud signal and waits a few seconds before assuming the upload is complete and then retrieves the operating parameters from the public data area. However, in this process, there are often instances where the industrial cloud has not finished sending the operating parameters, while the factory equipment assumes the upload is complete and retrieves the information, leading to the factory equipment executing incorrect operating parameter information.
[0058] 0 as Figure 3As shown, another approach involves the industrial cloud sending the required operating parameters to the public data area. After the information is sent, the industrial cloud sets the flag in the public data area to 99. When the factory equipment detects that the flag is 99, it retrieves the operating parameters and initializes the flag. Essentially, the factory equipment sets the flag to 0 after receiving the operating parameters. This approach already includes a simple handshake process. As mentioned above, both the industrial cloud and the factory equipment can read and write to the public data area, which can easily lead to logical inconsistencies in the code. During use, logical errors often occur due to unexplained reasons affecting the flag in the public data area, making it difficult for engineers at both the industrial cloud and the factory equipment to quickly locate the problem.
[0059] To address the problems in the prior art, embodiments of this application provide a method such as... Figure 4 The data transmission method is illustrated. This method includes: a data requesting end sending a determined first data request message to a public data area, and monitoring a first write status identifier of the data processing end within the public data area. If the first write status identifier is a first target write status identifier, it indicates that the data processing end has completely sent the working parameter information to the public data area. At this time, the data requesting end determines whether the first processing count identifier and the second processing count identifier of the data processing end are consistent. If they are consistent, it indicates that the working parameter information is accurate, and the data requesting end obtains the working parameter information provided by the data processing end from the public data area. Compared to the existing technology where the industrial cloud often fails to completely send the working parameter information, while the factory equipment believes that the industrial cloud has completed the upload and obtained the working parameter information, this application monitors the status of the first write status identifier through a data transmission device to determine whether the data processing end has completely sent the working parameter information, and determines whether the first processing count identifier and the second processing count identifier of the data processing end are consistent. This ensures that the working parameter information obtained by the data requesting end is the working parameter information corresponding to the working parameter information request message, thereby ensuring the accuracy and completeness of the working parameter information.
[0060] like Figure 4 The diagram shown is a flowchart of a data transmission method provided in an embodiment of this application. The data transmission method provided in this application can be applied to, for example... Figure 1 In the electronic device shown, the data transmission method provided in this application embodiment can be implemented through the following steps.
[0061] S401, The data requesting end determines the first data request information.
[0062] The first data request information includes: a parameter information request message and a first processing count identifier; the first processing count identifier is used to characterize the number of times the data requesting end requests parameter information from the data processing end; the data processing end is used to provide parameter information to the data requesting end.
[0063] In one example, the data requesting end can be understood as the factory equipment or the programmable logic controller (PLC) end. In this embodiment, the PLC end is mainly used as the data requesting end for illustration. The parameter information request message can be understood as the request information for data such as torque and torque depth of each component on the machine station, and the first processing count identifier can be understood as the number of times the factory equipment requests the parameter message.
[0064] Optionally, the first processing count identifier can be represented by PLC_ID_Flag or Token. For example, if the first processing count identifier is PLC_ID_Flag = 11, it means that the data requesting end has determined the number of times the parameter information request messages and parameter request messages for each component on the machine station have been sent 11 times. This application does not limit this.
[0065] S402, The data requesting end sends the first data request information to the public data area.
[0066] In one example, a common data area is set up between the data requesting end and the data processing end, and the data requesting end sends the first data request information to the common data area.
[0067] S403, The data processing end obtains the first data request information from the public data area.
[0068] In one possible implementation, the first data request information can only be written by the data requesting end, and the first data request information is read-only for the data processing end, which can only acquire and monitor the first data request information.
[0069] Referring to the example in S401, the data processing end can be understood as an industrial cloud or a PC. In this embodiment, the PC is used as the data processing end for illustration. The data processing end obtains from the public data area the request messages from the data requesting end for the working parameter information of each component on the machine station, as well as the number of times the data requesting end requests the working parameter messages.
[0070] S404. The data processing end determines the working parameter information corresponding to the working parameter information request message.
[0071] In one example, the data processing end processes the parameter information request message to determine the parameter information of a certain part on the machine station.
[0072] For example, the working parameters determined by the data processing terminal include: torque of 0.5 kg·m and torque depth of 4 cm.
[0073] S405. The data processing end assigns the first write status flag of the data processing end to the first target write status flag.
[0074] The first target write status identifier is used to indicate that the data processing end has provided the working parameter information.
[0075] In one example, after determining the working parameters, the data processing end adjusts its own first write status flag to the first target write status flag, indicating that the data processing end has determined the working parameters.
[0076] For example, adjusting the first write status flag to the first target write status flag can be understood as the data processing end adjusting its own write status to PC_Flag = 99. This application does not limit the first target write status flag.
[0077] S406, The data processing end generates the first data response information.
[0078] The first data response information includes engineering parameter information and a first write status identifier.
[0079] S407. The data processing terminal sends the first data response information to the public data area.
[0080] Based on the examples in S404 and S405, the data processing terminal sends the working parameters of a certain component at the machine station, namely torque 0.5 kg·m, torque depth 4 cm, and PC_Flag flag = 99, to the common data area.
[0081] S408, The data request end monitors the first write status identifier of the data processing end in the public data area.
[0082] In one possible implementation, the first write status flag can only be written by the data processing end, and the first write status flag is read-only for the data request end, which can only obtain and monitor the first write status flag.
[0083] S409. If the first write status identifier is the first target write status identifier, the data request end determines whether the first processing count identifier and the second processing count identifier of the data processing end are consistent.
[0084] The first target write status identifier is used to indicate that the data processing end has provided the working parameter information; the second processing count identifier is used to indicate the number of times the data processing end has provided the working parameter data to the data request end.
[0085] Based on the examples in S401 and S407, if the data requesting end detects that the PC_Flag flag of the data processing end in the public data area is 99, it will determine whether the first processing count identifier of the data requesting end (11 times) and the second processing count identifier of the data processing end are consistent.
[0086] S410. If so, the data requesting end obtains the working parameter information provided by the data processing end from the public data area.
[0087] Referring to the examples in S407 and S409, if the second processing count identifier of the data processing end is also 11 times, it indicates that the working parameter information provided by the data processing end in the public data corresponds to the working parameter information request message of the data request end. Therefore, the data request end obtains the working parameter information of a certain component at the machine station, namely, torque 0.5 kg·m and torque depth 4 cm. This application does not limit the working parameter information.
[0088] Based on the above technical solution, the data transmission method provided in this application embodiment firstly involves the data requesting end sending a first data request information to the public data area and monitoring the first write status identifier of the data processing end in the public data area. If the first write status identifier is the first target write status identifier, it indicates that the data processing end has completely sent the working parameter information to the public data area, thereby avoiding the situation where the working parameter information is not completely sent. Finally, the data requesting end determines whether the first processing count identifier and the second processing count identifier of the data processing end are consistent. If they are consistent, it indicates that the working parameter information sent by the data processing end is the working parameter information corresponding to the working parameter information request message of the data requesting end. Then, the data requesting end obtains the working parameter information provided by the data processing end from the public data area, thereby ensuring the accuracy and completeness of the working parameter information.
[0089] The data transmission method provided in the embodiments of this application has been described in detail above.
[0090] In one possible implementation, combining Figure 4 ,like Figure 5 As shown, in S401 above, the data requesting end determines the first data request information, which can be specifically implemented through the following S501-S503.
[0091] S501, The data requesting end determines the parameter information request message of the data requesting end.
[0092] S502. The data requesting end determines the first processing count identifier based on the sum of the previous processing count identifier and the target coefficient.
[0093] The target coefficient is a positive integer. For example, the target coefficient can be 1, 2, 3, ...
[0094] Referring to the example in S401, the previous processing count identifier can be understood as the number of times the data requesting end last requested the parameter message. For example, if the last request for the parameter message was 10 times and the target coefficient is 1, then the current request for the parameter message could be 10 + 1 = 11. Ultimately, the determined first processing count identifier must be different from the previous processing count identifier and cannot be greater than or equal to the second preset value. This application does not limit the target coefficient and the second preset value.
[0095] S503, The data requesting end generates the first data request information based on the working parameter information request message and the first processing count identifier.
[0096] The above provides a detailed explanation of how the data requesting end determines the first data request information.
[0097] In one possible implementation, combining Figure 4 ,like Figure 6 As shown, the first data request information in S401 above may further include: a second write status identifier of the data requesting end. Accordingly, in S401 above, the data requesting end determines the first data request information, specifically through the following S601-S602.
[0098] S601, The data requesting end assigns the second write status identifier of the data requesting end to the second target write status.
[0099] The second target write status identifier is used to indicate that the data requesting end has generated a parameter information request message.
[0100] In one example, after the data requesting end determines the parameter information request message and the first processing count identifier, it adjusts its own second write status identifier to the second target write status identifier. For example, the data requesting end adjusts its own write status identifier to: PLC_Flag flag = 99; indicating that the data requesting end has completed the operation. This application does not limit the value of the second target write status identifier.
[0101] S602, The data requesting end generates the first data request information based on the working parameter information request message, the first processing count identifier, and the second write status identifier.
[0102] The above provides a detailed explanation of the second write status identifier, which is also included in the first data request information.
[0103] In one possible implementation, combining Figure 4 ,like Figure 7 As shown, before the data request terminal determines the first data request information in S401, there is also a process to determine whether the data request terminal and the data processing terminal meet the requirements, which can be implemented through the following S701-S705.
[0104] S701, The data request end determines whether the first write status identifier of the data processing end and the second write status identifier of the data request end are the first preset values.
[0105] In one example, the first write status flag on the data processing end can be the PC_Flag flag, and the second write status flag on the data request end can be the PLC_Flag flag, with the first preset value being 0.
[0106] The data requesting end checks whether both the PC_Flag and PLC_Flag flags are equal to 0. This application does not limit the first preset value.
[0107] S702. If not, the data requesting end will assign the first write status identifier and the second write status identifier to the first preset value.
[0108] Referring to the example in S701, if either the first write status identifier or the second write status identifier is not 0, it means that the result of the previous data request terminal's request message for process parameter information was not cleared. In this case, the data request terminal needs to assign the first preset value 0 to the first write status identifier and the second write status identifier.
[0109] S703. If so, the data requester determines whether the first processing count identifier of the data requester is less than the target value.
[0110] Referring to the example in S701, if both the first write status flag and the second write status flag are 0, it indicates that the result of the previous parameter information request message requested by the data requesting end has been cleared. At this time, the data requesting end determines whether its own first processing count flag, PLC_ID_Flag, is less than the target value of 9999. This application does not limit the target value.
[0111] S704. If it is less than, the data requesting end determines the first data request information.
[0112] Referring to the example in S703, if PLC_ID_Flag < 9999, it means that the number of times the electronic device has been used has not reached the upper limit. The data request end determines the parameter information request message, the first processing count identifier, and the second write status identifier.
[0113] S705. If it is not less than, the data requesting end will assign the first processing count identifier to the second preset value.
[0114] Referring to the example in S703, if PLC_ID_Flag ≥ 9999, it indicates that the electronic device has reached its maximum usage limit, and the data requesting end needs to adjust the first processing count flag to the second preset value of 0. This application sets a limit on the second preset value.
[0115] The above provides a detailed description of the steps taken by the S401 data request terminal before determining the first data request information.
[0116] In one possible implementation, combining Figure 4 ,like Figure 8 As shown, before the data processing end obtains the first data request information from the public data area in S403, the data processing end needs to monitor the situation of the data request end, which is specifically achieved through the following S801-S802.
[0117] S801, The data processing terminal monitors the second write status identifier of the data request terminal in the public data area.
[0118] Referring to the example in S402, after the data request end sends the first data request information to the public data area, the data processing end monitors the second write status identifier PLC_Flag flag bit of the data request end.
[0119] S802, when the second write status identifier is the second target write status identifier, the data processing terminal obtains the first data request information from the public data area.
[0120] The second target write status identifier is used to indicate that the data requesting end has generated the working parameter request information.
[0121] For example, if the data processing terminal detects that the PLC_Flag flag is 99, it means that the data request terminal has completed the upload of the first data request information. At this time, the data processing terminal reads the first data request information from the public data area.
[0122] The above provides a detailed explanation of how the data processing end monitors the data request end.
[0123] In one possible implementation, combining Figure 4 ,like Figure 9 As shown, the first data response information in S406 above may further include: a second processing count identifier. In this case, S406 can be specifically implemented through the following S901-S902.
[0124] S901, The data processing end assigns the second processing count identifier to the first processing count identifier of the data request end.
[0125] The second processing count identifier is used to characterize the number of times the data processing terminal provides the working parameter information to the data processing terminal.
[0126] Based on the examples in S802, S404 and S401, after reading the first data request information and determining the working parameter information at the data processing end, the data processing end assigns the first processing count identifier PLC_ID_Flag = 11 from the data request end to its own second processing count identifier PC_ID_Flag. This can be understood as: PC_ID_Flag = PLC_ID_Flag.
[0127] S902, the data processing end generates the first data response information based on the working parameter information, the first write status identifier, and the second processing count identifier.
[0128] Based on the examples in S404, S407 and S901, the data processing terminal generates the first data response information by taking the working parameters of a certain component at the machine station, such as torque 0.5 kg·m, torque depth 4 cm, PC_ID_Flag = PLC_ID_Flag, and PC_Flag flag bit = 99.
[0129] The second processing count identifier, which is also included in the first data response information, has been described in detail above.
[0130] It should be noted that the above description only uses the PLC as the data request end and the PC as the data processing end as an example. In the actual implementation process, the data request end can also be other devices, such as factory equipment or PLC; the data processing end can also be other devices, such as industrial cloud or PC. This application does not limit this.
[0131] This application embodiment can divide an electronic device into functional modules or functional units according to the above method examples. For example, each function can be divided into its own functional modules or functional units, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module or functional unit. The module or unit division in this application embodiment is illustrative and represents only one logical functional division; other division methods may be used in actual implementation.
[0132] like Figure 10The diagram shows a schematic of an electronic device provided in an embodiment of this application. It is applied to a data request terminal, which requests technical parameter information. The electronic device includes a processing unit 1001 and a communication unit 1002. The processing unit 1001 is used to determine first data request information. The first data request information includes a technical parameter information request message and a first processing count identifier. The first processing count identifier represents the number of times the data request terminal requests technical parameter information from the data processing terminal. The data processing terminal provides technical parameter information to the data request terminal. The communication unit 1002 is used to send the first data request information to a public data area. The processing unit 1001 is also used to monitor a first write status identifier of the data processing terminal in the public data area. If the first write status identifier is a first target write status identifier, the processing unit 1001 is also used to determine whether the first processing count identifier and a second processing count identifier of the data processing terminal are consistent. The first target write status identifier represents that the data processing terminal has provided technical parameter information. The second processing count identifier represents the number of times the data processing terminal provides technical parameter data to the data request terminal. If so, the communication unit 1002 is also used to obtain the technical parameter information provided by the data processing terminal from the public data area.
[0133] Optionally, the processing unit 1001 is further configured to determine the parameter information request message from the data requesting end; determine the first processing count identifier based on the sum of the previous processing count identifier and the target coefficient from the data requesting end; the target coefficient is a positive integer; and generate first data request information based on the parameter information request message and the first processing count identifier.
[0134] Optionally, the processing unit 1001 is further configured to assign the second write status identifier of the data request end to the second target write status; the second target write status identifier is used to indicate that the data request end has generated a parameter information request message; and generate first data request information based on the parameter information request message, the first processing count identifier, and the second write status identifier.
[0135] Optionally, the processing unit 1001 is further configured to determine whether the first write status identifier of the data processing end and the second write status identifier of the data request end are a first preset value; if not, then assign the first write status identifier and the second write status identifier to the first preset value; if yes, then determine whether the first processing count identifier of the data request end is less than the target value; if less, then determine the first data request information; if not less, then assign the first processing count identifier to the second preset value.
[0136] like Figure 11The diagram shows a schematic of an electronic device provided in an embodiment of this application. It is applied to a data processing terminal, which provides technical parameter information. The electronic device includes a processing unit 1101 and a communication unit 1102. The communication unit 1102 is used to obtain first data request information from a public data area. The first data request information includes a technical parameter information request message and a first processing count identifier. The first processing count identifier represents the number of times the data request terminal requests technical parameter information from the data processing terminal. The data processing terminal provides technical parameter information to the data request terminal. The processing unit 1101 is used to determine the technical parameter information corresponding to the technical parameter information request message. The processing unit 1101 is also used to assign a first write status identifier of the data processing terminal to a first target write status identifier. The first target write status identifier represents that the data processing terminal has provided technical parameter information. The processing unit 1101 is also used to generate first data response information. The first data response information includes technical parameter information and the first write status identifier. The communication unit 1102 is also used to send the first data response information to the public data area.
[0137] Optionally, the processing unit 1101 is further configured to monitor the second write status identifier of the data requesting end in the public data area; the communication unit 1102 is further configured to obtain the first data request information from the public data area when the second write status identifier is the second target write status identifier; the second target write status identifier is used to indicate that the data requesting end has generated a parameter information request message.
[0138] Optionally, the processing unit 1101 is further configured to assign the second processing count identifier to the first processing count identifier of the data request end; and generate the first data response information based on the working parameter information, the first write status identifier, and the second processing count identifier.
[0139] When implemented in hardware, the communication unit 1002 or communication unit 1102 in this embodiment can be integrated onto the communication interface, and the processing unit 1001 or processing unit 1101 can be integrated onto the processor. Specific implementation methods are as follows: Figure 12 As shown.
[0140] Figure 12A schematic diagram of another possible structure of the electronic device involved in the above embodiments is shown. The electronic device includes a processor 1202 and a communication interface 1203. The processor 1202 is used to control and manage the operation of the electronic device, for example, executing the steps performed by the processing unit 1001 or processing unit 1101, and / or performing other processes of the technology described herein. The communication interface 1203 is used to support communication between the electronic device and other network entities, for example, executing the steps performed by the communication unit 1002 or communication unit 1102. The electronic device may also include a memory 1201 and a bus 1204, the memory 1201 being used to store the program code and data of the electronic device.
[0141] The memory 1201 may be a memory in an electronic device, and the memory may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk or solid-state drive; the memory may also include a combination of the above types of memory.
[0142] The processor 1202 described above can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0143] Bus 1204 can be an Extended Industry Standard Architecture (EISA) bus, etc. Bus 1204 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 12 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0144] Through the above description of the embodiments, those skilled in the art will clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0145] This application provides a computer program product containing instructions that, when run on a computer, cause the computer to execute the data transmission method described in the above method embodiments.
[0146] This application also provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the data transmission method in the method flow shown in the above method embodiments.
[0147] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: electrical connections having one or more wires; portable computer disks; hard disks; random access memory (RAM); read-only memory (ROM); erasable programmable read-only memory (EPROM); registers; hard disks; optical fibers; portable compact disc read-only memory (CD-ROM); optical storage devices; magnetic storage devices; or any suitable combination thereof; or any other form of computer-readable storage medium known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium may also be a component of the processor. The processor and the storage medium may reside in an application-specific integrated circuit (ASIC). In the embodiments of this application, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0148] Since the electronic devices, computer-readable storage media, and computer program products in the embodiments of the present invention can be applied to the above methods, the technical effects they can achieve can also be referred to the above method embodiments. The embodiments of the present invention will not be repeated here.
[0149] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0150] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0151] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0152] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A data transmission method, characterized in that, Applied to a data requesting end, the data requesting end is used to request engineering parameter information, and the method includes: The first data request information is determined; the first data request information includes: a parameter information request message and a first processing count identifier; the first processing count identifier is used to characterize the number of times the data requesting end requests parameter information from the data processing end; the data processing end is used to provide parameter information to the data requesting end; Send the first data request information to the public data area; Monitor the first write status flag of the data processing terminal in the public data area; When the first write status identifier is the first target write status identifier, it is determined whether the first processing count identifier and the second processing count identifier of the data processing terminal are consistent; the first target write status identifier is used to indicate that the data processing terminal has provided the working parameter information; the second processing count identifier is used to indicate the number of times the data processing terminal has provided the working parameter data to the data request terminal; If so, obtain the working parameter information provided by the data processing terminal from the public data area.
2. The method according to claim 1, characterized in that, The determination of the first data request information includes: Determine the parameter information request message from the data requesting end; The first processing count identifier is determined based on the sum of the previous processing count identifier and the target coefficient from the data requesting end; the target coefficient is a positive integer. The first data request information is generated based on the process parameter information request message and the first processing count identifier.
3. The method according to claim 2, characterized in that, The first data request information further includes: a second write status identifier of the data requesting end; The determination of the first data request information includes: The second write status identifier of the data requesting end is assigned the value of the second target write status identifier; the second target write status identifier is used to indicate that the data requesting end has generated the working parameter information request message; The first data request information is generated based on the parameter information request message, the first processing count identifier, and the second write status identifier.
4. The method according to claim 3, characterized in that, Before determining the first data request information, the process includes: Determine whether the first write status identifier of the data processing terminal and the second write status identifier of the data request terminal are both a first preset value; If not, then the first write status identifier and the second write status identifier are assigned the first preset value; If so, determine whether the first processing count identifier of the data requesting end is less than the target value; If it is less than, then the first data request information is determined; If it is not less than, then the first processing count identifier is assigned the second preset value.
5. A data transmission method, characterized in that, It is applied to the data processing end, which provides engineering parameter information; The method includes: Obtain first data request information from the public data area; the first data request information includes: a parameter information request message and a first processing count identifier; the first processing count identifier is used to characterize the number of times the data requesting end requests the parameter information from the data processing end; the data processing end is used to provide the parameter information to the data requesting end; Determine the working parameter information corresponding to the working parameter information request message; The first write status identifier of the data processing terminal is assigned the value of the first target write status identifier; the first target write status identifier is used to indicate that the data processing terminal has provided the working parameter information; The second processing count identifier is assigned the value of the first processing count identifier of the data requesting end; the second processing count identifier is used to characterize the number of times the data processing end provides process parameter information to the data requesting end; Based on the operating parameters, the first write status identifier, and the second processing count identifier, a first data response information is generated; the first data response information includes the operating parameters, the second processing count identifier, and the first write status identifier. Send the first data response information to the public data area.
6. The method according to claim 5, characterized in that, Before obtaining the first data request information from the public data area, the method further includes: Monitor the second write status identifier of the data requesting end in the public data area; When the second write status identifier is the second target write status identifier, the first data request information is obtained from the public data area; the second target write status identifier is used to indicate that the data requesting end has generated the working parameter information request message.
7. An electronic device, characterized in that, The electronic device is used to request engineering parameter information and includes a processing unit and a communication unit. The processing unit is configured to determine first data request information; the first data request information includes: a parameter information request message and a first processing count identifier; the first processing count identifier is used to characterize the number of times the data requesting end requests parameter information from the data processing end; the data processing end is configured to provide parameter information to the data requesting end; The communication unit is used to send the first data request information to the public data area; The processing unit is also used to monitor the first write status identifier of the data processing terminal in the public data area; When the first write status identifier is the first target write status identifier, the processing unit is further configured to determine whether the first processing count identifier and the second processing count identifier of the data processing terminal are consistent; the first target write status identifier is used to indicate that the data processing terminal has provided the working parameter information; the second processing count identifier is used to indicate the number of times the data processing terminal has provided the working parameter data to the data request terminal; If so, the communication unit is also used to obtain the working parameter information provided by the data processing terminal from the public data area.
8. An electronic device, characterized in that, It is applied to the data processing end, which provides engineering parameter information; The electronic device includes: a processing unit and a communication unit; The communication unit is used to obtain first data request information from a public data area; the first data request information includes: a parameter information request message and a first processing count identifier; the first processing count identifier is used to characterize the number of times the data requesting end requests the parameter information from the data processing end; the data processing end is used to provide the parameter information to the data requesting end; The processing unit is used to determine the working parameter information corresponding to the working parameter information request message; The processing unit is further configured to assign a first write status identifier of the data processing terminal to a first target write status identifier; the first target write status identifier is used to indicate that the data processing terminal has provided the working parameter information; The processing unit is further configured to assign the second processing count identifier to the first processing count identifier of the data requesting end; the second processing count identifier is used to characterize the number of times the data processing end provides the working parameter information to the data requesting end; and generate first data response information based on the working parameter information, the first write status identifier, and the second processing count identifier; the first data response information includes the working parameter information, the second processing count identifier, and the first write status identifier. The communication unit is also used to send the first data response information to the public data area.
9. An electronic device, characterized in that, include: A processor and a communication interface; the communication interface is coupled to the processor, the processor being configured to run computer programs or instructions to implement the data transmission method as described in any one of claims 1-6.
10. A computer-readable storage medium storing instructions, characterized in that, When the computer executes the instruction, the computer performs the data transmission method described in any one of claims 1-6.
Citation Information
Patent Citations
Data transmission control method based on bus network communication
CN111464419A
Data sharing method and device and storage medium
CN114329565A